10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 52522Sraf# Common Development and Distribution License (the "License"). 62522Sraf# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 2212788Sgary.winiger@oracle.com# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. 230Sstevel@tonic-gate# 242522Sraf 252522Sraf# 260Sstevel@tonic-gate# This builds all objects needed for libbc. 270Sstevel@tonic-gate# 280Sstevel@tonic-gate 290Sstevel@tonic-gateLIBRARY= libc.a 300Sstevel@tonic-gate# Default rules in ../../Makefile.targ not used. 310Sstevel@tonic-gateVERS= bogus 320Sstevel@tonic-gateDYNLIB4X= libc.so.1.9 330Sstevel@tonic-gateDYNLIBS5= libc.so.2.9 340Sstevel@tonic-gate#DYNLIBS5 is also defined in ../Makefile 350Sstevel@tonic-gate 360Sstevel@tonic-gateM4= m4 370Sstevel@tonic-gateECHO= echo 380Sstevel@tonic-gate 390Sstevel@tonic-gate# objects are grouped by source directory. 400Sstevel@tonic-gate 410Sstevel@tonic-gateCOMPATCOM= \ 420Sstevel@tonic-gategtty.o lockf.o pause.o stty.o tell.o ulimit.o \ 430Sstevel@tonic-gateutime.o 440Sstevel@tonic-gate 450Sstevel@tonic-gateCOMPAT4.1=\ 460Sstevel@tonic-gateftime.o nice.o rand.o vlimit.o vtimes.o getpw.o times.o 470Sstevel@tonic-gate 480Sstevel@tonic-gateCOMPATSYS5=\ 490Sstevel@tonic-gatenice.o rand.o getpw.o times.o 500Sstevel@tonic-gate 510Sstevel@tonic-gateCRTSPARC =\ 520Sstevel@tonic-gate_ftou.o misalign.o ptr_call.o \ 530Sstevel@tonic-gatestart_float.o \ 540Sstevel@tonic-gatealloc_pbuf.o mon.o muldiv.o 550Sstevel@tonic-gate 560Sstevel@tonic-gateGENCOM=\ 570Sstevel@tonic-gate_crypt.o _nlist.o _perror.o _psignal.o a64l.o abs.o alarm.o\ 580Sstevel@tonic-gateasctime.o atof.o atoi.o atol.o bcmp.o bsearch.o\ 590Sstevel@tonic-gateclock.o closedir.o crypt.o ctime.o ctype_.o\ 600Sstevel@tonic-gatedrand48.o dysize.o errlst.o execvp.o exit.o exportent.o ecvt.o\ 610Sstevel@tonic-gatefabs.o fmod.o frexp.o\ 62*12918SJan.Friedel@Sun.COMfstab.o ftok.o ftw.o getauid.o getauditflags.o \ 6312788Sgary.winiger@oracle.comgetcwd.o getenv.o getgraent.o getlogin.o \ 640Sstevel@tonic-gategetopt.o getsubopt.o getpwaent.o getttyent.o\ 650Sstevel@tonic-gategetttynam.o getusershell.o grpauth.o hsearch.o\ 660Sstevel@tonic-gateieee_globals.o index.o isatty.o \ 670Sstevel@tonic-gateissecure.o jcsetpgrp.o\ 680Sstevel@tonic-gatel64a.o labeltostring.o ldexp.o lfind.o lsearch.o\ 690Sstevel@tonic-gatemadvise.o mallopt.o \ 700Sstevel@tonic-gateeuc.multibyte.o iso.multibyte.o xccs.multibyte.o \ 710Sstevel@tonic-gatemblib.o mbstowcs.o mbtowc.o wcstombs.o wctomb.o \ 720Sstevel@tonic-gatememalign.o memccpy.o memchr.o memcmp.o\ 730Sstevel@tonic-gatemkstemp.o mktemp.o mlock.o mlockall.o\ 740Sstevel@tonic-gatemntent.o modf.o msync.o munlock.o munlockall.o\ 750Sstevel@tonic-gatenl_cxtime.o nl_strncmp.o ndbm.o on_exit.o\ 760Sstevel@tonic-gateopendir.o optind.o perror.o plock.o \ 770Sstevel@tonic-gateposix_sig.o posix_tty.o popen.o psignal.o putenv.o \ 780Sstevel@tonic-gatepwdauth.o pwdnm.o qsort.o\ 790Sstevel@tonic-gaterandom.o readdir.o realpath.o regex.o rindex.o scandir.o seekdir.o\ 800Sstevel@tonic-gatesetlocale.o setregid.o setreuid.o setrgid.o setruid.o sigfpe.o siglist.o\ 810Sstevel@tonic-gatessignal.o strchr.o stricmp.o \ 820Sstevel@tonic-gatestrftime.o strncat.o \ 830Sstevel@tonic-gatestrpbrk.o strptime.o strrchr.o strspn.o strstr.o \ 840Sstevel@tonic-gatestrtod.o strtok.o strtol.o swab.o syslog.o\ 850Sstevel@tonic-gatetelldir.o tfind.o time.o tsearch.o \ 860Sstevel@tonic-gateualarm.o usleep.o valloc.o string_decim.o \ 870Sstevel@tonic-gatefile_decim.o func_decim.o econvert.o seconvert.o gconvert.o \ 880Sstevel@tonic-gatedecimal_bin.o float_decim.o double_decim.o \ 890Sstevel@tonic-gatepack_float.o _unpack_dble.o unpack_float.o \ 900Sstevel@tonic-gate_base_S.o _base_il.o _base_sup.o _big_power.o _small_power.o \ 910Sstevel@tonic-gate_sprintf_sup.o _times_power.o qeconvert.o \ 920Sstevel@tonic-gate_Q_neg.o _Q_add.o _Q_sub.o _Q_mul.o _Q_div.o _Q_cmp.o \ 930Sstevel@tonic-gate_Q_cmpe.o _Q_stoq.o _Q_dtoq.o _Q_itoq.o _Q_utoq.o _Q_qtos.o _Q_qtod.o \ 940Sstevel@tonic-gate_Q_qtoi.o _Q_qtou.o _Q_sqrt.o _Qfaddsub.o _Qfcompare.o _Qfdiv.o \ 950Sstevel@tonic-gate_Qfmul.o _Qfpack.o _Qfunpack.o _Qfutility.o _Q_fcc.o _Q_get_rp_rd.o \ 960Sstevel@tonic-gatecalloc.o malloc.o \ 970Sstevel@tonic-gategetpass.o localtime.o ttyslot.o 980Sstevel@tonic-gate 990Sstevel@tonic-gateGENCOMSPARC=\ 1000Sstevel@tonic-gatealloca.o ffs.o insque.o remque.o isinf.o base_conv.o 1010Sstevel@tonic-gate 1020Sstevel@tonic-gateGEN4.2=\ 1030Sstevel@tonic-gatenlist.o timezone.o sleep.o system.o 1040Sstevel@tonic-gate 1050Sstevel@tonic-gateGENSYS5=\ 1060Sstevel@tonic-gateassert.o nlist.o sgetl.o sleep.o sputl.o system.o \ 1070Sstevel@tonic-gatesighold.o 1080Sstevel@tonic-gate 1090Sstevel@tonic-gateSTDIOCOM=\ 1100Sstevel@tonic-gateclrerr.o ctermid.o cuserid.o doprnt.o doscan.o fdopen.o \ 1110Sstevel@tonic-gatefeof.o ferror.o fgetc.o fgets.o fileno.o findiop.o \ 1120Sstevel@tonic-gatefputc.o fputs.o fread.o fseek.o ftell.o \ 1130Sstevel@tonic-gatefwrite.o getc.o getchar.o gets.o getw.o iob.o \ 1140Sstevel@tonic-gateputc.o putchar.o puts.o putw.o remove.o \ 1150Sstevel@tonic-gaterew.o scanf.o setbuffer.o setvbuf.o tmpnam.o tempnam.o \ 1160Sstevel@tonic-gatetmpfile.o ungetc.o 1170Sstevel@tonic-gate 1180Sstevel@tonic-gateSTDIO4.2=\ 1190Sstevel@tonic-gatefilbuf.o fopen.o fprintf.o printf.o flsbuf.o setbuf.o \ 1200Sstevel@tonic-gatesprintf.o vfprintf.o vprintf.o vsprintf.o 1210Sstevel@tonic-gate 1220Sstevel@tonic-gateSTDIOSYS5=\ 1230Sstevel@tonic-gatefilbuf.o fopen.o fprintf.o flsbuf.o printf.o setbuf.o \ 1240Sstevel@tonic-gatesprintf.o vfprintf.o vprintf.o vsprintf.o 1250Sstevel@tonic-gate 1260Sstevel@tonic-gateSYSCOM=\ 1270Sstevel@tonic-gate_access.o acct.o adjtime.o close.o _creat.o dup.o dup2.o \ 12812789SRoger.Faulkner@Oracle.COMfchdir.o fchroot.o \ 1290Sstevel@tonic-gatefdlist.o flock.o fpathconf.o fsync.o ftruncate.o getdents.o \ 1300Sstevel@tonic-gategetdtablesize.o getgid.o getitimer.o getpid.o gettimeofday.o \ 1310Sstevel@tonic-gategetuid.o ioctl.o kill.o lseek.o mincore.o mprotect.o munmap.o\ 13211798SRoger.Faulkner@Sun.COM_open.o profil.o setitimer.o \ 1330Sstevel@tonic-gaterlimit.o _statfs.o sync.o umask.o uname.o\ 1340Sstevel@tonic-gateexecl.o execle.o execv.o mkfifo.o msgsys.o\ 1350Sstevel@tonic-gatepathconf.o semsys.o shmsys.o unmount.o wait.o setuid.o\ 13611798SRoger.Faulkner@Sun.COMsetgid.o _stat.o seteuid.o setegid.o signalmap.o syscall.o \ 1370Sstevel@tonic-gatemaperror.o sigsetjmp.o accept.o bind.o connect.o getpeername.o \ 1380Sstevel@tonic-gategetsockname.o getsockopt.o listen.o recv.o send.o \ 1390Sstevel@tonic-gatesetsockopt.o shutdown.o socket.o socketpair.o setsid.o sigaction.o 1400Sstevel@tonic-gate 1410Sstevel@tonic-gateSYSCOMSPARC=\ 1420Sstevel@tonic-gate_exit.o brk.o cerror.o errno.o \ 1430Sstevel@tonic-gategetegid.o geteuid.o getppid.o mmap.o pipe.o putmsg.o \ 1440Sstevel@tonic-gatesbrk.o _syscall.o getmsg.o _read.o _write.o \ 1450Sstevel@tonic-gate_readv.o _writev.o sendsig.o 1460Sstevel@tonic-gate 1470Sstevel@tonic-gateSYS4.2=\ 1480Sstevel@tonic-gateaccess.o chdir.o chmod.o chown.o chroot.o \ 1490Sstevel@tonic-gatecreat.o execve.o getpgrp.o link.o mkdir.o \ 1500Sstevel@tonic-gatemknod.o open.o readlink.o rename.o rmdir.o \ 1510Sstevel@tonic-gatesetpgrp.o stat.o symlink.o truncate.o unlink.o \ 1520Sstevel@tonic-gatestatfs.o fcntl.o read.o write.o readv.o \ 1530Sstevel@tonic-gatewritev.o setjmp.o mount.o 1540Sstevel@tonic-gate 1550Sstevel@tonic-gateSYS4.2SPARC=\ 1560Sstevel@tonic-gategetgroups.o setgroups.o 1570Sstevel@tonic-gate 1580Sstevel@tonic-gateSYSSYS5=\ 1590Sstevel@tonic-gateaccess.o chdir.o chmod.o chown.o chroot.o \ 1600Sstevel@tonic-gatecreat.o execve.o getgroups.o getpgrp.o link.o \ 1610Sstevel@tonic-gatemkdir.o mknod.o open.o readlink.o rename.o \ 1620Sstevel@tonic-gatermdir.o setgroups.o setpgrp.o stat.o statfs.o \ 1630Sstevel@tonic-gatestime.o symlink.o truncate.o unlink.o fcntl.o \ 1640Sstevel@tonic-gateread.o write.o readv.o writev.o setjmp.o \ 1650Sstevel@tonic-gatemount.o 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate#SSYSSPARC=\ 1680Sstevel@tonic-gate#_getpgrp.o _kill.o _lseek.o _mknod.o _mount.o _setpgrp.o \ 1690Sstevel@tonic-gate#umount.o 1700Sstevel@tonic-gate 1710Sstevel@tonic-gateINET=\ 1720Sstevel@tonic-gateinet_addr.o inet_lnaof.o inet_makeaddr.o inet_netof.o \ 1730Sstevel@tonic-gateinet_network.o inet_ntoa.o 1740Sstevel@tonic-gate 1750Sstevel@tonic-gateNET=\ 1760Sstevel@tonic-gateether_addr.o bindresvport.o getrpcport.o rcmd.o \ 1770Sstevel@tonic-gaterexec.o ruserpass.o authunix.o 1780Sstevel@tonic-gate 1790Sstevel@tonic-gateNETSPARC= htonl.o htons.o ntohl.o ntohs.o 1800Sstevel@tonic-gate 1810Sstevel@tonic-gateYP= yp_bind.o 1820Sstevel@tonic-gate 1830Sstevel@tonic-gateYP= yp_bind.o 1840Sstevel@tonic-gatePSEUDO_SRCS= adjtime.s fchdir.s \ 18512789SRoger.Faulkner@Oracle.COMfchroot.s \ 1860Sstevel@tonic-gatefpathconf.s getitimer.s getpid.s \ 1870Sstevel@tonic-gatemincore.s mprotect.s munmap.s \ 1880Sstevel@tonic-gateprofil.s setitimer.s \ 1890Sstevel@tonic-gatesync.s sysconf.s umask.s ustat.s \ 19011798SRoger.Faulkner@Sun.COMacct.s stime.s 1910Sstevel@tonic-gate 1920Sstevel@tonic-gate# 1930Sstevel@tonic-gate# libbc build rules 1940Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/compat/common/%.c 1950Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1960Sstevel@tonic-gate $(POST_PROCESS_O) 1970Sstevel@tonic-gate 1980Sstevel@tonic-gatepics/%.o : ../libc/compat/4.1/%.c 1990Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2000Sstevel@tonic-gate $(POST_PROCESS_O) 2010Sstevel@tonic-gate 2020Sstevel@tonic-gates5pics/%.o : ../libc/compat/sys5/%.c 2030Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2040Sstevel@tonic-gate $(POST_PROCESS_O) 2050Sstevel@tonic-gate 2060Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/crt/sparc/%.s 2070Sstevel@tonic-gate $(BUILD.s) 2080Sstevel@tonic-gate $(POST_PROCESS_O) 2090Sstevel@tonic-gate 2100Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/crt/sparc/%.c 2110Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2120Sstevel@tonic-gate $(POST_PROCESS_O) 2130Sstevel@tonic-gate 2140Sstevel@tonic-gatepics/%.o s5pics/%.o : ../csu/common/%.c 2150Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2160Sstevel@tonic-gate $(POST_PROCESS_O) 2170Sstevel@tonic-gate 2180Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/%.S 2190Sstevel@tonic-gate $(BUILD.s) 2200Sstevel@tonic-gate $(POST_PROCESS_O) 2210Sstevel@tonic-gate 2220Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/%.c 2230Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2240Sstevel@tonic-gate $(POST_PROCESS_O) 2250Sstevel@tonic-gate 2260Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.s 2270Sstevel@tonic-gate $(BUILD.s) 2280Sstevel@tonic-gate $(POST_PROCESS_O) 2290Sstevel@tonic-gate 2300Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.c 2310Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2320Sstevel@tonic-gate $(POST_PROCESS_O) 2330Sstevel@tonic-gate 2340Sstevel@tonic-gatepics/%.o : ../libc/gen/4.2/%.c 2350Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2360Sstevel@tonic-gate $(POST_PROCESS_O) 2370Sstevel@tonic-gate 2380Sstevel@tonic-gates5pics/%.o : ../libc/gen/sys5/%.c 2390Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2400Sstevel@tonic-gate $(POST_PROCESS_O) 2410Sstevel@tonic-gate 2420Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/inet/%.c 2430Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2440Sstevel@tonic-gate $(POST_PROCESS_O) 2450Sstevel@tonic-gate 2460Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/net/%.c 2470Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2480Sstevel@tonic-gate $(POST_PROCESS_O) 2490Sstevel@tonic-gate 2500Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/net/sparc/%.c 2510Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2520Sstevel@tonic-gate $(POST_PROCESS_O) 2530Sstevel@tonic-gate 2540Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/stdio/common/%.c 2550Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2560Sstevel@tonic-gate $(POST_PROCESS_O) 2570Sstevel@tonic-gate 2580Sstevel@tonic-gatepics/%.o : ../libc/stdio/4.2/%.c 2590Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2600Sstevel@tonic-gate $(POST_PROCESS_O) 2610Sstevel@tonic-gate 2620Sstevel@tonic-gates5pics/%.o : ../libc/stdio/sys5/%.c 2630Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2640Sstevel@tonic-gate $(POST_PROCESS_O) 2650Sstevel@tonic-gate 2660Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/%.s 2670Sstevel@tonic-gate $(BUILD.s) 2680Sstevel@tonic-gate $(POST_PROCESS_O) 2690Sstevel@tonic-gate 2700Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/%.c 2710Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2720Sstevel@tonic-gate $(POST_PROCESS_O) 2730Sstevel@tonic-gate 2740Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/sparc/%.s 2750Sstevel@tonic-gate $(BUILD.s) 2760Sstevel@tonic-gate $(POST_PROCESS_O) 2770Sstevel@tonic-gate 2780Sstevel@tonic-gatepics/%.o : ../libc/sys/4.2/%.c 2790Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2800Sstevel@tonic-gate $(POST_PROCESS_O) 2810Sstevel@tonic-gate 2820Sstevel@tonic-gatepics/%.o : ../libc/sys/4.2/sparc/%.s 2830Sstevel@tonic-gate $(BUILD.s) 2840Sstevel@tonic-gate $(POST_PROCESS_O) 2850Sstevel@tonic-gate 2860Sstevel@tonic-gates5pics/%.o : ../libc/sys/sys5/%.c 2870Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2880Sstevel@tonic-gate $(POST_PROCESS_O) 2890Sstevel@tonic-gate 2900Sstevel@tonic-gates5pics/%.o : ../libc/sys/sys5/sparc/%.s 2910Sstevel@tonic-gate $(BUILD.s) 2920Sstevel@tonic-gate $(POST_PROCESS_O) 2930Sstevel@tonic-gate 2940Sstevel@tonic-gates5pics/%.o : ../libc/stdio/sys5/%.c 2950Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2960Sstevel@tonic-gate $(POST_PROCESS_O) 2970Sstevel@tonic-gate 2980Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/rpc/%.c 2990Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 3000Sstevel@tonic-gate $(POST_PROCESS_O) 3010Sstevel@tonic-gate 3020Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/yp/%.c 3030Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 3040Sstevel@tonic-gate $(POST_PROCESS_O) 3050Sstevel@tonic-gate 3060Sstevel@tonic-gate 3070Sstevel@tonic-gate# include common library definitions 3080Sstevel@tonic-gateinclude ../../Makefile.lib 3090Sstevel@tonic-gate 3102522Sraf# There should be a mapfile here 3112522SrafMAPFILES = 3122522Sraf 3130Sstevel@tonic-gateC99MODE= $(C99_DISABLE) 3140Sstevel@tonic-gate 3150Sstevel@tonic-gate# 3160Sstevel@tonic-gate# The BCP include files depend on old preprocessor semantics. 3170Sstevel@tonic-gate# 3180Sstevel@tonic-gateCCMODE = -Xt 3190Sstevel@tonic-gate 3200Sstevel@tonic-gate# the bcp libraries go in /usr/4lib. override ROOTLIBDIR from ../../Makefile.lib 3210Sstevel@tonic-gate# and save it so we can find the libraries with which to link 3220Sstevel@tonic-gateROOTLIBDIR= $(ROOT)/usr/4lib 3230Sstevel@tonic-gate 3240Sstevel@tonic-gateCPPFLAGS= -Dsparc \ 3250Sstevel@tonic-gate -I. -Iinc -I../inc/include -I../inc/include/sys $(CPPFLAGS.master) 3260Sstevel@tonic-gateASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS) 3270Sstevel@tonic-gateLDLIBS= -t -R/usr/ucblib -L$(ROOT)/usr/ucblib $(LDLIBS.lib) \ 3280Sstevel@tonic-gate -lucb -lc -lnsl -lsocket 3290Sstevel@tonic-gate 3300Sstevel@tonic-gate# SONAME is used by DYNFLAGS 3310Sstevel@tonic-gate$(DYNLIB4X) := SONAME = $(DYNLIB4X) 3320Sstevel@tonic-gate$(DYNLIBS5) := SONAME = $(DYNLIBS5) 3330Sstevel@tonic-gate 3340Sstevel@tonic-gatepics/%.o:= ASFLAGS += -K pic -DPIC 3350Sstevel@tonic-gatepics/%.o:= CPPFLAGS += -K pic -DPIC 3360Sstevel@tonic-gates5pics/%.o:= ASFLAGS += -K pic -DPIC 3374271SrieDYNFLAGS += $(ZINTERPOSE) 3380Sstevel@tonic-gate 3390Sstevel@tonic-gateBUILD.s= $(AS) $(ASFLAGS) $< -o $@ 3400Sstevel@tonic-gate 3410Sstevel@tonic-gate# libbc method of building an archive 3420Sstevel@tonic-gateBUILD.AR= $(RM) $@ ; \ 3430Sstevel@tonic-gate $(AR) q $@ $(OBJECTS:%=$(DIR)/%) 3440Sstevel@tonic-gate 3450Sstevel@tonic-gate# the TXTS macro is used for NSE bootstrapping. 3460Sstevel@tonic-gateTXTS= inc/SYS.h inc/PIC.h inc/machine/asm_linkage.h 3470Sstevel@tonic-gate 3480Sstevel@tonic-gateLIBS = $(DYNLIB4X) $(DYNLIBS5) 3490Sstevel@tonic-gate 3500Sstevel@tonic-gateOBJECTS= $(COMPATCOM) $(COMPAT4.1) $(CRTSPARC) $(GENCOM) \ 3510Sstevel@tonic-gate$(GENCOMSPARC) $(GEN4.2) $(STDIOCOM) $(STDIO4.2) \ 3520Sstevel@tonic-gate$(INET) $(NET) $(NETSPARC) $(YP) \ 3530Sstevel@tonic-gate$(SYSCOM) $(SYSCOMSPARC) $(SYS4.2) 3540Sstevel@tonic-gate 3550Sstevel@tonic-gate# 3560Sstevel@tonic-gate# Since this library is strictly for binary compability with ancient 3570Sstevel@tonic-gate# applications, we deactivate CTF to avoid kicking up dust. 3580Sstevel@tonic-gate# 3590Sstevel@tonic-gateCTFCONVERT_POST = : 3600Sstevel@tonic-gateCTFMERGE_LIB = : 3610Sstevel@tonic-gate 3620Sstevel@tonic-gateS5OBJECTS= $(COMPATCOM) $(COMPATSYS5) $(CRTSPARC) $(GENCOM) \ 3630Sstevel@tonic-gate$(GENCOMSPARC) $(GENSYS5) $(STDIOCOM) $(STDIOSYS5) \ 3640Sstevel@tonic-gate$(SYSCOM) $(SYSCOMSPARC) $(SYSSYS5) $(SSYS5SPARC) \ 3650Sstevel@tonic-gate$(INET) $(NET) $(NETSPARC) $(YP) 3660Sstevel@tonic-gate 3670Sstevel@tonic-gateS5PICOBJS= $(S5OBJECTS:%=s5pics/%) 3680Sstevel@tonic-gate 3690Sstevel@tonic-gateCLEANFILES= ../libc/yp/ypupdate_prot.c ../inc/include/rpcsvc/ypupdate_prot.h \ 3700Sstevel@tonic-gate ../libc/compat/sys5/epoch.h \ 3710Sstevel@tonic-gate $(S5PICOBJS) 3720Sstevel@tonic-gateCLOBBERFILES= ../libc/compat/sys5/mkepoch 3730Sstevel@tonic-gate 3740Sstevel@tonic-gate# conditional assignments 3750Sstevel@tonic-gates5pics/%.o:= CPPFLAGS = -Dsparc -DS5EMUL -K pic -DPIC -I. -Iinc \ 3760Sstevel@tonic-gate -I../inc/5include -I../inc/include -I../inc/include/sys \ 3770Sstevel@tonic-gate $(CPPFLAGS.master) 3780Sstevel@tonic-gate 3790Sstevel@tonic-gates5pics/%.o := CFLAGS += -xregs=no%appl 3800Sstevel@tonic-gatepics/%.o := CFLAGS += -xregs=no%appl 3810Sstevel@tonic-gate 3820Sstevel@tonic-gate$(DYNLIB4X):= DIR = pics 3830Sstevel@tonic-gate$(DYNLIBS5):= DIR = s5pics 3840Sstevel@tonic-gate 3850Sstevel@tonic-gate.KEEP_STATE: 3860Sstevel@tonic-gate 3870Sstevel@tonic-gate# Declare that all .o's can be made in parallel. 3880Sstevel@tonic-gate.PARALLEL: $(PICS) $(S5PICOBJS) 3890Sstevel@tonic-gate 3900Sstevel@tonic-gateall: $(TXTS) $(LIBS) 3910Sstevel@tonic-gate 3920Sstevel@tonic-gate$(DYNLIB4X): pics .WAIT $(PICS) 393722Smuffin $(CC) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS) 3940Sstevel@tonic-gate $(POST_PROCESS_SO) 3950Sstevel@tonic-gate 3960Sstevel@tonic-gate$(DYNLIBS5): s5pics .WAIT $(S5PICOBJS) 397722Smuffin $(CC) -o $@ -G $(DYNFLAGS) $(S5PICOBJS) $(LDLIBS) 3980Sstevel@tonic-gate $(POST_PROCESS_SO) 3990Sstevel@tonic-gate 4000Sstevel@tonic-gate# include common library targets 4010Sstevel@tonic-gateinclude ../../Makefile.targ 4020Sstevel@tonic-gate 4030Sstevel@tonic-gates5pics: 4040Sstevel@tonic-gate -@mkdir -p $@ 4050Sstevel@tonic-gate 4060Sstevel@tonic-gate# special cases 4070Sstevel@tonic-gatePSEUDO_POBJS= $(PSEUDO_SRCS:%.s=pics/%.o) 4080Sstevel@tonic-gatePSEUDO_PS5OBJS= $(PSEUDO_SRCS:%.s=s5pics/%.o) 4090Sstevel@tonic-gate 4100Sstevel@tonic-gate$(PSEUDO_POBJS) $(PSEUDO_PS5OBJS): 4110Sstevel@tonic-gate @(echo '#include "SYS.h"'; \ 4120Sstevel@tonic-gate echo ' SYSCALL($(@F:.o=))'; \ 4130Sstevel@tonic-gate echo ' RET'; \ 4140Sstevel@tonic-gate echo ' SET_SIZE($(@F:.o=))') > tmp.$(@F:.o=).s 4150Sstevel@tonic-gate $(AS) $(ASFLAGS) -o $@ tmp.$(@F:.o=).s 4160Sstevel@tonic-gate $(POST_PROCESS_O) 4170Sstevel@tonic-gate @$(RM) tmp.$(@F:.o=).s 4180Sstevel@tonic-gate 4190Sstevel@tonic-gates5pics/times.o : ../libc/compat/sys5/epoch.h ../libc/compat/sys5/times.c 4200Sstevel@tonic-gate $(COMPILE.c) -o $@ ../libc/compat/sys5/times.c 4210Sstevel@tonic-gate $(POST_PROCESS_O) 4220Sstevel@tonic-gate 4230Sstevel@tonic-gate../libc/compat/sys5/epoch.h: ../libc/compat/sys5/mkepoch 4240Sstevel@tonic-gate ../libc/compat/sys5/mkepoch > $@ 4250Sstevel@tonic-gate 4260Sstevel@tonic-gate../libc/compat/sys5/mkepoch: ../libc/compat/sys5/mkepoch.c 4270Sstevel@tonic-gate $(NATIVECC) -O -o $@ ../libc/compat/sys5/mkepoch.c 4280Sstevel@tonic-gate 4290Sstevel@tonic-gatepics/maperror.o s5pics/maperror.o: ../libc/sys/common/maperror.c 4300Sstevel@tonic-gate $(CC) -I../libc/sys/common $(CPPFLAGS) $(CFLAGS) -c -o $@ ../libc/sys/common/maperror.c 431722Smuffin 4320Sstevel@tonic-gate# 4330Sstevel@tonic-gate# The following rules generate the .h file and XDR routines from the 4340Sstevel@tonic-gate# rpcgen source. Objects built here, look for it here. Further, when 4350Sstevel@tonic-gate# building ypupdated it should look here too, but doesn't at the moment. 4360Sstevel@tonic-gate# 4370Sstevel@tonic-gate# It would be nice to use a ".x.h" rule for this, but that causes problems. 4380Sstevel@tonic-gate# 4390Sstevel@tonic-gatepics/yp_update.o \ 4400Sstevel@tonic-gates5pics/yp_update.o : ../inc/include/rpcsvc/ypupdate_prot.h ../libc/yp/yp_update.c 4410Sstevel@tonic-gate $(COMPILE.c) -o $@ ../libc/yp/yp_update.c 4420Sstevel@tonic-gate $(POST_PROCESS_O) 4430Sstevel@tonic-gate 4440Sstevel@tonic-gatepics/ypupdate_prot.o s5pics/ypupdate_prot.o : ../inc/include/rpcsvc/ypupdate_prot.h\ 4450Sstevel@tonic-gate ../libc/yp/ypupdate_prot.c 4460Sstevel@tonic-gate $(COMPILE.c) -o $@ ../libc/yp/ypupdate_prot.c 4470Sstevel@tonic-gate $(POST_PROCESS_O) 4480Sstevel@tonic-gate 4490Sstevel@tonic-gate../libc/yp/ypupdate_prot.c: ../libc/yp/ypupdate_prot.x 4500Sstevel@tonic-gate $(RM) $@ 4510Sstevel@tonic-gate $(RPCGEN) -c -o $@ ../libc/yp/ypupdate_prot.x 4520Sstevel@tonic-gate 4530Sstevel@tonic-gate../libc/yp/ypupdate_prot.h: ../libc/yp/ypupdate_prot.x 4540Sstevel@tonic-gate $(RM) $@ ../libc/yp/ypupdate_prot.h 4550Sstevel@tonic-gate $(RPCGEN) -h -o ../libc/yp/ypupdate_prot.h ../libc/yp/ypupdate_prot.x 4560Sstevel@tonic-gate 4570Sstevel@tonic-gate../inc/include/rpcsvc/ypupdate_prot.h: ../libc/yp/ypupdate_prot.h 4580Sstevel@tonic-gate cp ../libc/yp/ypupdate_prot.h $@ 459