xref: /titanic_41/usr/src/lib/libresolv/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/libresolv/Makefile
29#
30
31LIBRARY= libresolv.a
32VERS= .1
33
34PICS=   pics/res_comp.o pics/res_debug.o pics/res_init.o \
35	pics/res_mkquery.o pics/res_query.o pics/res_send.o \
36	pics/res_gethost.o pics/res_sethost.o
37
38pics/%.o: %.c
39	$(COMPILE.c) -o $@ $<
40	$(POST_PROCESS_O)
41
42OBJECTS= \
43res_gethost.o   res_comp.o      res_debug.o     res_init.o    res_mkquery.o  \
44res_query.o     res_send.o      res_sethost.o
45
46# include library definitions
47include ../Makefile.lib
48
49# install this library in the root filesystem
50include ../Makefile.rootfs
51
52SUBDIRS=	spec
53
54MAPDIR=		./spec/$(MACH)
55MAPFILE=	$(MAPDIR)/mapfile
56MAPFILES=	$(MAPFILE) mapfile-vers
57MAPOPTS=	$(MAPFILES:%=-M%)
58
59CLOBBERFILES +=	$(MAPFILE)
60
61C99MODE=	$(C99_DISABLE)
62
63# We really want to say this:
64#	CPPFLAGS += -DDEBUG -DSYSV -D_REENTRANT -I.
65# but some system header files are replaced by local versions
66# so we must put -I. ahead of the default include directories:
67CPPFLAGS = -I. $(CPPFLAGS.master) -DDEBUG -DSYSV -D_REENTRANT
68LDLIBS += -lsocket -lnsl -lc
69DYNFLAGS +=	$(MAPOPTS)
70
71ROOTDYNLIBS=	$(DYNLIB:%=$(ROOTLIBDIR)/%)
72
73all :=		TARGET= all
74clean :=	TARGET= clean
75clobber :=	TARGET= clobber
76delete :=	TARGET= delete
77install :=	TARGET= install
78lint :=		TARGET= lint
79catalog :=	TARGET= catalog
80package :=	TARGET= package
81
82.KEEP_STATE:
83
84LIBS = $(DYNLIB)
85
86all: $(SUBDIRS) $(LIBS)
87
88install: all $(ROOTDYNLIBS) $(SUBDIRS)
89
90lint: lintcheck
91
92clean clobber: $(SUBDIRS)
93
94spec: FRC
95	@cd $@; pwd; $(MAKE) $(TARGET)
96
97$(DYNLIB): $(MAPFILES)
98
99$(MAPFILE):
100	@cd $(MAPDIR); $(MAKE) mapfile
101
102# include library targets
103include ../Makefile.targ
104
105FRC:
106