Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
#
LIBCBASE=.
VERS= .1
# objects are grouped by source directory
# local objects
CRTOBJS= \
FPOBJS= \
I386FPOBJS= \
FPASMOBJS= \
_xtoll.o \
fpcw.o \
ATOMICOBJS= \
COMOBJS= \
bcmp.o \
bcopy.o \
bzero.o \
qsort.o \
strtol.o \
GENOBJS= \
_getsp.o \
abs.o \
alloca.o \
cache.o \
cuexit.o \
ecvt.o \
errlst.o \
lexp10.o \
llog10.o \
lock.o \
ltostr.o \
memchr.o \
memcmp.o \
memcpy.o \
memset.o \
setjmp.o \
strcmp.o \
strcpy.o \
strlen.o \
# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
# This macro should ALWAYS be empty; native APIs are already 'large file'.
COMSYSOBJS= \
__time.o \
_pset.o \
access.o \
acct.o \
acl.o \
alarm.o \
brk.o \
chdir.o \
chmod.o \
chown.o \
chroot.o \
cladm.o \
close.o \
creat.o \
dup.o \
execve.o \
exit.o \
facl.o \
fchdir.o \
fchmod.o \
fchown.o \
fdsync.o \
fstat.o \
getgid.o \
getmsg.o \
getpid.o \
getuid.o \
gtty.o \
ioctl.o \
kaio.o \
kill.o \
lchown.o \
link.o \
llseek.o \
lseek.o \
lstat.o \
mkdir.o \
mknod.o \
mmap.o \
modctl.o \
mount.o \
munmap.o \
nice.o \
open.o \
pause.o \
pread.o \
profil.o \
putmsg.o \
pwrite.o \
read.o \
readv.o \
rmdir.o \
setgid.o \
setuid.o \
stat.o \
statfs.o \
stty.o \
sync.o \
sysfs.o \
syslwp.o \
times.o \
ulimit.o \
umask.o \
unlink.o \
utime.o \
utimes.o \
utssys.o \
waitid.o \
write.o \
writev.o \
SYSOBJS= \
door.o \
fork1.o \
fxstat.o \
lxstat.o \
nuname.o \
pipe.o \
sysi86.o \
uadmin.o \
umount.o \
uname.o \
vfork.o \
xmknod.o \
# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
# This macro should ALWAYS be empty; native APIs are already 'large file'.
# objects from source under ../port
PORTFP= \
finite.o \
sigfpe.o \
PORTGEN= \
_xftw.o \
a64l.o \
abort.o \
addsev.o \
assert.o \
atof.o \
atoi.o \
atol.o \
atoll.o \
atexit.o \
atfork.o \
calloc.o \
cfree.o \
cftime.o \
clock.o \
crypt.o \
ctime.o \
div.o \
dup2.o \
errno.o \
euclen.o \
execvp.o \
ffs.o \
fmtmsg.o \
ftime.o \
ftok.o \
ftw.o \
gcvt.o \
getcwd.o \
getenv.o \
gethz.o \
getopt.o \
getpw.o \
gettxt.o \
getut.o \
getutx.o \
getwd.o \
gtxt.o \
iconv.o \
index.o \
insque.o \
isatty.o \
killpg.o \
l64a.o \
lfind.o \
lfmt.o \
llabs.o \
lldiv.o \
lmath.o \
malloc.o \
mkdev.o \
mkfifo.o \
mktemp.o \
mlock.o \
mon.o \
msync.o \
ndbm.o \
nftw.o \
perror.o \
pfmt.o \
plock.o \
poll.o \
pt.o \
raise.o \
rand.o \
random.o \
reboot.o \
rename.o \
rindex.o \
select.o \
stack.o \
strcat.o \
strchr.o \
strdup.o \
strspn.o \
strstr.o \
strtod.o \
strtok.o \
swab.o \
syslog.o \
tcflow.o \
tell.o \
tfind.o \
ualarm.o \
ucred.o \
valloc.o \
vlfmt.o \
vpfmt.o \
wait3.o \
wait4.o \
wdata.o \
xpg4.o \
PORTPRINT_W= \
PORTPRINT= \
doprnt.o \
printf.o \
# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
# This macro should ALWAYS be empty; native APIs are already 'large file'.
PORTSTDIO_W= \
PORTSTDIO= \
data.o \
doscan.o \
fdopen.o \
feof.o \
ferror.o \
fgetc.o \
fgets.o \
fileno.o \
flockf.o \
flush.o \
fopen.o \
fpos.o \
fputc.o \
fputs.o \
fread.o \
fseek.o \
fseeko.o \
ftell.o \
ftello.o \
fwrite.o \
getc.o \
gets.o \
getw.o \
mse.o \
popen.o \
putc.o \
puts.o \
putw.o \
rewind.o \
scanf.o \
setbuf.o \
system.o \
ungetc.o \
vscanf.o \
PORTI18N= \
putws.o \
wcsstr.o \
wcstol.o \
wcswcs.o \
wscat.o \
wschr.o \
wscmp.o \
wscpy.o \
wscspn.o \
wsdup.o \
wslen.o \
wsncat.o \
wsncmp.o \
wsncpy.o \
wspbrk.o \
wsrchr.o \
wsspn.o \
wstod.o \
wstok.o \
wstol.o \
wstoll.o \
wsxfrm.o \
_ctype.o \
THREADSOBJS= \
alloc.o \
cancel.o \
rwlock.o \
scalls.o \
sema.o \
spawn.o \
synch.o \
thr.o \
tls.o \
# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
# This macro should ALWAYS be empty; native APIs are already 'large file'.
PORTSYS= \
execl.o \
execle.o \
execv.o \
fcntl.o \
fsmisc.o \
fsync.o \
lockf.o \
lwp.o \
msgsys.o \
nfssys.o \
openat.o \
ppriv.o \
sbrk.o \
semsys.o \
shmsys.o \
signal.o \
time.o \
ustat.o \
PORTREGEX= \
glob.o \
regcmp.o \
regex.o \
MOSTOBJS= \
$(STRETS) \
$(CRTOBJS) \
$(DYNOBJS) \
$(FPOBJS) \
$(I386FPOBJS) \
$(FPASMOBJS) \
$(ATOMICOBJS) \
$(COMOBJS) \
$(GENOBJS) \
$(PORTFP) \
$(PORTGEN) \
$(PORTGEN64) \
$(PORTI18N) \
$(PORTI18N_COND) \
$(PORTPRINT) \
$(PORTPRINT_W) \
$(PORTREGEX) \
$(PORTSTDIO) \
$(PORTSTDIO64) \
$(PORTSTDIO_W) \
$(PORTSYS) \
$(PORTSYS64) \
$(THREADSOBJS) \
$(THREADSMACHOBJS) \
$(THREADSASMOBJS) \
$(UNWINDMACHOBJS) \
$(UNWINDASMOBJS) \
$(COMSYSOBJS) \
$(SYSOBJS) \
$(COMSYSOBJS64) \
$(SYSOBJS64)
TRACEOBJS= \
# This must be done because otherwise the Sun C compiler would insert
# its own versions of these modules and those versions contain code
# to call out to C++ initialization functions. Such C++ initialization
# functions can call back into libc before thread initialization is
# complete and this leads to segmentation violations and other problems.
# Since libc contains no C++ code, linking with the minimal crti.o and
# crtn.o modules is safe and avoids the problems described above.
# these aren't listed as $(PICS), so we need to force CTF
# include common library definitions
include ../../Makefile.lib
# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation
# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
# need to be compatible with the ones for the libc stuff. Whenever the changes
# that affect the compilation conditions of libc happened, those for libc_i18n
# also need to be updated.
# This is necessary to avoid problems with calling _ex_unwind().
# We probably don't want any inlining anyway.
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
CFLAGS64 += $(THREAD_DEBUG)
# Inform the run-time linker about libc specialized initialization
# Override this top level flag so the compiler builds in its native
# C99 mode. This has been enabled to support the complex arithmetic
# added to libc.
C99MODE= $(C99_ENABLE)
# libc method of building an archive
# extra files for the clean target
CLEANFILES= \
assym.h \
genassym \
$(ALTPICS)
# list of C source for lint
SRCS= \
$(THREADSOBJS:%.o=../port/threads/%.c) \
$(THREADSMACHOBJS:%.o=threads/%.c) \
$(UNWINDMACHOBJS:%.o=unwind/%.c) \
$(I386FPOBJS:%.o=../i386/fp/%.c) \
# conditional assignments
# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o
$(MAPFILE):
# Files which need the threads .il inline template
TIL= \
alloc.o \
atexit.o \
atfork.o \
cancel.o \
errno.o \
lwp.o \
rand.o \
rwlock.o \
scalls.o \
sema.o \
spawn.o \
stack.o \
synch.o \
thr.o \
tls.o \
# large-file-aware components that should be built large
#$(COMSYSOBJS64:%=pics/%) := \
# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#$(SYSOBJS64:%=pics/%) := \
# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#$(PORTGEN64:%=pics/%) := \
# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#$(PORTSTDIO64:%=pics/%) := \
# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#$(PORTSYS64:%=pics/%) := \
# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(PORTSTDIO_W:%=pics/%) := \
$(PORTPRINT_W:%=pics/%) := \
$(PORTPRINT_C89:%=pics/%) := \
$(PORTSTDIO_C89:%=pics/%) := \
$(PORTI18N_COND:%=pics/%) := \
lint:
# object files that depend on inline template
# include common libc targets
# We need to strip out all CTF data from the static library
$(BUILD.AR)
$(ASSYMDEP_OBJS:%=pics/%): assym.h
# assym.h build rules
# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and
# live in Makefile.master
genassym: $(GENASSYM_C)
$(OFFSETS_CREATE) <$(OFFSETS) >$@
./genassym >>$@
# derived C source and related explicit dependencies