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