]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ldns/drill/Makefile.in
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ldns / drill / Makefile.in
1 # Standard installation pathnames
2 # See the file LICENSE for the license
3 SHELL = @SHELL@
4 VERSION = @PACKAGE_VERSION@
5 basesrcdir = $(shell basename `pwd`)
6 srcdir = @srcdir@
7 prefix  = @prefix@
8 exec_prefix = @exec_prefix@
9 bindir = @bindir@
10 mandir = @mandir@
11 includedir = @includedir@
12 datarootdir = @datarootdir@
13
14 CC = @CC@
15 CFLAGS = -I. @CFLAGS@
16 CPPFLAGS = @CPPFLAGS@ 
17 LDFLAGS = @LDFLAGS@
18 LIBS = @LIBS@
19 INSTALL = $(srcdir)/install-sh -c
20 INSTALL_PROGRAM = $(INSTALL)
21 LDNSDIR = @LDNSDIR@
22 LIBS_STC = @LIBS_STC@
23
24 COMPILE         = $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir)
25 LINK            = $(CC) $(CFLAGS) $(LDFLAGS) 
26
27 LINT            = splint
28 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
29 #-Dglob64=glob -Dglobfree64=globfree
30 # compat with openssl linux edition.
31 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"
32 # compat with NetBSD
33 ifeq "$(shell uname)" "NetBSD"
34 LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
35 endif
36 # compat with OpenBSD
37 LINTFLAGS+="-Dsigset_t=long"
38 # FreeBSD8
39 LINTFLAGS+="-D__uint16_t=uint16_t"
40 LINTFLAGS+=-D__signed__=signed "-D__packed=" "-D__aligned(x)="
41 # Ubuntu Linux 11.04
42 LINTFLAGS+="-D__u16=struct __u16" "-D__u32=struct __u32" "-D__u64=struct __u64"
43
44 OBJ=drill.o drill_util.o error.o root.o work.o chasetrace.o dnssec.o securetrace.o
45 SRC=$(OBJ:.o=.c)
46
47 HEADER=drill.h $(srcdir)/drill_util.h
48
49 .PHONY: all clean realclean docclean doc release tags install all-static
50
51 all:    drill 
52 all-static:     drill-stc 
53
54 tags:   
55         ctags *.[ch]
56
57 drill:  $(OBJ) 
58         $(LINK) -o drill $(OBJ) $(LIBS)
59
60 drill-stc:      $(OBJ) 
61         $(LINK) -o drill $(OBJ) $(LIBS_STC)
62
63 ## implicit rule
64 %.o:    $(srcdir)/%.c
65         $(COMPILE) -c $<
66
67 clean:
68         rm -f ${OBJ}
69         rm -f drill
70         rm -f *core
71         rm -f config.h.in~
72         rm -f config.log
73         rm -f config.guess
74         rm -f config.status
75
76 docclean:
77         rm -rf doxydoc
78
79 distclean: clean docclean
80         rm -f config.h
81
82 realclean: clean docclean
83         rm -f tags
84         rm -f config.log
85         rm -f config.sub
86         rm -f ltmain.sh
87         rm -f config.status
88         rm -rf autom4te.cache
89         rm -f config.h
90         rm -f config.h.in
91         rm -f configure
92         rm -f Makefile  
93         rm -f drill.1
94         rm -f aclocal.m4
95
96 doc:    
97         doxygen drill.doxygen
98
99 install: all
100         $(INSTALL) -d $(DESTDIR)$(bindir)
101         $(INSTALL) drill $(DESTDIR)$(bindir)/drill
102         $(INSTALL) -m 644 drill.1 $(DESTDIR)$(mandir)/man1/drill.1
103
104 uninstall:
105         @echo
106         rm -f -- $(DESTDIR)$(bindir)/drill
107         rm -f -- $(DESTDIR)$(mandir)/man1/drill.1
108         rmdir -p $(DESTDIR)$(bindir)
109         rmdir -p $(DESTDIR)$(mandir)/man1
110         @echo
111
112 lint:
113         @for i in $(SRC) ; do \
114                 $(LINT) $(LINTFLAGS) $(CPPFLAGS) -I$(srcdir) $(srcdir)/$$i ; \
115                 if [ $$? -ne 0 ] ; then exit 1 ; fi ; \
116         done
117
118 confclean: clean
119         rm -rf config.log config.status config.h Makefile drill.1