chiark / gitweb /
mask-map lookup seems to work
[chiark-tcl.git] / base / troglodyte-Makefile
index 9c67ece43c6b616b46230e4bec8536b3598b66a0..b6009f8129c0a0626d085f31944cbca8cff1869c 100644 (file)
@@ -1,6 +1,21 @@
 OBJS=          tables.o \
+               tcmdiflib.o \
                hbytes.o \
-               enum.o
+               enum.o \
+               idtable.o \
+               scriptinv.o \
+               ulongs.o \
+               sockaddr.o \
+               dgram.o \
+               tuntap.o \
+               chop.o \
+               hook.o \
+               bcmode.o \
+               misc.o \
+               algtables.o \
+               crypto.o \
+               parse.o \
+               maskmap.o
 
 HDRS=          hbytes.h \
                $(AUTO_HDRS)
@@ -9,23 +24,37 @@ AUTO_HDRS=   tables.h
 AUTO_SRCS=     tables.c
 AUTOS=         $(AUTO_HDRS) $(AUTO_SRCS)
 
-TARGETS=       hbytes.so
+TARGETS=       hbytes.so autocode.tcl autococo.tcl
 
-CFLAGS=        -g -Wall -O
+CC_CRYPTO=     $(CC) $(CFLAGS) $(CPPFLAGS) -O3
+CPPFLAGS=      -I../plocal/include $(TCL_MEM_DEBUG) $(CMDLINE_CPPFLAGS)
+LDFLAGS=       -L../plocal/lib
+LDLIBS=                -lnettle
+CFLAGS=                -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
+               $(OPTIMISE)
+OPTIMISE=      -O2
+TCL_MEM_DEBUG= -DTCL_MEM_DEBUG
 
 all:           $(TARGETS) $(AUTOS)
 
 hbytes.so:     $(OBJS)
                $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared $(OBJS) $(LDLIBS)
 
-%.c:           %.tct
+autoco%.tcl:   deco%gen.tcl decobogen.tcl general.tcl ./hbytes.so \
+                       protocol.deco
+               ./$< protocol.deco >$@.new && mv -f $@.new $@           
+
+%.c:           %.tct tcmdifgen
                ./tcmdifgen -wc -o$@ $<
 
-%.h:           %.tct
+%.h:           %.tct tcmdifgen
                ./tcmdifgen -wh -o$@ $<
 
 %.o:           %.c $(HDRS)
                $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
 
+#alg.o:                alg.c alg.h alg2.h
+#              $(CC_CRYPTO) -o $@ -c $<
+
 clean:
                rm -f $(OBJS) $(TARGETS) *~ ./#*#