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 \
35
./make.version.h ; if [ -e /dev/urandom ] ; \
36
then rm DwRandPrime.h ; \
37
cc RandomPrime.c ; ./a.out > DwRandPrime.h ; rm a.out \
43
DwStr.o: DwStr.c DwStr.h
44
$(CC) $(FLAGS) -Wall -c -o DwStr.o DwStr.c
46
DwCompress.o: DwCompress.c DwStr.h
47
$(CC) $(FLAGS) -Wall -c -o DwCompress.o DwCompress.c
49
DwDnsStr.o: DwDnsStr.c DwStr.h DwRecurse.h
50
$(CC) $(FLAGS) -Wall -c -o DwDnsStr.o DwDnsStr.c
52
DwMararc.o: DwMararc.c DwMararc.h
53
$(CC) $(FLAGS) -Wall -c -o DwMararc.o DwMararc.c
55
DwRadioGatun.o: DwRadioGatun.c DwRadioGatun.h DwStr.h
56
$(CC) $(FLAGS) -Wall -c -o DwRadioGatun.o DwRadioGatun.c
58
DwTcpSocket.o: DwTcpSocket.c DwStr.h DwSocket.h
59
$(CC) $(FLAGS) -Wall -c -o DwTcpSocket.o DwTcpSocket.c
61
DwUdpSocket.o: DwUdpSocket.c DwStr.h DwSocket.h
62
$(CC) $(FLAGS) -Wall -c -o DwUdpSocket.o DwUdpSocket.c
64
DwSocket.o: DwSocket.c DwStr.h DwSocket.h
65
$(CC) $(FLAGS) -Wall -c -o DwSocket.o DwSocket.c
67
DwSys.o: DwSys.c DwStr.h
68
$(CC) $(FLAGS) -Wall -c -o DwSys.o DwSys.c
70
RandomPrime: RandomPrime.c
71
$(CC) -O3 -o RandomPrime RandomPrime.c
73
DwRandPrime.h: RandomPrime
74
if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi
76
DwHash.o: DwHash.c DwStr.h DwRandPrime.h DwHash.h
77
$(CC) $(FLAGS) -Wall -c -o DwHash.o DwHash.c
79
DwRecurse.o: DwRecurse.c DwRecurse.h
80
$(CC) $(FLAGS) -Wall -c -o DwRecurse.o DwRecurse.c
82
DwDict.o: DwDict.c DwStr.h DwRandPrime.h DwDict.h
83
$(CC) $(FLAGS) -Wall -c -o DwDict.o DwDict.c
85
Test: Test.c DwStr.o DwStr.h DwStr_functions.h $(OBJS)
86
$(CC) $(FLAGS) -Wall -o Test Test.c $(OBJS)
88
Deadwood: DwMain.c $(OBJS) DwStr_functions.h version.h
89
$(CC) $(FLAGS) -Wall -o Deadwood DwMain.c $(OBJS) -lrt