xref: /titanic_52/usr/src/lib/libsocket/Makefile.com (revision af3025fd013117424096c94bd9e116ecc538cc6b)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY	=	libsocket.a
29VERS =		.1
30
31INETOBJS =	bindresvport.o bootparams_getbyname.o ether_addr.o \
32	   	getaddrinfo.o getnameinfo.o getnetent.o getnetent_r.o \
33		getprotoent.o getprotoent_r.o getservbyname_r.o getservent.o \
34		getservent_r.o inet_lnaof.o inet_mkaddr.o inet_network.o \
35		inet6_opt.o inet6_rthdr.o interface_id.o link_addr.o \
36		netmasks.o rcmd.o rexec.o ruserpass.o sourcefilter.o
37SOCKOBJS =	_soutil.o sockatmark.o socket.o socketpair.o weaks.o
38OBJECTS	=	$(INETOBJS) $(SOCKOBJS)
39
40include ../../Makefile.lib
41
42# install this library in the root filesystem
43include ../../Makefile.rootfs
44
45LIBS =		$(DYNLIB) $(LINTLIB)
46
47SRCS =		$(INETOBJS:%.o=../inet/%.c) $(SOCKOBJS:%.o=../socket/%.c)
48LDLIBS +=	-lnsl -lc
49
50SRCDIR =	../common
51$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
52
53MAPFILES +=	mapfile-vers
54
55CPPFLAGS +=	-DSYSV -D_REENTRANT -I../../common/inc
56%/rcmd.o :=	CPPFLAGS += -DNIS
57
58.KEEP_STATE:
59
60all:
61
62lint:	lintcheck
63
64# libsocket build rules
65pics/%.o: ../inet/%.c
66	$(COMPILE.c) -o $@ $<
67	$(POST_PROCESS_O)
68
69pics/%.o: ../socket/%.c
70	$(COMPILE.c) -o $@ $<
71	$(POST_PROCESS_O)
72
73include ../../Makefile.targ
74