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