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 # Copyright (c) 2018, Joyent, Inc. 25 26 LIBRARY= libucb.a 27 VERS= .1 28 29 PORTSYSOBJS= \ 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 43 PORTSTDIOOBJS= \ 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 53 PORTGENOBJS= \ 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 74 OBJECTS= $(SYSOBJS) $(PORTGENOBJS) $(PORTSYSOBJS) $(PORTSTDIOOBJS) 75 76 # include library definitions 77 include $(SRC)/lib/Makefile.lib 78 79 ROOTLIBDIR= $(ROOT)/usr/ucblib 80 ROOTLIBDIR64= $(ROOT)/usr/ucblib/$(MACH64) 81 82 MAPFILES = ../port/mapfile-vers 83 84 SRCS= $(PORTGENOBJS:%.o=../port/gen/%.c) \ 85 $(PORTSTDIOOBJS:%.o=../port/stdio/%.c) \ 86 $(PORTSYSOBJS:%.o=../port/sys/%.c) 87 88 LIBS = $(DYNLIB) 89 90 CFLAGS += $(CCVERBOSE) 91 CFLAGS64 += $(CCVERBOSE) 92 LDLIBS += -lelf -lc 93 94 CPPFLAGS = -D$(MACH) -I$(SRC)/ucbhead -I../inc \ 95 -I../../../lib/libc/inc $(CPPFLAGS.master) 96 97 CERRWARN += -_gcc=-Wno-unused-variable 98 CERRWARN += -_gcc=-Wno-parentheses 99 CERRWARN += -_gcc=-Wno-char-subscripts 100 CERRWARN += -_gcc=-Wno-uninitialized 101 102 # not linted 103 SMATCH=off 104 105 ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS) 106 107 pics/%.o:= ASFLAGS += $(AS_PICFLAGS) 108 109 # libc method of building an archive, using AT&T ordering 110 BUILD.AR= $(RM) $@ ; \ 111 $(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)` 112 113 .KEEP_STATE: 114 115 all: $(LIBS) 116 117 lint: lintcheck 118 119 pics/%.o: ../port/gen/%.c 120 $(COMPILE.c) -o $@ $< 121 $(POST_PROCESS_O) 122 pics/%.o: ../port/stdio/%.c 123 $(COMPILE.c) -o $@ $< 124 $(POST_PROCESS_O) 125 pics/%.o: ../port/sys/%.c 126 $(COMPILE.c) -o $@ $< 127 $(POST_PROCESS_O) 128 129 # shared (sparc/sparcv9/i386/amd64) platform-specific rule 130 pics/%.o: sys/%.c 131 $(COMPILE.c) -o $@ $< 132 $(POST_PROCESS_O) 133 134 pics/%.o: ../$(MACH)/sys/%.s 135 $(BUILD.s) 136 $(POST_PROCESS_O) 137 138 # 139 # Include library targets 140 # 141 include $(SRC)/lib/Makefile.targ