1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # ident "%Z%%M% %I% %E% SMI"
26 #
27
28 LIBRARY= libresolv.a
29 VERS= .2
30
31 BSDOBJS= daemon.o putenv.o strcasecmp.o strsep.o \
32 ftruncate.o readv.o strdup.o strtoul.o \
33 gettimeofday.o setenv.o strerror.o utimes.o \
34 mktemp.o setitimer.o strpbrk.o writev.o
35
36 DSTOBJS= dst_api.o support.o hmac_link.o
37
38 # inet_addr, inet_pton, inet_ntop, and inet_ntoa removed due to overlap with
39 # libnsl
40 INETOBJS= inet_net_pton.o inet_neta.o inet_lnaof.o \
41 inet_netof.o nsap_addr.o inet_makeaddr.o \
42 inet_network.o inet_net_ntop.o inet_cidr_ntop.o \
43 inet_cidr_pton.o inet_data.o
44
45 # build only the IRS objects that the ISC libbind's make would
46 IRSTHROBJS= gethostent_r.o getnetent_r.o getnetgrent_r.o \
47 getprotoent_r.o getservent_r.o
48 IRSOBJS= ${IRSTHROBJS} \
49 dns.o dns_ho.o dns_nw.o dns_pr.o \
50 dns_sv.o gai_strerror.o gen.o gen_ho.o \
51 gen_ng.o gen_nw.o gen_pr.o gen_sv.o \
52 getaddrinfo.o gethostent.o getnameinfo.o getnetent.o \
53 getnetgrent.o getprotoent.o getservent.o hesiod.o \
54 irp.o irp_ho.o irp_ng.o irp_nw.o \
55 irp_pr.o irp_sv.o irpmarshall.o irs_data.o \
56 lcl.o lcl_ho.o lcl_ng.o lcl_nw.o \
57 lcl_pr.o lcl_sv.o nis.o nul_ng.o \
58 util.o
59
60 ISCOBJS= assertions.o base64.o bitncmp.o ctl_clnt.o \
61 ctl_p.o ctl_srvr.o ev_connects.o ev_files.o \
62 ev_streams.o ev_timers.o ev_waits.o eventlib.o \
63 heap.o hex.o logging.o memcluster.o \
64 movefile.o tree.o
65
66 NAMESEROBJS= ns_date.o ns_name.o ns_netint.o ns_parse.o \
67 ns_print.o ns_samedomain.o ns_sign.o ns_ttl.o \
68 ns_verify.o ns_rdata.o ns_newmsg.o
69
70 RESOLVOBJS= herror.o mtctxres.o res_comp.o res_data.o \
71 res_debug.o res_findzonecut.o res_init.o \
72 res_mkquery.o res_mkupdate.o res_query.o res_send.o \
73 res_sendsigned.o res_update.o
74
75 SUNWOBJS= sunw_mtctxres.o sunw_updrec.o sunw_wrappers.o
76
77 OBJECTS= $(BSDOBJS) $(DSTOBJS) $(INETOBJS) $(IRSOBJS) $(ISCOBJS) \
78 $(NAMESEROBJS) $(RESOLVOBJS) $(SUNWOBJS)
79
80 # include library definitions
81 include ../../Makefile.lib
82
83 # install this library in the root filesystem
84 include ../../Makefile.rootfs
85
86 # CC -v complains about things we aren't going to change in the ISC code
87 CCVERBOSE=
88
89 SRCDIR = ../common
90 SRCS= $(BSDOBJS:%.o=../common/bsd/%.c) \
91 $(DSTOBJS:%.o=../common/dst/%.c) \
92 $(INETOBJS:%.o=../common/inet/%.c) \
93 $(IRSOBJS:%.o=../common/irs/%.c) \
94 $(ISCOBJS:%.o=../common/isc/%.c) \
95 $(NAMESEROBJS:%.o=../common/nameser/%.c) \
96 $(RESOLVOBJS:%.o=../common/resolv/%.c) \
97 $(SUNWOBJS:%.o=../common/sunw/%.c)
98
99 LIBS = $(DYNLIB) $(LINTLIB)
100
101 $(LINTLIB):= SRCS = ../common/llib-lresolv
102
103 # Local Libresolv definitions
104
105 SOLCOMPAT = -Dsocket=_socket
106 CRYPTFLAGS= -DHMAC_MD5 -DUSE_MD5
107
108 LOCFLAGS += $(CRYPTFLAGS)
109 LOCFLAGS += -D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \
110 $(SOLCOMPAT) -I../include -I../../common/inc
111
112 CPPFLAGS += $(LOCFLAGS)
113 DYNFLAGS += $(ZNODELETE)
114
115 LDLIBS += -lsocket -lnsl -lc -lmd
116
117 .KEEP_STATE:
118
119 all: $(LIBS)
120
121 lint: lintcheck
122
123 # include library targets
124 include ../../Makefile.targ
125
126 pics/%.o: ../common/bsd/%.c
127 $(COMPILE.c) -o $@ $<
128 $(POST_PROCESS_O)
129
130 pics/%.o: ../common/dst/%.c
131 $(COMPILE.c) -o $@ $<
132 $(POST_PROCESS_O)
133
134 pics/%.o: ../common/inet/%.c
135 $(COMPILE.c) -o $@ $<
136 $(POST_PROCESS_O)
137
138 pics/%.o: ../common/irs/%.c
139 $(COMPILE.c) -o $@ $<
140 $(POST_PROCESS_O)
141
142 pics/%.o: ../common/isc/%.c
143 $(COMPILE.c) -o $@ $<
144 $(POST_PROCESS_O)
145
146 pics/%.o: ../common/nameser/%.c
147 $(COMPILE.c) -o $@ $<
148 $(POST_PROCESS_O)
149
150 pics/%.o: ../common/resolv/%.c
151 $(COMPILE.c) -o $@ $<
152 $(POST_PROCESS_O)
153
154 pics/%.o: ../common/sunw/%.c
155 $(COMPILE.c) -o $@ $<
156 $(POST_PROCESS_O)
157
158 # install rule for lint library target
159 $(ROOTLINTDIR)/%: ../common/%
160 $(INS.file)