xref: /titanic_44/usr/src/ucblib/libucb/Makefile.com (revision 5bbb4db2c3f208d12bf0fd11769728f9e5ba66a2)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*5bbb4db2SGarrett D'Amore# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateLIBRARY=	libucb.a
277c478bd9Sstevel@tonic-gateVERS=		.1
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gatePORTSYSOBJS=		\
307c478bd9Sstevel@tonic-gate	flock.o		\
317c478bd9Sstevel@tonic-gate	getdtblsize.o	\
327c478bd9Sstevel@tonic-gate	gethostid.o	\
337c478bd9Sstevel@tonic-gate	gethostname.o	\
347c478bd9Sstevel@tonic-gate	getpagesize.o	\
357c478bd9Sstevel@tonic-gate	gettimeofday.o	\
367c478bd9Sstevel@tonic-gate	killpg.o	\
377c478bd9Sstevel@tonic-gate	mctl.o		\
387c478bd9Sstevel@tonic-gate	reboot.o	\
397c478bd9Sstevel@tonic-gate	setpgrp.o	\
407c478bd9Sstevel@tonic-gate	wait3.o		\
417c478bd9Sstevel@tonic-gate	wait4.o
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gatePORTSTDIOOBJS=		\
447c478bd9Sstevel@tonic-gate	doprnt.o	\
457c478bd9Sstevel@tonic-gate	fopen.o		\
467c478bd9Sstevel@tonic-gate	fprintf.o	\
477c478bd9Sstevel@tonic-gate	printf.o	\
487c478bd9Sstevel@tonic-gate	sprintf.o	\
497c478bd9Sstevel@tonic-gate	vfprintf.o	\
507c478bd9Sstevel@tonic-gate	vprintf.o	\
517c478bd9Sstevel@tonic-gate	vsprintf.o
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gatePORTGENOBJS=		\
547c478bd9Sstevel@tonic-gate	_psignal.o	\
557c478bd9Sstevel@tonic-gate	bcmp.o		\
567c478bd9Sstevel@tonic-gate	bcopy.o		\
577c478bd9Sstevel@tonic-gate	bzero.o		\
587c478bd9Sstevel@tonic-gate	ftime.o		\
597c478bd9Sstevel@tonic-gate	getwd.o		\
607c478bd9Sstevel@tonic-gate	index.o		\
617c478bd9Sstevel@tonic-gate	nice.o		\
627c478bd9Sstevel@tonic-gate	nlist.o		\
637c478bd9Sstevel@tonic-gate	psignal.o	\
647c478bd9Sstevel@tonic-gate	rand.o		\
657c478bd9Sstevel@tonic-gate	readdir.o	\
667c478bd9Sstevel@tonic-gate	regex.o		\
677c478bd9Sstevel@tonic-gate	rindex.o	\
687c478bd9Sstevel@tonic-gate	scandir.o	\
697c478bd9Sstevel@tonic-gate	setbuffer.o	\
707c478bd9Sstevel@tonic-gate	siglist.o	\
717c478bd9Sstevel@tonic-gate	statfs.o	\
727c478bd9Sstevel@tonic-gate	times.o
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gateOBJECTS= $(SYSOBJS) $(PORTGENOBJS) $(PORTSYSOBJS) $(PORTSTDIOOBJS)
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate# include library definitions
777c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.lib
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateROOTLIBDIR=	$(ROOT)/usr/ucblib
807c478bd9Sstevel@tonic-gateROOTLIBDIR64=	$(ROOT)/usr/ucblib/$(MACH64)
817c478bd9Sstevel@tonic-gate
82f808c858SrafMAPFILES =	../port/mapfile-vers mapfile-vers
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateSRCS=		$(PORTGENOBJS:%.o=../port/gen/%.c) \
857c478bd9Sstevel@tonic-gate		$(PORTSTDIOOBJS:%.o=../port/stdio/%.c) \
867c478bd9Sstevel@tonic-gate		$(PORTSYSOBJS:%.o=../port/sys/%.c)
877c478bd9Sstevel@tonic-gate
88*5bbb4db2SGarrett D'AmoreLIBS = $(DYNLIB)
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateCFLAGS	+=	$(CCVERBOSE)
917c478bd9Sstevel@tonic-gateCFLAGS64 +=	$(CCVERBOSE)
927c478bd9Sstevel@tonic-gateLDLIBS +=	-lelf -lc
937c478bd9Sstevel@tonic-gate
94*5bbb4db2SGarrett D'AmoreCPPFLAGS = -D$(MACH) -I$(SRC)/ucbhead -I../inc \
957c478bd9Sstevel@tonic-gate		-I../../../lib/libc/inc $(CPPFLAGS.master)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gatepics/%.o:= ASFLAGS += $(AS_PICFLAGS)
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gate# libc method of building an archive, using AT&T ordering
1027c478bd9Sstevel@tonic-gateBUILD.AR= $(RM) $@ ; \
1037c478bd9Sstevel@tonic-gate	$(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)`
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate.KEEP_STATE:
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gateall: $(LIBS)
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gatelint: lintcheck
1107c478bd9Sstevel@tonic-gate
111f808c858Srafpics/%.o: ../port/gen/%.c
1127c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1137c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
114f808c858Srafpics/%.o: ../port/stdio/%.c
1157c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1167c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
117f808c858Srafpics/%.o: ../port/sys/%.c
1187c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1197c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gate# shared (sparc/sparcv9/i386/amd64) platform-specific rule
122f808c858Srafpics/%.o: sys/%.c
1237c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1247c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1257c478bd9Sstevel@tonic-gate
126f808c858Srafpics/%.o: ../$(MACH)/sys/%.s
1277c478bd9Sstevel@tonic-gate	$(BUILD.s)
1287c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate#
1317c478bd9Sstevel@tonic-gate# Include library targets
1327c478bd9Sstevel@tonic-gate#
1337c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
134