1
# Makefile for Deadwood-2 (CentOS 5; may work with other other Linux and
4
# The compiler that makes programs designed to run on the machine
5
# compiling. When cross-compiling, we still need to compile and
6
# run programs on the build machine, so change the next line when
23
all: deadwood version.h
25
# Since some systems may not have /dev/urandom (Windows, *cough* *cough*), we
26
# keep a randomly generated prime around
32
rm -f Test DwMain DwTcp *.exe *.o a.out RandomPrime writehash_test* \
33
deadwood foo* dw_cache DwHash DwCompress *stackdump core
34
if [ -f DwRandPrime.h.bak ]; then mv DwRandPrime.h.bak DwRandPrime.h; fi
39
DwStr.o: DwStr.c DwStr.h
40
$(CC) $(FLAGS) -c -o DwStr.o DwStr.c
42
DwCompress.o: DwCompress.c DwStr.h
43
$(CC) $(FLAGS) -c -o DwCompress.o DwCompress.c
45
DwDnsStr.o: DwDnsStr.c DwStr.h DwRecurse.h
46
$(CC) $(FLAGS) -c -o DwDnsStr.o DwDnsStr.c
48
DwMararc.o: DwMararc.c DwMararc.h
49
$(CC) $(FLAGS) -c -o DwMararc.o DwMararc.c
51
DwRadioGatun.o: DwRadioGatun.c DwRadioGatun.h DwStr.h
52
$(CC) $(FLAGS) -c -o DwRadioGatun.o DwRadioGatun.c
54
DwTcpSocket.o: DwTcpSocket.c DwStr.h DwSocket.h
55
$(CC) $(FLAGS) -c -o DwTcpSocket.o DwTcpSocket.c
57
DwUdpSocket.o: DwUdpSocket.c DwStr.h DwSocket.h
58
$(CC) $(FLAGS) -c -o DwUdpSocket.o DwUdpSocket.c
60
DwSocket.o: DwSocket.c DwStr.h DwSocket.h
61
$(CC) $(FLAGS) -c -o DwSocket.o DwSocket.c
63
DwSys.o: DwSys.c DwStr.h
64
$(CC) $(FLAGS) -c -o DwSys.o DwSys.c
66
RandomPrime: RandomPrime.c
67
$(CC) -O3 -o RandomPrime RandomPrime.c
69
DwRandPrime.h: RandomPrime
70
./RandomPrime > DwRandPrime.h
72
DwHash.o: DwHash.c DwStr.h DwRandPrime.h DwHash.h
73
$(CC) $(FLAGS) -Wall -c -o DwHash.o DwHash.c
75
DwRecurse.o: DwRecurse.c DwRecurse.h
76
$(CC) $(FLAGS) -Wall -c -o DwRecurse.o DwRecurse.c
78
DwDict.o: DwDict.c DwStr.h DwRandPrime.h DwDict.h
79
$(CC) $(FLAGS) -Wall -c -o DwDict.o DwDict.c
81
Test: Test.c DwStr.o DwStr.h DwStr_functions.h $(OBJS)
82
$(CC) $(FLAGS) -Wall -o Test Test.c $(OBJS)
84
deadwood: DwMain.c $(OBJS) DwStr_functions.h version.h
85
$(CC) $(FLAGS) -Wall -o deadwood DwMain.c $(OBJS) -lrt