xref: /illumos-gate/usr/src/lib/libsocket/Makefile.com (revision 6e91bba0d6c6bdabbba62cefae583715a4a58e2a)
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#
23# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27LIBRARY	=	libsocket.a
28VERS =		.1
29
30INETOBJS =	bindresvport.o bootparams_getbyname.o ether_addr.o \
31	   	getaddrinfo.o getnameinfo.o getnetent.o getnetent_r.o \
32		getprotoent.o getprotoent_r.o getservbyname_r.o getservent.o \
33		getservent_r.o inet_lnaof.o inet_mkaddr.o inet_network.o \
34		inet6_opt.o inet6_rthdr.o interface_id.o link_addr.o \
35		netmasks.o rcmd.o rexec.o ruserpass.o sourcefilter.o \
36		getifaddrs.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
55# Make string literals read-only to save memory.
56CFLAGS +=	$(XSTRCONST)
57CFLAGS64 +=	$(XSTRCONST)
58
59CPPFLAGS +=	-DSYSV -D_REENTRANT -I../../common/inc
60%/rcmd.o :=	CPPFLAGS += -DNIS
61
62.KEEP_STATE:
63
64all:
65
66lint:	lintcheck
67
68# libsocket build rules
69pics/%.o: ../inet/%.c
70	$(COMPILE.c) -o $@ $<
71	$(POST_PROCESS_O)
72
73pics/%.o: ../socket/%.c
74	$(COMPILE.c) -o $@ $<
75	$(POST_PROCESS_O)
76
77include ../../Makefile.targ
78