1SHARED=0
2
3SRCDIR=./src/
4INCDIR=./htpl/
5OBJS = parse.o strutil.o token.o sections.o varlist.o format.o
6CFLAGS = -ggdb
7
8all: clean libhtpl test
9
10test:
11	gcc -o htpltest -I$(INCDIR) test.c -L. -lhtpl
12
13libhtpl: $(OBJS)
14ifeq ($(SHARED), 0)
15	ar -r libhtpl.a $(OBJS)
16else
17	gcc -shared -o libhtpl.so $(LFLAGS) $(OBJS)
18endif
19
20%.o: $(SRCDIR)%.c
21	gcc $(CFLAGS) -I$(INCDIR) -c $<
22
23
24install: libhtpl
25	install test /usr/local/sbin
26
27clean:
28	rm -f *~ *.o *.so.* *.so *.a htpltest
29
30
31