~samiam/MaraDNS

1996cacd764e793be0f2d047bd7e910de7e135ab — Sam Trenholme a month ago 9e7d29f
Fix MinGW compile error.
Part of https://github.com/samboy/MaraDNS/issues/59
3 files changed, 2 insertions(+), 91 deletions(-)

M 00README.FIRST
M deadwood-github/src/DwSys.c
D deadwood-github/src/Makefile
M 00README.FIRST => 00README.FIRST +1 -1
@@ 1,4 1,4 @@
Copyright (c) 2002-2020 Sam Trenholme and others
Copyright (c) 2002-2020 Sam Trenholme and others 

TERMS


M deadwood-github/src/DwSys.c => deadwood-github/src/DwSys.c +1 -0
@@ 27,6 27,7 @@
#include <grp.h>
#include <signal.h>
#else
#include <winsock.h>
#include <wincrypt.h>
#endif /* MINGW */


D deadwood-github/src/Makefile => deadwood-github/src/Makefile +0 -90
@@ 1,90 0,0 @@
# Makefile for Deadwood-3 (CentOS 5; may work with other other Linux and
# *NIX systems)

# The compiler that makes programs designed to run on the machine 
# compiling.  When cross-compiling, we still need to compile and
# run programs on the build machine, so change the next line when
# cross-compiling.
HOSTCC=$(CC)

OBJS=DwStr.o \
	DwMararc.o \
	DwRadioGatun.o \
	DwSocket.o \
	DwUdpSocket.o \
	DwTcpSocket.o \
	DwSys.o \
	DwHash.o \
	DwCompress.o \
	DwDnsStr.o \
	DwRecurse.o \
	DwDict.o

all:	version.h Deadwood

# Since some systems may not have /dev/urandom (Windows, *cough* *cough*), we 
# keep a randomly generated prime around 

#		Makefile \
#

clean:
	rm -f Test DwMain DwTcp *.exe *.o a.out RandomPrime writehash_test* \
		Deadwood foo* dw_cache DwHash DwCompress *stackdump \
		core ; \
		./make.version.h ; if [ -e /dev/urandom ] ; \
			then rm DwRandPrime.h  ; \
			cc RandomPrime.c ; ./a.out > DwRandPrime.h ; rm a.out \
		; fi 

version.h:	
	./make.version.h
	
DwStr.o:	DwStr.c DwStr.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwStr.o DwStr.c

DwCompress.o:	DwCompress.c DwStr.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwCompress.o DwCompress.c

DwDnsStr.o:	DwDnsStr.c DwStr.h DwRecurse.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwDnsStr.o DwDnsStr.c

DwMararc.o:	DwMararc.c DwMararc.h 
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwMararc.o DwMararc.c

DwRadioGatun.o:	DwRadioGatun.c DwRadioGatun.h DwStr.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwRadioGatun.o DwRadioGatun.c

DwTcpSocket.o:	DwTcpSocket.c DwStr.h DwSocket.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwTcpSocket.o DwTcpSocket.c

DwUdpSocket.o:	DwUdpSocket.c DwStr.h DwSocket.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwUdpSocket.o DwUdpSocket.c

DwSocket.o:	DwSocket.c DwStr.h DwSocket.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwSocket.o DwSocket.c

DwSys.o:	DwSys.c DwStr.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwSys.o DwSys.c

RandomPrime:	RandomPrime.c
	$(CC) -O3 -o RandomPrime RandomPrime.c

DwRandPrime.h: RandomPrime
	if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi

DwHash.o:	DwHash.c DwStr.h DwRandPrime.h DwHash.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwHash.o DwHash.c

DwRecurse.o:	DwRecurse.c DwRecurse.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwRecurse.o DwRecurse.c

DwDict.o:	DwDict.c DwStr.h DwRandPrime.h DwDict.h
	$(CC) $(FLAGS) -DIPV6 -Wall -c -o DwDict.o DwDict.c

Test:		Test.c DwStr.o DwStr.h DwStr_functions.h $(OBJS)
	$(CC) $(FLAGS) -Wall -o Test Test.c $(OBJS)

Deadwood:	DwMain.c $(OBJS) DwStr_functions.h version.h
	$(CC) $(FLAGS) -DIPV6 -Wall -o Deadwood DwMain.c $(OBJS) -lrt