xref: /titanic_50/usr/src/lib/libbc/sparc/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# This builds all objects needed for libbc.
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gateLIBRARY= libc.a
32*7c478bd9Sstevel@tonic-gate# Default rules in ../../Makefile.targ not used.
33*7c478bd9Sstevel@tonic-gateVERS= bogus
34*7c478bd9Sstevel@tonic-gateDYNLIB4X= libc.so.1.9
35*7c478bd9Sstevel@tonic-gateDYNLIBS5= libc.so.2.9
36*7c478bd9Sstevel@tonic-gate#DYNLIBS5 is also defined in ../Makefile
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gateM4= m4
39*7c478bd9Sstevel@tonic-gateECHO=	echo
40*7c478bd9Sstevel@tonic-gate
41*7c478bd9Sstevel@tonic-gate# objects are grouped by source directory.
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gateCOMPATCOM= \
44*7c478bd9Sstevel@tonic-gategtty.o      lockf.o     pause.o     stty.o      tell.o      ulimit.o \
45*7c478bd9Sstevel@tonic-gateutime.o
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gateCOMPAT4.1=\
48*7c478bd9Sstevel@tonic-gateftime.o     nice.o      rand.o      vlimit.o    vtimes.o    getpw.o times.o
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gateCOMPATSYS5=\
51*7c478bd9Sstevel@tonic-gatenice.o      rand.o      getpw.o     times.o
52*7c478bd9Sstevel@tonic-gate
53*7c478bd9Sstevel@tonic-gateCRTSPARC =\
54*7c478bd9Sstevel@tonic-gate_ftou.o      misalign.o  ptr_call.o \
55*7c478bd9Sstevel@tonic-gatestart_float.o \
56*7c478bd9Sstevel@tonic-gatealloc_pbuf.o mon.o muldiv.o
57*7c478bd9Sstevel@tonic-gate
58*7c478bd9Sstevel@tonic-gateGENCOM=\
59*7c478bd9Sstevel@tonic-gate_crypt.o _nlist.o _perror.o _psignal.o a64l.o abs.o alarm.o\
60*7c478bd9Sstevel@tonic-gateasctime.o atof.o atoi.o atol.o bcmp.o bsearch.o\
61*7c478bd9Sstevel@tonic-gateclock.o closedir.o crypt.o ctime.o ctype_.o\
62*7c478bd9Sstevel@tonic-gatedrand48.o dysize.o errlst.o execvp.o exit.o exportent.o ecvt.o\
63*7c478bd9Sstevel@tonic-gatefabs.o fmod.o frexp.o\
64*7c478bd9Sstevel@tonic-gatefstab.o ftok.o ftw.o getacinfo.o getauid.o getauditflags.o \
65*7c478bd9Sstevel@tonic-gategetcwd.o getenv.o getfaudflgs.o getgraent.o getlogin.o \
66*7c478bd9Sstevel@tonic-gategetopt.o getsubopt.o getpwaent.o  getttyent.o\
67*7c478bd9Sstevel@tonic-gategetttynam.o getusershell.o grpauth.o hsearch.o\
68*7c478bd9Sstevel@tonic-gateieee_globals.o index.o isatty.o \
69*7c478bd9Sstevel@tonic-gateissecure.o jcsetpgrp.o\
70*7c478bd9Sstevel@tonic-gatel64a.o labeltostring.o ldexp.o lfind.o lsearch.o\
71*7c478bd9Sstevel@tonic-gatemadvise.o mallopt.o \
72*7c478bd9Sstevel@tonic-gateeuc.multibyte.o iso.multibyte.o xccs.multibyte.o \
73*7c478bd9Sstevel@tonic-gatemblib.o mbstowcs.o mbtowc.o wcstombs.o wctomb.o \
74*7c478bd9Sstevel@tonic-gatememalign.o memccpy.o memchr.o memcmp.o\
75*7c478bd9Sstevel@tonic-gatemkstemp.o mktemp.o mlock.o mlockall.o\
76*7c478bd9Sstevel@tonic-gatemntent.o modf.o msync.o munlock.o munlockall.o\
77*7c478bd9Sstevel@tonic-gatenl_cxtime.o nl_strncmp.o  ndbm.o on_exit.o\
78*7c478bd9Sstevel@tonic-gateopendir.o optind.o perror.o plock.o \
79*7c478bd9Sstevel@tonic-gateposix_sig.o posix_tty.o popen.o psignal.o putenv.o \
80*7c478bd9Sstevel@tonic-gatepwdauth.o pwdnm.o qsort.o\
81*7c478bd9Sstevel@tonic-gaterandom.o readdir.o realpath.o regex.o rindex.o scandir.o seekdir.o\
82*7c478bd9Sstevel@tonic-gatesetlocale.o setregid.o setreuid.o setrgid.o setruid.o sigfpe.o siglist.o\
83*7c478bd9Sstevel@tonic-gatessignal.o strchr.o stricmp.o \
84*7c478bd9Sstevel@tonic-gatestrftime.o strncat.o \
85*7c478bd9Sstevel@tonic-gatestrpbrk.o strptime.o strrchr.o strspn.o strstr.o \
86*7c478bd9Sstevel@tonic-gatestrtod.o strtok.o strtol.o swab.o syslog.o\
87*7c478bd9Sstevel@tonic-gatetelldir.o tfind.o time.o tsearch.o \
88*7c478bd9Sstevel@tonic-gateualarm.o usleep.o valloc.o string_decim.o \
89*7c478bd9Sstevel@tonic-gatefile_decim.o func_decim.o econvert.o seconvert.o gconvert.o \
90*7c478bd9Sstevel@tonic-gatedecimal_bin.o float_decim.o double_decim.o \
91*7c478bd9Sstevel@tonic-gatepack_float.o _unpack_dble.o unpack_float.o \
92*7c478bd9Sstevel@tonic-gate_base_S.o _base_il.o _base_sup.o _big_power.o _small_power.o \
93*7c478bd9Sstevel@tonic-gate_sprintf_sup.o _times_power.o qeconvert.o \
94*7c478bd9Sstevel@tonic-gate_Q_neg.o _Q_add.o _Q_sub.o _Q_mul.o _Q_div.o _Q_cmp.o \
95*7c478bd9Sstevel@tonic-gate_Q_cmpe.o _Q_stoq.o _Q_dtoq.o _Q_itoq.o _Q_utoq.o _Q_qtos.o _Q_qtod.o \
96*7c478bd9Sstevel@tonic-gate_Q_qtoi.o _Q_qtou.o _Q_sqrt.o _Qfaddsub.o _Qfcompare.o _Qfdiv.o \
97*7c478bd9Sstevel@tonic-gate_Qfmul.o _Qfpack.o _Qfunpack.o _Qfutility.o _Q_fcc.o _Q_get_rp_rd.o \
98*7c478bd9Sstevel@tonic-gatecalloc.o malloc.o \
99*7c478bd9Sstevel@tonic-gategetpass.o localtime.o ttyslot.o
100*7c478bd9Sstevel@tonic-gate
101*7c478bd9Sstevel@tonic-gateGENCOMSPARC=\
102*7c478bd9Sstevel@tonic-gatealloca.o   ffs.o insque.o    remque.o    isinf.o     base_conv.o
103*7c478bd9Sstevel@tonic-gate
104*7c478bd9Sstevel@tonic-gateGEN4.2=\
105*7c478bd9Sstevel@tonic-gatenlist.o     timezone.o  sleep.o  system.o
106*7c478bd9Sstevel@tonic-gate
107*7c478bd9Sstevel@tonic-gateGENSYS5=\
108*7c478bd9Sstevel@tonic-gateassert.o    nlist.o     sgetl.o    sleep.o      sputl.o     system.o \
109*7c478bd9Sstevel@tonic-gatesighold.o
110*7c478bd9Sstevel@tonic-gate
111*7c478bd9Sstevel@tonic-gateSTDIOCOM=\
112*7c478bd9Sstevel@tonic-gateclrerr.o    ctermid.o   cuserid.o   doprnt.o    doscan.o    fdopen.o \
113*7c478bd9Sstevel@tonic-gatefeof.o      ferror.o    fgetc.o     fgets.o     fileno.o    findiop.o \
114*7c478bd9Sstevel@tonic-gatefputc.o     fputs.o     fread.o     fseek.o     ftell.o \
115*7c478bd9Sstevel@tonic-gatefwrite.o    getc.o      getchar.o   gets.o      getw.o      iob.o \
116*7c478bd9Sstevel@tonic-gateputc.o      putchar.o   puts.o      putw.o      remove.o \
117*7c478bd9Sstevel@tonic-gaterew.o       scanf.o     setbuffer.o setvbuf.o   tmpnam.o    tempnam.o \
118*7c478bd9Sstevel@tonic-gatetmpfile.o   ungetc.o
119*7c478bd9Sstevel@tonic-gate
120*7c478bd9Sstevel@tonic-gateSTDIO4.2=\
121*7c478bd9Sstevel@tonic-gatefilbuf.o    fopen.o     fprintf.o   printf.o    flsbuf.o  setbuf.o \
122*7c478bd9Sstevel@tonic-gatesprintf.o   vfprintf.o  vprintf.o   vsprintf.o
123*7c478bd9Sstevel@tonic-gate
124*7c478bd9Sstevel@tonic-gateSTDIOSYS5=\
125*7c478bd9Sstevel@tonic-gatefilbuf.o    fopen.o     fprintf.o   flsbuf.o    printf.o    setbuf.o \
126*7c478bd9Sstevel@tonic-gatesprintf.o   vfprintf.o  vprintf.o   vsprintf.o
127*7c478bd9Sstevel@tonic-gate
128*7c478bd9Sstevel@tonic-gateSYSCOM=\
129*7c478bd9Sstevel@tonic-gate_access.o acct.o  adjtime.o close.o _creat.o dup.o dup2.o \
130*7c478bd9Sstevel@tonic-gatefchdir.o fchmod.o fchown.o fchroot.o \
131*7c478bd9Sstevel@tonic-gatefdlist.o flock.o  fpathconf.o fsync.o ftruncate.o getdents.o \
132*7c478bd9Sstevel@tonic-gategetdtablesize.o getgid.o  getitimer.o getpid.o gettimeofday.o \
133*7c478bd9Sstevel@tonic-gategetuid.o ioctl.o kill.o lseek.o mincore.o mprotect.o munmap.o\
134*7c478bd9Sstevel@tonic-gate_open.o poll.o profil.o setitimer.o \
135*7c478bd9Sstevel@tonic-gaterlimit.o _statfs.o  sync.o umask.o uname.o\
136*7c478bd9Sstevel@tonic-gateexecl.o execle.o execv.o mkfifo.o msgsys.o\
137*7c478bd9Sstevel@tonic-gatepathconf.o semsys.o shmsys.o unmount.o wait.o setuid.o\
138*7c478bd9Sstevel@tonic-gatesetgid.o _stat.o seteuid.o setegid.o signalmap.o utimes.o syscall.o \
139*7c478bd9Sstevel@tonic-gatemaperror.o sigsetjmp.o accept.o bind.o connect.o getpeername.o \
140*7c478bd9Sstevel@tonic-gategetsockname.o getsockopt.o listen.o recv.o send.o \
141*7c478bd9Sstevel@tonic-gatesetsockopt.o shutdown.o socket.o socketpair.o setsid.o sigaction.o
142*7c478bd9Sstevel@tonic-gate
143*7c478bd9Sstevel@tonic-gateSYSCOMSPARC=\
144*7c478bd9Sstevel@tonic-gate_exit.o     brk.o       cerror.o    errno.o     \
145*7c478bd9Sstevel@tonic-gategetegid.o   geteuid.o   getppid.o   mmap.o      pipe.o      putmsg.o \
146*7c478bd9Sstevel@tonic-gatesbrk.o      _syscall.o  getmsg.o    _read.o     _write.o \
147*7c478bd9Sstevel@tonic-gate_readv.o    _writev.o	sendsig.o
148*7c478bd9Sstevel@tonic-gate
149*7c478bd9Sstevel@tonic-gateSYS4.2=\
150*7c478bd9Sstevel@tonic-gateaccess.o    chdir.o     chmod.o     chown.o     chroot.o    \
151*7c478bd9Sstevel@tonic-gatecreat.o     execve.o    getpgrp.o   link.o      mkdir.o  \
152*7c478bd9Sstevel@tonic-gatemknod.o     open.o      readlink.o  rename.o    rmdir.o  \
153*7c478bd9Sstevel@tonic-gatesetpgrp.o   stat.o      symlink.o   truncate.o  unlink.o     \
154*7c478bd9Sstevel@tonic-gatestatfs.o    fcntl.o     read.o      write.o     readv.o \
155*7c478bd9Sstevel@tonic-gatewritev.o    setjmp.o	mount.o
156*7c478bd9Sstevel@tonic-gate
157*7c478bd9Sstevel@tonic-gateSYS4.2SPARC=\
158*7c478bd9Sstevel@tonic-gategetgroups.o setgroups.o
159*7c478bd9Sstevel@tonic-gate
160*7c478bd9Sstevel@tonic-gateSYSSYS5=\
161*7c478bd9Sstevel@tonic-gateaccess.o    chdir.o     chmod.o     chown.o     chroot.o \
162*7c478bd9Sstevel@tonic-gatecreat.o     execve.o    getgroups.o getpgrp.o   link.o \
163*7c478bd9Sstevel@tonic-gatemkdir.o     mknod.o     open.o      readlink.o  rename.o \
164*7c478bd9Sstevel@tonic-gatermdir.o     setgroups.o setpgrp.o   stat.o      statfs.o \
165*7c478bd9Sstevel@tonic-gatestime.o     symlink.o   truncate.o  unlink.o    fcntl.o \
166*7c478bd9Sstevel@tonic-gateread.o      write.o     readv.o     writev.o    setjmp.o \
167*7c478bd9Sstevel@tonic-gatemount.o
168*7c478bd9Sstevel@tonic-gate
169*7c478bd9Sstevel@tonic-gate#SSYSSPARC=\
170*7c478bd9Sstevel@tonic-gate#_getpgrp.o  _kill.o     _lseek.o    _mknod.o    _mount.o    _setpgrp.o \
171*7c478bd9Sstevel@tonic-gate#umount.o
172*7c478bd9Sstevel@tonic-gate
173*7c478bd9Sstevel@tonic-gateINET=\
174*7c478bd9Sstevel@tonic-gateinet_addr.o        inet_lnaof.o     inet_makeaddr.o  inet_netof.o \
175*7c478bd9Sstevel@tonic-gateinet_network.o     inet_ntoa.o
176*7c478bd9Sstevel@tonic-gate
177*7c478bd9Sstevel@tonic-gateNET=\
178*7c478bd9Sstevel@tonic-gateether_addr.o bindresvport.o getrpcport.o rcmd.o \
179*7c478bd9Sstevel@tonic-gaterexec.o ruserpass.o authunix.o
180*7c478bd9Sstevel@tonic-gate
181*7c478bd9Sstevel@tonic-gateNETSPARC= htonl.o     htons.o         ntohl.o          ntohs.o
182*7c478bd9Sstevel@tonic-gate
183*7c478bd9Sstevel@tonic-gateYP= yp_bind.o
184*7c478bd9Sstevel@tonic-gate
185*7c478bd9Sstevel@tonic-gateYP= yp_bind.o
186*7c478bd9Sstevel@tonic-gatePSEUDO_SRCS= adjtime.s fchdir.s \
187*7c478bd9Sstevel@tonic-gatefchmod.s   fchown.s    fchroot.s      \
188*7c478bd9Sstevel@tonic-gatefpathconf.s getitimer.s    getpid.s    \
189*7c478bd9Sstevel@tonic-gatemincore.s   mprotect.s munmap.s    \
190*7c478bd9Sstevel@tonic-gateprofil.s    setitimer.s \
191*7c478bd9Sstevel@tonic-gatesync.s     sysconf.s   umask.s         ustat.s \
192*7c478bd9Sstevel@tonic-gateacct.s    stime.s      \
193*7c478bd9Sstevel@tonic-gateutimes.s poll.s
194*7c478bd9Sstevel@tonic-gate
195*7c478bd9Sstevel@tonic-gate#
196*7c478bd9Sstevel@tonic-gate# libbc build rules
197*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/compat/common/%.c
198*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
199*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
200*7c478bd9Sstevel@tonic-gate
201*7c478bd9Sstevel@tonic-gatepics/%.o : ../libc/compat/4.1/%.c
202*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
203*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
204*7c478bd9Sstevel@tonic-gate
205*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/compat/sys5/%.c
206*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
207*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
208*7c478bd9Sstevel@tonic-gate
209*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/crt/sparc/%.s
210*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
211*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
212*7c478bd9Sstevel@tonic-gate
213*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/crt/sparc/%.c
214*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
215*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
216*7c478bd9Sstevel@tonic-gate
217*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../csu/common/%.c
218*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
219*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
220*7c478bd9Sstevel@tonic-gate
221*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/%.S
222*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
223*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
224*7c478bd9Sstevel@tonic-gate
225*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/%.c
226*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
227*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
228*7c478bd9Sstevel@tonic-gate
229*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.s
230*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
231*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
232*7c478bd9Sstevel@tonic-gate
233*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.c
234*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
235*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
236*7c478bd9Sstevel@tonic-gate
237*7c478bd9Sstevel@tonic-gatepics/%.o : ../libc/gen/4.2/%.c
238*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
239*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
240*7c478bd9Sstevel@tonic-gate
241*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/gen/sys5/%.c
242*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
243*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
244*7c478bd9Sstevel@tonic-gate
245*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/inet/%.c
246*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
247*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
248*7c478bd9Sstevel@tonic-gate
249*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/net/%.c
250*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
251*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
252*7c478bd9Sstevel@tonic-gate
253*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/net/sparc/%.c
254*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
255*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
256*7c478bd9Sstevel@tonic-gate
257*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/stdio/common/%.c
258*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
259*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
260*7c478bd9Sstevel@tonic-gate
261*7c478bd9Sstevel@tonic-gatepics/%.o : ../libc/stdio/4.2/%.c
262*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
263*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
264*7c478bd9Sstevel@tonic-gate
265*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/stdio/sys5/%.c
266*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
267*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
268*7c478bd9Sstevel@tonic-gate
269*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/%.s
270*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
271*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
272*7c478bd9Sstevel@tonic-gate
273*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/%.c
274*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
275*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
276*7c478bd9Sstevel@tonic-gate
277*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/sys/common/sparc/%.s
278*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
279*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
280*7c478bd9Sstevel@tonic-gate
281*7c478bd9Sstevel@tonic-gatepics/%.o : ../libc/sys/4.2/%.c
282*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
283*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
284*7c478bd9Sstevel@tonic-gate
285*7c478bd9Sstevel@tonic-gatepics/%.o : ../libc/sys/4.2/sparc/%.s
286*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
287*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
288*7c478bd9Sstevel@tonic-gate
289*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/sys/sys5/%.c
290*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
291*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
292*7c478bd9Sstevel@tonic-gate
293*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/sys/sys5/sparc/%.s
294*7c478bd9Sstevel@tonic-gate	$(BUILD.s)
295*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
296*7c478bd9Sstevel@tonic-gate
297*7c478bd9Sstevel@tonic-gates5pics/%.o : ../libc/stdio/sys5/%.c
298*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
299*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
300*7c478bd9Sstevel@tonic-gate
301*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/rpc/%.c
302*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
303*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
304*7c478bd9Sstevel@tonic-gate
305*7c478bd9Sstevel@tonic-gatepics/%.o s5pics/%.o : ../libc/yp/%.c
306*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
307*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
308*7c478bd9Sstevel@tonic-gate
309*7c478bd9Sstevel@tonic-gate
310*7c478bd9Sstevel@tonic-gate# include common library definitions
311*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
312*7c478bd9Sstevel@tonic-gate
313*7c478bd9Sstevel@tonic-gateC99MODE=	$(C99_DISABLE)
314*7c478bd9Sstevel@tonic-gate
315*7c478bd9Sstevel@tonic-gate#
316*7c478bd9Sstevel@tonic-gate# The BCP include files depend on old preprocessor semantics.
317*7c478bd9Sstevel@tonic-gate#
318*7c478bd9Sstevel@tonic-gateCCMODE = -Xt
319*7c478bd9Sstevel@tonic-gate
320*7c478bd9Sstevel@tonic-gate# the bcp libraries go in /usr/4lib. override ROOTLIBDIR from ../../Makefile.lib
321*7c478bd9Sstevel@tonic-gate# and save it so we can find the libraries with which to link
322*7c478bd9Sstevel@tonic-gateROOTLIBDIR=     $(ROOT)/usr/4lib
323*7c478bd9Sstevel@tonic-gate
324*7c478bd9Sstevel@tonic-gateCPPFLAGS= -Dsparc \
325*7c478bd9Sstevel@tonic-gate	-I. -Iinc -I../inc/include -I../inc/include/sys $(CPPFLAGS.master)
326*7c478bd9Sstevel@tonic-gateASFLAGS=  -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
327*7c478bd9Sstevel@tonic-gateLDLIBS= -t -R/usr/ucblib -L$(ROOT)/usr/ucblib $(LDLIBS.lib) \
328*7c478bd9Sstevel@tonic-gate	-lucb -lc -lnsl -lsocket
329*7c478bd9Sstevel@tonic-gate
330*7c478bd9Sstevel@tonic-gate# SONAME is used by DYNFLAGS
331*7c478bd9Sstevel@tonic-gate$(DYNLIB4X) :=	SONAME = $(DYNLIB4X)
332*7c478bd9Sstevel@tonic-gate$(DYNLIBS5) :=	SONAME = $(DYNLIBS5)
333*7c478bd9Sstevel@tonic-gate
334*7c478bd9Sstevel@tonic-gatepics/%.o:= ASFLAGS += -K pic -DPIC
335*7c478bd9Sstevel@tonic-gatepics/%.o:= CPPFLAGS += -K pic -DPIC
336*7c478bd9Sstevel@tonic-gates5pics/%.o:= ASFLAGS += -K pic -DPIC
337*7c478bd9Sstevel@tonic-gate
338*7c478bd9Sstevel@tonic-gateBUILD.s=  $(AS) $(ASFLAGS) $< -o $@
339*7c478bd9Sstevel@tonic-gate
340*7c478bd9Sstevel@tonic-gate# libbc method of building an archive
341*7c478bd9Sstevel@tonic-gateBUILD.AR= $(RM) $@ ; \
342*7c478bd9Sstevel@tonic-gate	$(AR) q $@ $(OBJECTS:%=$(DIR)/%)
343*7c478bd9Sstevel@tonic-gate
344*7c478bd9Sstevel@tonic-gate# the TXTS macro is used for NSE bootstrapping.
345*7c478bd9Sstevel@tonic-gateTXTS=	inc/SYS.h inc/PIC.h inc/machine/asm_linkage.h
346*7c478bd9Sstevel@tonic-gate
347*7c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB4X) $(DYNLIBS5)
348*7c478bd9Sstevel@tonic-gate
349*7c478bd9Sstevel@tonic-gateOBJECTS= $(COMPATCOM) $(COMPAT4.1) $(CRTSPARC) $(GENCOM) \
350*7c478bd9Sstevel@tonic-gate$(GENCOMSPARC) $(GEN4.2) $(STDIOCOM) $(STDIO4.2) \
351*7c478bd9Sstevel@tonic-gate$(INET) $(NET) $(NETSPARC) $(YP) \
352*7c478bd9Sstevel@tonic-gate$(SYSCOM) $(SYSCOMSPARC) $(SYS4.2)
353*7c478bd9Sstevel@tonic-gate
354*7c478bd9Sstevel@tonic-gate#
355*7c478bd9Sstevel@tonic-gate# Since this library is strictly for binary compability with ancient
356*7c478bd9Sstevel@tonic-gate# applications, we deactivate CTF to avoid kicking up dust.
357*7c478bd9Sstevel@tonic-gate#
358*7c478bd9Sstevel@tonic-gateCTFCONVERT_POST = :
359*7c478bd9Sstevel@tonic-gateCTFMERGE_LIB = :
360*7c478bd9Sstevel@tonic-gate
361*7c478bd9Sstevel@tonic-gateS5OBJECTS= $(COMPATCOM) $(COMPATSYS5) $(CRTSPARC) $(GENCOM) \
362*7c478bd9Sstevel@tonic-gate$(GENCOMSPARC) $(GENSYS5) $(STDIOCOM) $(STDIOSYS5) \
363*7c478bd9Sstevel@tonic-gate$(SYSCOM) $(SYSCOMSPARC) $(SYSSYS5) $(SSYS5SPARC) \
364*7c478bd9Sstevel@tonic-gate$(INET) $(NET) $(NETSPARC) $(YP)
365*7c478bd9Sstevel@tonic-gate
366*7c478bd9Sstevel@tonic-gateS5PICOBJS=	$(S5OBJECTS:%=s5pics/%)
367*7c478bd9Sstevel@tonic-gate
368*7c478bd9Sstevel@tonic-gateCLEANFILES= ../libc/yp/ypupdate_prot.c ../inc/include/rpcsvc/ypupdate_prot.h \
369*7c478bd9Sstevel@tonic-gate	../libc/compat/sys5/epoch.h \
370*7c478bd9Sstevel@tonic-gate	$(S5PICOBJS)
371*7c478bd9Sstevel@tonic-gateCLOBBERFILES= ../libc/compat/sys5/mkepoch
372*7c478bd9Sstevel@tonic-gate
373*7c478bd9Sstevel@tonic-gate# conditional assignments
374*7c478bd9Sstevel@tonic-gates5pics/%.o:= CPPFLAGS = -Dsparc -DS5EMUL -K pic -DPIC -I. -Iinc \
375*7c478bd9Sstevel@tonic-gate	-I../inc/5include -I../inc/include -I../inc/include/sys \
376*7c478bd9Sstevel@tonic-gate	$(CPPFLAGS.master)
377*7c478bd9Sstevel@tonic-gate
378*7c478bd9Sstevel@tonic-gates5pics/%.o := CFLAGS += -xregs=no%appl
379*7c478bd9Sstevel@tonic-gatepics/%.o := CFLAGS += -xregs=no%appl
380*7c478bd9Sstevel@tonic-gate
381*7c478bd9Sstevel@tonic-gate$(DYNLIB4X):= DIR = pics
382*7c478bd9Sstevel@tonic-gate$(DYNLIBS5):= DIR = s5pics
383*7c478bd9Sstevel@tonic-gate
384*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
385*7c478bd9Sstevel@tonic-gate
386*7c478bd9Sstevel@tonic-gate# Declare that all .o's can be made in parallel.
387*7c478bd9Sstevel@tonic-gate.PARALLEL:	$(PICS) $(S5PICOBJS)
388*7c478bd9Sstevel@tonic-gate
389*7c478bd9Sstevel@tonic-gateall: $(TXTS) $(LIBS)
390*7c478bd9Sstevel@tonic-gate
391*7c478bd9Sstevel@tonic-gate$(DYNLIB4X): pics .WAIT $(PICS)
392*7c478bd9Sstevel@tonic-gate	$(CC) -o $@ -dy -G $(DYNFLAGS) $(PICS) $(LDLIBS)
393*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
394*7c478bd9Sstevel@tonic-gate
395*7c478bd9Sstevel@tonic-gate$(DYNLIBS5): s5pics .WAIT $(S5PICOBJS)
396*7c478bd9Sstevel@tonic-gate	$(CC) -o $@ -dy -G $(DYNFLAGS) $(S5PICOBJS) $(LDLIBS)
397*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
398*7c478bd9Sstevel@tonic-gate
399*7c478bd9Sstevel@tonic-gate# include common library targets
400*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
401*7c478bd9Sstevel@tonic-gate
402*7c478bd9Sstevel@tonic-gates5pics:
403*7c478bd9Sstevel@tonic-gate	-@mkdir -p $@
404*7c478bd9Sstevel@tonic-gate
405*7c478bd9Sstevel@tonic-gate# special cases
406*7c478bd9Sstevel@tonic-gatePSEUDO_POBJS= $(PSEUDO_SRCS:%.s=pics/%.o)
407*7c478bd9Sstevel@tonic-gatePSEUDO_PS5OBJS= $(PSEUDO_SRCS:%.s=s5pics/%.o)
408*7c478bd9Sstevel@tonic-gate
409*7c478bd9Sstevel@tonic-gate$(PSEUDO_POBJS) $(PSEUDO_PS5OBJS):
410*7c478bd9Sstevel@tonic-gate	@(echo '#include "SYS.h"'; \
411*7c478bd9Sstevel@tonic-gate	echo '  SYSCALL($(@F:.o=))'; \
412*7c478bd9Sstevel@tonic-gate	echo '  RET'; \
413*7c478bd9Sstevel@tonic-gate	echo '  SET_SIZE($(@F:.o=))') >  tmp.$(@F:.o=).s
414*7c478bd9Sstevel@tonic-gate	$(AS) $(ASFLAGS) -o $@ tmp.$(@F:.o=).s
415*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
416*7c478bd9Sstevel@tonic-gate	@$(RM) tmp.$(@F:.o=).s
417*7c478bd9Sstevel@tonic-gate
418*7c478bd9Sstevel@tonic-gates5pics/times.o : ../libc/compat/sys5/epoch.h ../libc/compat/sys5/times.c
419*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ ../libc/compat/sys5/times.c
420*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
421*7c478bd9Sstevel@tonic-gate
422*7c478bd9Sstevel@tonic-gate../libc/compat/sys5/epoch.h: ../libc/compat/sys5/mkepoch
423*7c478bd9Sstevel@tonic-gate	../libc/compat/sys5/mkepoch > $@
424*7c478bd9Sstevel@tonic-gate
425*7c478bd9Sstevel@tonic-gate../libc/compat/sys5/mkepoch: ../libc/compat/sys5/mkepoch.c
426*7c478bd9Sstevel@tonic-gate	$(NATIVECC) -O -o $@ ../libc/compat/sys5/mkepoch.c
427*7c478bd9Sstevel@tonic-gate
428*7c478bd9Sstevel@tonic-gatepics/maperror.o s5pics/maperror.o: ../libc/sys/common/maperror.c
429*7c478bd9Sstevel@tonic-gate	$(CC) -I../libc/sys/common $(CPPFLAGS) $(CFLAGS) -c -o $@ ../libc/sys/common/maperror.c
430*7c478bd9Sstevel@tonic-gate
431*7c478bd9Sstevel@tonic-gate#
432*7c478bd9Sstevel@tonic-gate# The following rules generate the .h file and XDR routines from the
433*7c478bd9Sstevel@tonic-gate# rpcgen source. Objects built here, look for it here. Further, when
434*7c478bd9Sstevel@tonic-gate# building ypupdated it should look here too, but doesn't at the moment.
435*7c478bd9Sstevel@tonic-gate#
436*7c478bd9Sstevel@tonic-gate# It would be nice to use a ".x.h" rule for this, but that causes problems.
437*7c478bd9Sstevel@tonic-gate#
438*7c478bd9Sstevel@tonic-gatepics/yp_update.o \
439*7c478bd9Sstevel@tonic-gates5pics/yp_update.o : ../inc/include/rpcsvc/ypupdate_prot.h ../libc/yp/yp_update.c
440*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ ../libc/yp/yp_update.c
441*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
442*7c478bd9Sstevel@tonic-gate
443*7c478bd9Sstevel@tonic-gatepics/ypupdate_prot.o s5pics/ypupdate_prot.o : ../inc/include/rpcsvc/ypupdate_prot.h\
444*7c478bd9Sstevel@tonic-gate				../libc/yp/ypupdate_prot.c
445*7c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ ../libc/yp/ypupdate_prot.c
446*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
447*7c478bd9Sstevel@tonic-gate
448*7c478bd9Sstevel@tonic-gate../libc/yp/ypupdate_prot.c: ../libc/yp/ypupdate_prot.x
449*7c478bd9Sstevel@tonic-gate	$(RM) $@
450*7c478bd9Sstevel@tonic-gate	$(RPCGEN) -c -o $@ ../libc/yp/ypupdate_prot.x
451*7c478bd9Sstevel@tonic-gate
452*7c478bd9Sstevel@tonic-gate../libc/yp/ypupdate_prot.h: ../libc/yp/ypupdate_prot.x
453*7c478bd9Sstevel@tonic-gate	$(RM) $@ ../libc/yp/ypupdate_prot.h
454*7c478bd9Sstevel@tonic-gate	$(RPCGEN) -h -o ../libc/yp/ypupdate_prot.h ../libc/yp/ypupdate_prot.x
455*7c478bd9Sstevel@tonic-gate
456*7c478bd9Sstevel@tonic-gate../inc/include/rpcsvc/ypupdate_prot.h: ../libc/yp/ypupdate_prot.h
457*7c478bd9Sstevel@tonic-gate	cp ../libc/yp/ypupdate_prot.h $@
458