]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ldns/drill/Makefile.in
Import LDNS and build it as an internal library.
[FreeBSD/FreeBSD.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
13 CC = @CC@
14 CFLAGS = -I. @CFLAGS@
15 CPPFLAGS = @CPPFLAGS@ 
16 LDFLAGS = @LDFLAGS@
17 LIBS = @LIBS@
18 INSTALL = $(srcdir)/install-sh -c
19 INSTALL_PROGRAM = $(INSTALL)
20 LDNSDIR = @LDNSDIR@
21 LIBS_STC = @LIBS_STC@
22
23 COMPILE         = $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir)
24 LINK            = $(CC) $(CFLAGS) $(LDFLAGS) 
25
26 LINT            = splint
27 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
28 #-Dglob64=glob -Dglobfree64=globfree
29 # compat with openssl linux edition.
30 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"
31 # compat with NetBSD
32 ifeq "$(shell uname)" "NetBSD"
33 LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
34 endif
35 # compat with OpenBSD
36 LINTFLAGS+="-Dsigset_t=long"
37 # FreeBSD8
38 LINTFLAGS+="-D__uint16_t=uint16_t"
39 LINTFLAGS+=-D__signed__=signed "-D__packed=" "-D__aligned(x)="
40 # Ubuntu Linux 11.04
41 LINTFLAGS+="-D__u16=struct __u16" "-D__u32=struct __u32" "-D__u64=struct __u64"
42
43 OBJ=drill.o drill_util.o error.o root.o work.o chasetrace.o dnssec.o securetrace.o
44 SRC=$(OBJ:.o=.c)
45
46 HEADER=drill.h $(srcdir)/drill_util.h
47
48 .PHONY: all clean realclean docclean doc release tags install all-static
49
50 all:    drill 
51 all-static:     drill-stc 
52
53 tags:   
54         ctags *.[ch]
55
56 drill:  $(OBJ) 
57         $(LINK) -o drill $(OBJ) $(LIBS)
58
59 drill-stc:      $(OBJ) 
60         $(LINK) -o drill $(OBJ) $(LIBS_STC)
61
62 ## implicit rule
63 %.o:    $(srcdir)/%.c
64         $(COMPILE) -c $<
65
66 clean:
67         rm -f ${OBJ}
68         rm -f drill
69         rm -f *core
70         rm -f config.h.in~
71         rm -f config.log
72         rm -f config.guess
73         rm -f config.status
74
75 docclean:
76         rm -rf doxydoc
77
78 distclean: clean docclean
79         rm -f config.h
80         rm -f drill.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 drill.h
92         rm -f configure
93         rm -f Makefile  
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 $(srcdir)/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