xref: /titanic_44/usr/src/lib/libresolv2/Makefile.com (revision b7f45089ccbe01bab3d7c7377b49d80d2ae18a69)
1#
2# Copyright 2005 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
126
127CPPFLAGS +=	$(LOCFLAGS)
128DYNFLAGS +=	$(MAPOPTS) $(ZNODELETE)
129LDLIBS +=	-lsocket -lnsl -lc
130
131.KEEP_STATE:
132
133lint:	lintcheck
134
135$(DYNLIB):	$(MAPFILES)
136
137$(MAPFILE):
138	@cd $(MAPDIR); $(MAKE) mapfile
139
140# include library targets
141include ../../Makefile.targ
142
143pics/%.o: ../common/bsd/%.c
144	$(COMPILE.c) -o $@ $<
145	$(POST_PROCESS_O)
146
147pics/%.o: ../common/dst/%.c
148	$(COMPILE.c) -o $@ $<
149	$(POST_PROCESS_O)
150
151pics/%.o: ../common/inet/%.c
152	$(COMPILE.c) -o $@ $<
153	$(POST_PROCESS_O)
154
155pics/%.o: ../common/irs/%.c
156	$(COMPILE.c) -o $@ $<
157	$(POST_PROCESS_O)
158
159pics/%.o: ../common/isc/%.c
160	$(COMPILE.c) -o $@ $<
161	$(POST_PROCESS_O)
162
163pics/%.o: ../common/nameser/%.c
164	$(COMPILE.c) -o $@ $<
165	$(POST_PROCESS_O)
166
167pics/%.o: ../common/resolv/%.c
168	$(COMPILE.c) -o $@ $<
169	$(POST_PROCESS_O)
170
171pics/%.o: ../common/sunw/%.c
172	$(COMPILE.c) -o $@ $<
173	$(POST_PROCESS_O)
174
175# install rule for lint library target
176$(ROOTLINTDIR)/%:	../common/%
177	$(INS.file)
178