allow template to be used as a standalone program (or cgi script)
[tridge/junkcode.git] / tserver / Makefile
1 CC=gcc
2 CFLAGS=-O6 -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align
3 CPPFLAGS=-D_GNU_SOURCE=1
4 OBJS = util.o tserver.o cgi.o template.o
5 LIBS =
6 INCLUDES = includes.h cgi.h template.h
7
8 %.o: %.c $(INCLUDES)
9         @echo Compiling $*.c
10         @$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c 
11
12 all: tserver template
13
14 tserver: $(OBJS)
15         @echo Linking $@
16         @$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
17         @strip $@
18
19 template: template.o template_main.o util.o
20         @echo Linking $@
21         @$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
22
23 clean:
24         /bin/rm -f *.o tserver template *~ files/*~ 
25