chiark / gitweb /
less recompilation of hash fns.
[chiark-tcl.git] / base / troglodyte-Makefile
1 OBJS=           tables.o \
2                 hbytes.o \
3                 enum.o \
4                 chop.o \
5                 hook.o \
6                 bcmode.o \
7                 algtables.o \
8                 serpent.o \
9                 sha1.o \
10                 md5.o \
11                 crypto.o \
12                 parse.o
13
14 HDRS=           hbytes.h \
15                 $(AUTO_HDRS)
16
17 AUTO_HDRS=      tables.h
18 AUTO_SRCS=      tables.c
19 AUTOS=          $(AUTO_HDRS) $(AUTO_SRCS)
20
21 TARGETS=        hbytes.so
22
23 CC_CRYPTO=      $(CC) $(CFLAGS) $(CPPFLAGS) -O3
24 CFLAGS=         -g -Wall $(OPTIMISE)
25 OPTIMISE=       -O2
26
27 all:            $(TARGETS) $(AUTOS)
28
29 hbytes.so:      $(OBJS)
30                 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared $(OBJS) $(LDLIBS)
31
32 %.c:            %.tct tcmdifgen
33                 ./tcmdifgen -wc -o$@ $<
34
35 %.h:            %.tct tcmdifgen
36                 ./tcmdifgen -wh -o$@ $<
37
38 %.o:            %.c $(HDRS)
39                 $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
40
41 serpent.o:      serpent.c serpent.h serpentsboxes.h
42                 $(CC_CRYPTO) -o $@ -c $<
43
44 md5.o:          md5.c md5.h
45                 $(CC_CRYPTO) -o $@ -c $<
46
47 sha1.o:         sha1.c sha1.h
48                 $(CC_CRYPTO) -o $@ -c $<
49
50 clean:
51                 rm -f $(OBJS) $(TARGETS) *~ ./#*#