File: Makefile.freebsd

package info (click to toggle)
maradns 2.0.13-1.2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 11,440 kB
  • ctags: 3,532
  • sloc: ansic: 38,385; sh: 12,152; python: 933; makefile: 744; awk: 503; perl: 328
file content (91 lines) | stat: -rw-r--r-- 2,950 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This is a small change to the other Makefile to make it compile on
# FreeBSD.  This file is a third-party contribution; MaraDNS support can 
# not help people who wish to compile MaraDNS on FreeBSD free of charge.

# Server objects
SOBJECTS=server/MaraBigHash.o
# js_string library (buffer overflow resistant string library) objects
JOBJS=libs/JsStr.o libs/JsStrOS.o libs/JsStrCP.o 
# MaraHash (assosciative array) library objects
MHOBJS=libs/MaraHash.o
# Parser objects
POBJECTS=parse/ParseMaraRc.o parse/ParseCsv1.o ../parse/ParseIpAcl.o
# DNS query processing library objects
DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o
# Secure random number generator objects
ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o
OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS)
EXECS=server/maradns

# Uncomment the following three lines to get this to compile on Solaris
# LDFLAGS=-lxnet
# CC=gcc $(LDFLAGS) -DSELECT_PROBLEM
# M="CC=$(CC)"
# These are currently unused, but will be needed again if we use flock() again
# CFLAGS=-I/usr/ucbinclude 
# L="CC=$(CC) $(CFLAGS)"
# LDFLAGS=-L/usr/ucblib -lucb -lxnet
# end the Solaris section
# Non-Solaris version of "M"
M="VERSION=$(VERSION)"
Q="DEFINES=-DSELECT_PROBLEM"

FLAGS = `dpkg-buildflags --get CFLAGS`
FLAGS += -Wall -DIPV6  -pipe -D_THREAD_SAFE -pthread
FLAGS += `dpkg-buildflags --get CPPFLAGS`
FLAGS += `dpkg-buildflags --get LDFLAGS`
#FLAGS = -g

# FreeBSD needs some special flags to compile MaraDNS
CC="cc $(FLAGS)"
M=CC=$(CC) 
V="VERSION=$(VERSION)"

# Debug
D=$(M) DEBUG=-DDEBUG

all: 
	cd libs ; make $(M) ; cd ../dns ; make $(M) ; \
	cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \
	cd ../qual ; make $(M) ; cd ../server ; \
	make $(M) $(Q) COMPILED=\"$(COMPILED)\" $(V) ; \
	cd ../tools ; make $(M) ; \
	cd ../deadwood-*/src/ ; make FLAGS="$(FLAGS)"; \
	cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST

debug: 
	cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
	cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \
	cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \
	cd ../server ; \
	make $(D) $(Q) COMPILED=\"$(COMPILED_DEBUG)\" ; \
	cd ../tools ; make $(D) ; \
	cd ../tcp ; make $(D) ; cat ../00README.FIRST

clean:
	rm -f $(OBJECTS) core $(EXECS) ; \
	cd dns ; make clean ; \
	cd ../libs ; make clean ; cd ../parse ; make clean ; \
	cd ../qual ; make clean ; \
	cd ../server ; make clean ; \
	cd ../test ; make clean ; \
	cd ../tools ; make clean ; \
	cd misc ; make clean ; \
	cd ../../utf8 ; make clean ; \
	cd ../tcp ; make clean ; \
	cd ../rng ; make clean ; \
	cd ../sqa ; make clean ; \
	cd ../deadwood-*/src ; make clean ; \
	# ; cd .. ; find . -type d | grep .deps | xargs rm -fr ; find . -name '*.o' | xargs rm

strip:
	cd server; strip maradns ; cd ../tcp ; \
	strip zoneserver getzone fetchzone ; \
	cd ../tools ; strip askmara

install:
	VERSION=$(VERSION) ./build/install.sh

uninstall:
	VERSION=$(VERSION) ./build/uninstall.sh