xref: /titanic_44/usr/src/ucblib/libucb/Makefile.com (revision 89b43686db1fe9681d80a7cf5662730cb9378cae)
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 (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25LIBRARY=	libucb.a
26VERS=		.1
27
28PORTSYSOBJS=		\
29	flock.o		\
30	getdtblsize.o	\
31	gethostid.o	\
32	gethostname.o	\
33	getpagesize.o	\
34	gettimeofday.o	\
35	killpg.o	\
36	mctl.o		\
37	reboot.o	\
38	setpgrp.o	\
39	wait3.o		\
40	wait4.o
41
42PORTSTDIOOBJS=		\
43	doprnt.o	\
44	fopen.o		\
45	fprintf.o	\
46	printf.o	\
47	sprintf.o	\
48	vfprintf.o	\
49	vprintf.o	\
50	vsprintf.o
51
52PORTGENOBJS=		\
53	_psignal.o	\
54	bcmp.o		\
55	bcopy.o		\
56	bzero.o		\
57	ftime.o		\
58	getwd.o		\
59	index.o		\
60	nice.o		\
61	nlist.o		\
62	psignal.o	\
63	rand.o		\
64	readdir.o	\
65	regex.o		\
66	rindex.o	\
67	scandir.o	\
68	setbuffer.o	\
69	siglist.o	\
70	statfs.o	\
71	times.o
72
73OBJECTS= $(SYSOBJS) $(PORTGENOBJS) $(PORTSYSOBJS) $(PORTSTDIOOBJS)
74
75# include library definitions
76include $(SRC)/lib/Makefile.lib
77
78ROOTLIBDIR=	$(ROOT)/usr/ucblib
79ROOTLIBDIR64=	$(ROOT)/usr/ucblib/$(MACH64)
80
81MAPFILES =	../port/mapfile-vers
82
83SRCS=		$(PORTGENOBJS:%.o=../port/gen/%.c) \
84		$(PORTSTDIOOBJS:%.o=../port/stdio/%.c) \
85		$(PORTSYSOBJS:%.o=../port/sys/%.c)
86
87LIBS = $(DYNLIB)
88
89CFLAGS	+=	$(CCVERBOSE)
90CFLAGS64 +=	$(CCVERBOSE)
91LDLIBS +=	-lelf -lc
92
93CPPFLAGS = -D$(MACH) -I$(SRC)/ucbhead -I../inc \
94		-I../../../lib/libc/inc $(CPPFLAGS.master)
95
96ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
97
98pics/%.o:= ASFLAGS += $(AS_PICFLAGS)
99
100# libc method of building an archive, using AT&T ordering
101BUILD.AR= $(RM) $@ ; \
102	$(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)`
103
104.KEEP_STATE:
105
106all: $(LIBS)
107
108lint: lintcheck
109
110pics/%.o: ../port/gen/%.c
111	$(COMPILE.c) -o $@ $<
112	$(POST_PROCESS_O)
113pics/%.o: ../port/stdio/%.c
114	$(COMPILE.c) -o $@ $<
115	$(POST_PROCESS_O)
116pics/%.o: ../port/sys/%.c
117	$(COMPILE.c) -o $@ $<
118	$(POST_PROCESS_O)
119
120# shared (sparc/sparcv9/i386/amd64) platform-specific rule
121pics/%.o: sys/%.c
122	$(COMPILE.c) -o $@ $<
123	$(POST_PROCESS_O)
124
125pics/%.o: ../$(MACH)/sys/%.s
126	$(BUILD.s)
127	$(POST_PROCESS_O)
128
129#
130# Include library targets
131#
132include $(SRC)/lib/Makefile.targ
133