summaryrefslogtreecommitdiffstats
path: root/contrib/ldns/drill/Makefile.in
blob: 5730f0809c7638d3c1433d00e5f3bd92aa9996b3 (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Standard installation pathnames
# See the file LICENSE for the license
SHELL = @SHELL@
VERSION = @PACKAGE_VERSION@
basesrcdir = $(shell basename `pwd`)
srcdir = @srcdir@
prefix  = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
includedir = @includedir@

CC = @CC@
CFLAGS = -I. @CFLAGS@
CPPFLAGS = @CPPFLAGS@ 
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = $(srcdir)/install-sh -c
INSTALL_PROGRAM = $(INSTALL)
LDNSDIR = @LDNSDIR@
LIBS_STC = @LIBS_STC@

COMPILE         = $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir)
LINK            = $(CC) $(CFLAGS) $(LDFLAGS) 

LINT            = splint
LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list
#-Dglob64=glob -Dglobfree64=globfree
# compat with openssl linux edition.
LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned"
# compat with NetBSD
ifeq "$(shell uname)" "NetBSD"
LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
endif
# compat with OpenBSD
LINTFLAGS+="-Dsigset_t=long"
# FreeBSD8
LINTFLAGS+="-D__uint16_t=uint16_t"
LINTFLAGS+=-D__signed__=signed "-D__packed=" "-D__aligned(x)="
# Ubuntu Linux 11.04
LINTFLAGS+="-D__u16=struct __u16" "-D__u32=struct __u32" "-D__u64=struct __u64"

OBJ=drill.o drill_util.o error.o root.o work.o chasetrace.o dnssec.o securetrace.o
SRC=$(OBJ:.o=.c)

HEADER=drill.h $(srcdir)/drill_util.h

.PHONY:	all clean realclean docclean doc release tags install all-static

all:	drill 
all-static:	drill-stc 

tags:	
	ctags *.[ch]

drill:	$(OBJ) 
	$(LINK) -o drill $(OBJ) $(LIBS)

drill-stc:	$(OBJ) 
	$(LINK) -o drill $(OBJ) $(LIBS_STC)

## implicit rule
%.o:	$(srcdir)/%.c
	$(COMPILE) -c $<

clean:
	rm -f ${OBJ}
	rm -f drill
	rm -f *core
	rm -f config.h.in~
	rm -f config.log
	rm -f config.guess
	rm -f config.status

docclean:
	rm -rf doxydoc

distclean: clean docclean
	rm -f config.h
	rm -f drill.h

realclean: clean docclean
	rm -f tags
	rm -f config.log
	rm -f config.sub
	rm -f ltmain.sh
	rm -f config.status
	rm -rf autom4te.cache
	rm -f config.h
	rm -f config.h.in
	rm -f drill.h
	rm -f configure
	rm -f Makefile	
	rm -f aclocal.m4

doc:	
	doxygen drill.doxygen

install: all
	$(INSTALL) -d $(DESTDIR)$(bindir)
	$(INSTALL) drill $(DESTDIR)$(bindir)/drill
	$(INSTALL) -m 644 $(srcdir)/drill.1 $(DESTDIR)$(mandir)/man1/drill.1

uninstall:
	@echo
	rm -f -- $(DESTDIR)$(bindir)/drill
	rm -f -- $(DESTDIR)$(mandir)/man1/drill.1
	rmdir -p $(DESTDIR)$(bindir)
	rmdir -p $(DESTDIR)$(mandir)/man1
	@echo

lint:
	@for i in $(SRC) ; do \
                $(LINT) $(LINTFLAGS) $(CPPFLAGS) -I$(srcdir) $(srcdir)/$$i ; \
                if [ $$? -ne 0 ] ; then exit 1 ; fi ; \
        done

confclean: clean
	rm -rf config.log config.status config.h Makefile
OpenPOWER on IntegriCloud