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