xref: /illumos-gate/usr/src/ucblib/libucb/Makefile.com (revision 7ab4e62e3b5c454f248a38bec0d489e8f5543324)
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
96CERRWARN +=	-_gcc=-Wno-unused-variable
97CERRWARN +=	-_gcc=-Wno-parentheses
98CERRWARN +=	-_gcc=-Wno-char-subscripts
99CERRWARN +=	-_gcc=-Wno-uninitialized
100
101ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
102
103pics/%.o:= ASFLAGS += $(AS_PICFLAGS)
104
105# libc method of building an archive, using AT&T ordering
106BUILD.AR= $(RM) $@ ; \
107	$(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)`
108
109.KEEP_STATE:
110
111all: $(LIBS)
112
113lint: lintcheck
114
115pics/%.o: ../port/gen/%.c
116	$(COMPILE.c) -o $@ $<
117	$(POST_PROCESS_O)
118pics/%.o: ../port/stdio/%.c
119	$(COMPILE.c) -o $@ $<
120	$(POST_PROCESS_O)
121pics/%.o: ../port/sys/%.c
122	$(COMPILE.c) -o $@ $<
123	$(POST_PROCESS_O)
124
125# shared (sparc/sparcv9/i386/amd64) platform-specific rule
126pics/%.o: sys/%.c
127	$(COMPILE.c) -o $@ $<
128	$(POST_PROCESS_O)
129
130pics/%.o: ../$(MACH)/sys/%.s
131	$(BUILD.s)
132	$(POST_PROCESS_O)
133
134#
135# Include library targets
136#
137include $(SRC)/lib/Makefile.targ
138