xref: /illumos-gate/usr/src/lib/libresolv2/Makefile.com (revision 76716eaced8d7659d4594350eb3f343c31fe2806)
1#
2# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7# lib/libresolv2/Makefile.com
8#
9
10LIBRARY= libresolv.a
11VERS= .2
12
13BSDOBJS=   	daemon.o	putenv.o	strcasecmp.o	strsep.o \
14		ftruncate.o	readv.o		strdup.o	strtoul.o \
15		gettimeofday.o	setenv.o	strerror.o	utimes.o \
16		mktemp.o	setitimer.o	strpbrk.o	writev.o
17
18DSTOBJS=	dst_api.o	prandom.o	support.o
19
20DSTLINKOBJS=	bsafe_link.o	cylink_link.o	eay_dss_link.o	hmac_link.o \
21		rsaref_link.o
22
23INETOBJS=	inet_net_pton.o	inet_ntop.o	\
24		inet_neta.o	inet_pton.o	inet_lnaof.o	inet_netof.o \
25		nsap_addr.o	inet_makeaddr.o	inet_network.o \
26		inet_net_ntop.o	inet_ntoa.o	inet_cidr_ntop.o \
27		inet_cidr_pton.o		inet_data.o
28
29IRSOBJS=	dns.o		gen_ho.o	getnetgrent.o	lcl_ng.o \
30		nis_nw.o	dns_gr.o	gen_ng.o	getprotoent.o \
31		lcl_nw.o	nis_pr.o	dns_ho.o	gen_nw.o \
32		getpwent.o	lcl_pr.o	nis_pw.o	dns_nw.o \
33		gen_pr.o	getservent.o	lcl_pw.o	nis_sv.o \
34		dns_pr.o	gen_pw.o	hesiod.o	lcl_sv.o \
35		nul_ng.o	dns_pw.o	gen_sv.o	irs_data.o \
36		nis.o		util.o		dns_sv.o	getgrent.o \
37		lcl.o		nis_gr.o	gen.o		gethostent.o \
38		lcl_gr.o	nis_ho.o	gen_gr.o	getnetent.o \
39		lcl_ho.o	nis_ng.o	getpwent_r.o \
40		getservent_r.o	gai_strerror.o	getgrent_r.o \
41		gethostent_r.o	getnetent_r.o	getnetgrent_r.o \
42		getprotoent_r.o	getnameinfo.o	irp.o		irpmarshall.o \
43		irp_ho.o	irp_nw.o	irp_pr.o	irp_sv.o \
44		irp_gr.o	irp_ng.o	irp_pw.o
45
46IRSRESOBJS=	dns.o		gen_ho.o	lcl_ng.o	dns_gr.o \
47		gen_ng.o	lcl_nw.o	dns_ho.o	gen_nw.o \
48		lcl_pr.o	dns_nw.o	gen_pr.o	lcl_pw.o \
49		dns_pr.o	gen_pw.o	hesiod.o	lcl_sv.o \
50		nul_ng.o	dns_pw.o	gen_sv.o	irs_data.o \
51		util.o		dns_sv.o	lcl.o		gen.o \
52		gethostent.o	lcl_gr.o	gen_gr.o	lcl_ho.o \
53		gethostent_r.o	getaddrinfo.o
54
55IRSDYNOBJS=	nis_nw.o	nis_pr.o	nis_pw.o	nis_sv.o \
56		nis.o		nis_gr.o	nis_ho.o	nis_ng.o \
57		irp.o		irpmarshall.o	irp_ho.o	irp_nw.o \
58		irp_pr.o	irp_sv.o	irp_gr.o	irp_ng.o \
59		irp_pw.o	getnetent.o	getpwent_r.o	getgrent_r.o \
60		getservent_r.o	getnetent_r.o	getnetgrent_r.o	getgrent.o \
61		getnetgrent.o	getprotoent.o	getpwent.o	getservent.o \
62		getprotoent_r.o	getnameinfo.o	gai_strerror.o
63
64ISCOBJS=	base64.o	ev_files.o	ev_waits.o	logging.o \
65		bitncmp.o	ev_streams.o	eventlib.o	tree.o \
66		ev_connects.o	ev_timers.o	heap.o		assertions.o \
67		memcluster.o	ctl_p.o		ctl_clnt.o	ctl_srvr.o \
68		hex.o
69
70NAMESEROBJS=	ns_name.o	ns_netint.o	ns_parse.o	ns_print.o \
71		ns_ttl.o	ns_sign.o	ns_verify.o	ns_date.o \
72		ns_samedomain.o
73
74RESOLVOBJS=	herror.o	res_debug.o	res_data.o	res_comp.o \
75		res_init.o	res_mkquery.o	res_mkupdate.o	res_query.o \
76		res_send.o	res_update.o	res_sendsigned.o \
77		res_findzonecut.o
78
79SUNWOBJS=	sunw_mtctxres.o	sunw_dst_init.o	sunw_irs_init.o	sunw_updrec.o
80
81OBJECTS=	$(BSDOBJS) $(DSTOBJS) $(INETOBJS) $(IRSRESOBJS) $(ISCOBJS) \
82		$(NAMESEROBJS) $(RESOLVOBJS) $(SUNWOBJS)
83
84# include library definitions
85include ../../Makefile.lib
86
87# install this library in the root filesystem
88include ../../Makefile.rootfs
89
90MAPFILE=	$(MAPDIR)/mapfile
91MAPFILES=	$(MAPFILE) ../common/mapfile-vers
92MAPOPTS=	$(MAPFILES:%=-M%)
93
94SRCS=		$(BSDOBJS:%.o=../common/bsd/%.c) \
95		$(DSTOBJS:%.o=../common/dst/%.c) \
96		$(INETOBJS:%.o=../common/inet/%.c) \
97		$(IRSRESOBJS:%.o=../common/irs/%.c) \
98		$(ISCOBJS:%.o=../common/isc/%.c) \
99		$(NAMESEROBJS:%.o=../common/nameser/%.c) \
100		$(RESOLVOBJS:%.o=../common/resolv/%.c) \
101		$(SUNWOBJS:%.o=../common/sunw/%.c)
102
103LIBS =		$(DYNLIB) $(LINTLIB)
104
105$(LINTLIB):= 	SRCS = ../common/llib-lresolv
106
107# Local Libresolv definitions
108SOLCOMPAT =	-Dgethostbyname=res_gethostbyname \
109	-Dgethostbyaddr=res_gethostbyaddr -Dgetnetbyname=res_getnetbyname \
110	-Dgethostbyname2=res_gethostbyname2\
111	-Dgetnetbyaddr=res_getnetbyaddr -Dsethostent=res_sethostent \
112	-Dendhostent=res_endhostent -Dgethostent=res_gethostent \
113	-Dsetnetent=res_setnetent -Dendnetent=res_endnetent \
114	-Dgetnetent=res_getnetent -Dsocket=_socket \
115	-Dgetipnodebyname=res_getipnodebyname \
116	-Dgetipnodebyaddr=res_getipnodebyaddr \
117	-Dfreehostent=res_freehostent \
118	-Dgetaddrinfo=res_getaddrinfo \
119	-Dfreeaddrinfo=res_freeaddrinfo
120
121CRYPTFLAGS=	-DCYLINK_DSS -DHMAC_MD5 -DUSE_MD5 -DDNSSAFE
122
123LOCFLAGS +=	$(CRYPTFLAGS)
124LOCFLAGS +=	-D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \
125		$(SOLCOMPAT) -I../include -I../../common/inc
126
127CPPFLAGS +=	$(LOCFLAGS)
128DYNFLAGS +=	$(MAPOPTS) $(ZNODELETE)
129LDLIBS +=	-lsocket -lnsl -lc
130
131.KEEP_STATE:
132
133all:	$(LIBS)
134
135lint:	lintcheck
136
137$(DYNLIB):	$(MAPFILES)
138
139$(MAPFILE):
140	@cd $(MAPDIR); $(MAKE) mapfile
141
142# include library targets
143include ../../Makefile.targ
144
145pics/%.o: ../common/bsd/%.c
146	$(COMPILE.c) -o $@ $<
147	$(POST_PROCESS_O)
148
149pics/%.o: ../common/dst/%.c
150	$(COMPILE.c) -o $@ $<
151	$(POST_PROCESS_O)
152
153pics/%.o: ../common/inet/%.c
154	$(COMPILE.c) -o $@ $<
155	$(POST_PROCESS_O)
156
157pics/%.o: ../common/irs/%.c
158	$(COMPILE.c) -o $@ $<
159	$(POST_PROCESS_O)
160
161pics/%.o: ../common/isc/%.c
162	$(COMPILE.c) -o $@ $<
163	$(POST_PROCESS_O)
164
165pics/%.o: ../common/nameser/%.c
166	$(COMPILE.c) -o $@ $<
167	$(POST_PROCESS_O)
168
169pics/%.o: ../common/resolv/%.c
170	$(COMPILE.c) -o $@ $<
171	$(POST_PROCESS_O)
172
173pics/%.o: ../common/sunw/%.c
174	$(COMPILE.c) -o $@ $<
175	$(POST_PROCESS_O)
176
177# install rule for lint library target
178$(ROOTLINTDIR)/%:	../common/%
179	$(INS.file)
180