1
# Makefile for DwHash test executable; this is only for
17
# Since some systems may not have /dev/urandom (Windows, *cough* *cough*), we
18
# keep a randomly generated prime around
20
rm -f Test DwMain DwTcp *.exe *.o a.out RandomPrime writehash_test* \
21
dw_cache DwHash *stackdump core Makefile foo* ; \
22
./make.version.h ; if [ -e /dev/urandom ] ; \
23
then rm DwRandPrime.h ; \
24
cc RandomPrime.c ; ./a.out > DwRandPrime.h ; rm a.out \
30
DwStr.o: DwStr.c DwStr.h
31
$(CC) $(FLAGS) -Wall -c -o DwStr.o DwStr.c
33
DwMararc.o: DwMararc.c DwMararc.h
34
$(CC) $(FLAGS) -Wall -c -o DwMararc.o DwMararc.c
36
DwRadioGatun.o: DwRadioGatun.c DwRadioGatun.h DwStr.h
37
$(CC) $(FLAGS) -Wall -c -o DwRadioGatun.o DwRadioGatun.c
39
DwTcpSocket.o: DwTcpSocket.c DwStr.h DwSocket.h
40
$(CC) $(FLAGS) -Wall -c -o DwTcpSocket.o DwTcpSocket.c
42
DwUdpSocket.o: DwUdpSocket.c DwStr.h DwSocket.h
43
$(CC) $(FLAGS) -Wall -c -o DwUdpSocket.o DwUdpSocket.c
45
DwSocket.o: DwSocket.c DwStr.h DwSocket.h
46
$(CC) $(FLAGS) -Wall -c -o DwSocket.o DwSocket.c
48
DwSys.o: DwSys.c DwStr.h
49
$(CC) $(FLAGS) -Wall -c -o DwSys.o DwSys.c
51
RandomPrime: RandomPrime.c
52
$(CC) -O3 -o RandomPrime RandomPrime.c
54
DwRandPrime.h: RandomPrime
55
if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi
57
DwDict.o: DwDict.c DwStr.h DwRandPrime.h DwDict.h
58
$(CC) $(FLAGS) -Wall -c -o DwDict.o DwDict.c
60
Test: Test.c DwStr.o DwStr.h DwStr_functions.h $(OBJS)
61
$(CC) $(FLAGS) -Wall -o Test Test.c $(OBJS)
63
DwMain: DwMain.c $(OBJS) DwStr_functions.h version.h
64
$(CC) $(FLAGS) -Wall -o DwMain DwMain.c $(OBJS)
66
DwHash: DwHash.c $(OBJS)
67
$(CC) $(FLAGS) -Wall -DHSCK -DHAVE_MAIN -o DwHash DwHash.c $(OBJS)