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