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