chiark / gitweb /
scriptinv supports xargs and adns uses them
[chiark-tcl.git] / base / troglodyte-Makefile
1 OBJS=           tables.o \
2                 tcmdiflib.o \
3                 hbytes.o \
4                 adns.o \
5                 enum.o \
6                 idtable.o \
7                 scriptinv.o \
8                 ulongs.o \
9                 sockaddr.o \
10                 dgram.o \
11                 tuntap.o \
12                 chop.o \
13                 hook.o \
14                 bcmode.o \
15                 misc.o \
16                 algtables.o \
17                 crypto.o \
18                 parse.o \
19                 maskmap.o
20
21 HDRS=           hbytes.h \
22                 $(AUTO_HDRS)
23
24 AUTO_HDRS=      tables.h
25 AUTO_SRCS=      tables.c
26 AUTOS=          $(AUTO_HDRS) $(AUTO_SRCS)
27
28 TARGETS=        hbytes.so autocode.tcl autococo.tcl
29
30 CC_CRYPTO=      $(CC) $(CFLAGS) $(CPPFLAGS) -O3
31 CPPFLAGS=       -I../plocal/include $(TCL_MEM_DEBUG) $(CMDLINE_CPPFLAGS)
32 LDFLAGS=        -L../plocal/lib
33 LDLIBS=         -lnettle -ladns
34 CFLAGS=         -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
35                 $(OPTIMISE)
36 OPTIMISE=       -O2
37 TCL_MEM_DEBUG=  -DTCL_MEM_DEBUG
38
39 all:            $(TARGETS) $(AUTOS)
40
41 hbytes.so:      $(OBJS)
42                 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared $(OBJS) $(LDLIBS)
43
44 autoco%.tcl:    deco%gen.tcl decobogen.tcl general.tcl ./hbytes.so \
45                         protocol.deco
46                 ./$< protocol.deco >$@.new && mv -f $@.new $@           
47
48 %.c:            %.tct tcmdifgen
49                 ./tcmdifgen -wc -o$@ $<
50
51 %.h:            %.tct tcmdifgen
52                 ./tcmdifgen -wh -o$@ $<
53
54 %.o:            %.c $(HDRS)
55                 $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
56
57 #alg.o:         alg.c alg.h alg2.h
58 #               $(CC_CRYPTO) -o $@ -c $<
59
60 clean:
61                 rm -f $(OBJS) $(TARGETS) *~ ./#*#