Makefile revision 12692:4341b447c069
1177633Sdfr#
2177633Sdfr# CDDL HEADER START
3177633Sdfr#
4177633Sdfr# The contents of this file are subject to the terms of the
5177633Sdfr# Common Development and Distribution License (the "License").
6177633Sdfr# You may not use this file except in compliance with the License.
7177633Sdfr#
8177633Sdfr# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9177633Sdfr# or http://www.opensolaris.org/os/licensing.
10177633Sdfr# See the License for the specific language governing permissions
11177633Sdfr# and limitations under the License.
12177633Sdfr#
13177633Sdfr# When distributing Covered Code, include this CDDL HEADER in each
14177633Sdfr# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15177633Sdfr# If applicable, add the following below this CDDL HEADER, with the
16177633Sdfr# fields enclosed by brackets "[]" replaced with your own identifying
17177633Sdfr# information: Portions Copyright [yyyy] [name of copyright owner]
18177633Sdfr#
19177633Sdfr# CDDL HEADER END
20177633Sdfr#
21177633Sdfr
22177633Sdfr#
23177633Sdfr# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
24177633Sdfr#
25177633Sdfr
26177633SdfrLIBCBASE=.
27177633Sdfr
28177633SdfrLIBRARY= libc.a
29177633SdfrLIB_PIC= libc_pic.a
30177633SdfrVERS=	.1
31177633SdfrCPP=	/usr/lib/cpp
32177633SdfrTARGET_ARCH=	amd64
33177633Sdfr
34177633Sdfr# objects are grouped by source directory
35177633Sdfr
36177633Sdfr# local objects
37177633SdfrSTRETS=
38177633Sdfr
39177633SdfrCRTOBJS=			\
40177633Sdfr	cerror.o
41177633Sdfr
42177633SdfrDYNOBJS=
43177633Sdfr
44177633SdfrFPOBJS=				\
45177633Sdfr	_base_il.o		\
46177633Sdfr	fpgetmask.o		\
47177633Sdfr	fpgetround.o		\
48180025Sdfr	fpsetmask.o		\
49177633Sdfr	fpsetround.o		\
50177633Sdfr	fpstart.o
51177633Sdfr
52177633SdfrI386FPOBJS=			\
53177633Sdfr	_D_cplx_div.o		\
54177633Sdfr	_D_cplx_div_ix.o	\
55177633Sdfr	_D_cplx_div_rx.o	\
56177633Sdfr	_D_cplx_lr_div.o	\
57177633Sdfr	_D_cplx_lr_div_ix.o	\
58177633Sdfr	_D_cplx_lr_div_rx.o	\
59177633Sdfr	_D_cplx_mul.o		\
60177633Sdfr	_F_cplx_div.o		\
61177685Sdfr	_F_cplx_div_ix.o	\
62177633Sdfr	_F_cplx_div_rx.o	\
63177633Sdfr	_F_cplx_lr_div.o	\
64177633Sdfr	_F_cplx_lr_div_ix.o	\
65177633Sdfr	_F_cplx_lr_div_rx.o	\
66177633Sdfr	_F_cplx_mul.o		\
67177633Sdfr	_X_cplx_div.o		\
68177633Sdfr	_X_cplx_div_ix.o	\
69177633Sdfr	_X_cplx_div_rx.o	\
70177633Sdfr	_X_cplx_lr_div.o	\
71177633Sdfr	_X_cplx_lr_div_ix.o	\
72177633Sdfr	_X_cplx_lr_div_rx.o	\
73177633Sdfr	_X_cplx_mul.o
74180025Sdfr
75184588SdfrFPASMOBJS=			\
76177633Sdfr	__xgetRD.o		\
77177633Sdfr	_xtoll.o		\
78177633Sdfr	_xtoull.o		\
79177633Sdfr	fpcw.o			\
80184588Sdfr	fpgetsticky.o		\
81177633Sdfr	fpsetsticky.o
82193272Sjhb
83177633SdfrATOMICOBJS=			\
84177633Sdfr	atomic.o
85177633Sdfr
86177633SdfrXATTROBJS=			\
87177633Sdfr	xattr_common.o
88177633SdfrCOMOBJS=			\
89184588Sdfr	bcmp.o			\
90177633Sdfr	bcopy.o			\
91177633Sdfr	bsearch.o		\
92177633Sdfr	bzero.o			\
93177633Sdfr	ffs.o			\
94177633Sdfr	qsort.o			\
95177633Sdfr	strtol.o		\
96177633Sdfr	strtoul.o		\
97180025Sdfr	strtoll.o		\
98180025Sdfr	strtoull.o
99180025Sdfr
100177633SdfrGENOBJS=			\
101177633Sdfr	_getsp.o		\
102177633Sdfr	abs.o			\
103180025Sdfr	alloca.o		\
104177633Sdfr	attrat.o		\
105177633Sdfr	byteorder.o		\
106177633Sdfr	cuexit.o		\
107184588Sdfr	ecvt.o			\
108177633Sdfr	errlst.o		\
109177633Sdfr	amd64_data.o		\
110177633Sdfr	ldivide.o		\
111177633Sdfr	lock.o			\
112177633Sdfr	makectxt.o		\
113177633Sdfr	memccpy.o		\
114177633Sdfr	memchr.o		\
115193272Sjhb	memcmp.o		\
116177633Sdfr	memcpy.o		\
117177633Sdfr	memset.o		\
118177633Sdfr	new_list.o		\
119177633Sdfr	proc64_id.o		\
120177633Sdfr	proc64_support.o	\
121177633Sdfr	setjmp.o		\
122177633Sdfr	siginfolst.o		\
123177633Sdfr	siglongjmp.o		\
124177633Sdfr	strcmp.o		\
125177633Sdfr	strcpy.o		\
126177633Sdfr	strlen.o		\
127177633Sdfr	strncmp.o		\
128177633Sdfr	strncpy.o		\
129177633Sdfr	strnlen.o		\
130177633Sdfr	sync_instruction_memory.o
131177633Sdfr
132180025Sdfr# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
133184588Sdfr# This macro should ALWAYS be empty; native APIs are already 'large file'.
134184588SdfrCOMSYSOBJS64=
135177633Sdfr
136177633SdfrSYSOBJS64=
137177633Sdfr
138177633SdfrCOMSYSOBJS=			\
139177633Sdfr	__clock_timer.o		\
140177633Sdfr	__getloadavg.o		\
141177633Sdfr	__rusagesys.o		\
142177633Sdfr	__signotify.o		\
143177633Sdfr	__sigrt.o		\
144177633Sdfr	__time.o		\
145177633Sdfr	_lgrp_home_fast.o	\
146177633Sdfr	_lgrpsys.o		\
147177633Sdfr	_nfssys.o		\
148177633Sdfr	_portfs.o		\
149177633Sdfr	_pset.o			\
150177633Sdfr	_rpcsys.o		\
151177633Sdfr	_sigaction.o		\
152184588Sdfr	_so_accept.o		\
153184588Sdfr	_so_bind.o		\
154184588Sdfr	_so_connect.o		\
155177633Sdfr	_so_getpeername.o	\
156177633Sdfr	_so_getsockname.o	\
157184588Sdfr	_so_getsockopt.o	\
158184588Sdfr	_so_listen.o		\
159184588Sdfr	_so_recv.o		\
160177633Sdfr	_so_recvfrom.o		\
161177633Sdfr	_so_recvmsg.o		\
162177633Sdfr	_so_send.o		\
163177633Sdfr	_so_sendmsg.o		\
164177633Sdfr	_so_sendto.o		\
165177633Sdfr	_so_setsockopt.o	\
166177633Sdfr	_so_shutdown.o		\
167177633Sdfr	_so_socket.o		\
168177633Sdfr	_so_socketpair.o	\
169177633Sdfr	_sockconfig.o		\
170177633Sdfr	acct.o			\
171177633Sdfr	acl.o			\
172177633Sdfr	adjtime.o		\
173177633Sdfr	alarm.o			\
174177633Sdfr	brk.o			\
175177633Sdfr	chdir.o			\
176177633Sdfr	chmod.o			\
177177633Sdfr	chroot.o		\
178177633Sdfr	cladm.o			\
179177633Sdfr	close.o			\
180177633Sdfr	execve.o		\
181177633Sdfr	exit.o			\
182177633Sdfr	facl.o			\
183177633Sdfr	fchdir.o		\
184177633Sdfr	fchmod.o		\
185177633Sdfr	fchroot.o		\
186193272Sjhb	fdsync.o		\
187177633Sdfr	fpathconf.o		\
188177633Sdfr	fstatfs.o		\
189177633Sdfr	fstatvfs.o		\
190177633Sdfr	getcpuid.o		\
191177633Sdfr	getdents.o		\
192177633Sdfr	getegid.o		\
193177633Sdfr	geteuid.o		\
194177633Sdfr	getgid.o		\
195177633Sdfr	getgroups.o		\
196177633Sdfr	gethrtime.o		\
197177633Sdfr	getitimer.o		\
198177633Sdfr	getmsg.o		\
199177633Sdfr	getpid.o		\
200177633Sdfr	getpmsg.o		\
201177633Sdfr	getppid.o		\
202177633Sdfr	getrlimit.o		\
203177633Sdfr	getuid.o		\
204177633Sdfr	gtty.o			\
205177633Sdfr	install_utrap.o		\
206177633Sdfr	ioctl.o			\
207177633Sdfr	kaio.o			\
208177633Sdfr	kill.o			\
209177633Sdfr	link.o			\
210177633Sdfr	llseek.o		\
211177633Sdfr	lseek.o			\
212177633Sdfr	mmapobjsys.o		\
213177633Sdfr	memcntl.o		\
214177633Sdfr	mincore.o		\
215177633Sdfr	mkdir.o			\
216177633Sdfr	mknod.o			\
217177633Sdfr	mmap.o			\
218177633Sdfr	modctl.o		\
219177633Sdfr	mount.o			\
220177633Sdfr	mprotect.o		\
221177633Sdfr	munmap.o		\
222180025Sdfr	nice.o			\
223180025Sdfr	ntp_adjtime.o		\
224184588Sdfr	ntp_gettime.o		\
225177633Sdfr	p_online.o		\
226177633Sdfr	pathconf.o		\
227177633Sdfr	pause.o			\
228180025Sdfr	pcsample.o		\
229177633Sdfr	pollsys.o		\
230177633Sdfr	pread.o			\
231177633Sdfr	priocntlset.o		\
232177633Sdfr	processor_bind.o	\
233177633Sdfr	processor_info.o	\
234177633Sdfr	profil.o		\
235177633Sdfr	putmsg.o		\
236177633Sdfr	putpmsg.o		\
237177633Sdfr	pwrite.o		\
238177633Sdfr	read.o			\
239184588Sdfr	readlink.o		\
240184588Sdfr	readv.o			\
241184588Sdfr	resolvepath.o		\
242177633Sdfr	seteguid.o		\
243177633Sdfr	setgid.o		\
244177633Sdfr	setgroups.o		\
245177633Sdfr	setitimer.o		\
246177633Sdfr	setreid.o		\
247177633Sdfr	setrlimit.o		\
248177633Sdfr	setuid.o		\
249177633Sdfr	sigaltstk.o		\
250177633Sdfr	sigprocmsk.o		\
251177633Sdfr	sigsendset.o		\
252177633Sdfr	sigsuspend.o		\
253177633Sdfr	statfs.o		\
254177633Sdfr	statvfs.o		\
255177633Sdfr	stty.o			\
256177633Sdfr	symlink.o		\
257177633Sdfr	sync.o			\
258177633Sdfr	sysconfig.o		\
259177633Sdfr	sysfs.o			\
260177633Sdfr	sysinfo.o		\
261177633Sdfr	syslwp.o		\
262180025Sdfr	times.o			\
263177633Sdfr	ulimit.o		\
264193272Sjhb	umask.o			\
265177633Sdfr	umount2.o		\
266177633Sdfr	utssys.o		\
267193272Sjhb	uucopy.o		\
268193272Sjhb	vhangup.o		\
269177633Sdfr	waitid.o		\
270177633Sdfr	write.o			\
271177633Sdfr	writev.o		\
272177633Sdfr	yield.o
273193272Sjhb
274177633SdfrSYSOBJS=			\
275177633Sdfr	__clock_gettime.o	\
276177633Sdfr	__getcontext.o		\
277177633Sdfr	__uadmin.o		\
278177633Sdfr	_lwp_mutex_unlock.o	\
279177633Sdfr	_stack_grow.o		\
280177633Sdfr	door.o			\
281177633Sdfr	forkx.o			\
282193272Sjhb	forkallx.o		\
283177633Sdfr	getcontext.o		\
284193272Sjhb	gettimeofday.o		\
285193272Sjhb	lwp_private.o		\
286177633Sdfr	nuname.o		\
287177633Sdfr	pipe.o			\
288177633Sdfr	syscall.o		\
289177633Sdfr	sysi86.o		\
290177633Sdfr	tls_get_addr.o		\
291177633Sdfr	uadmin.o		\
292177633Sdfr	umount.o		\
293177633Sdfr	uname.o			\
294177633Sdfr	vforkx.o
295193272Sjhb
296177633Sdfr# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
297177633Sdfr# This macro should ALWAYS be empty; native APIs are already 'large file'.
298177633SdfrPORTGEN64=
299180025Sdfr
300177633Sdfr# objects from source under ../port
301177633SdfrPORTFP=				\
302177633Sdfr	__flt_decim.o		\
303177633Sdfr	__flt_rounds.o		\
304177633Sdfr	__tbl_10_b.o		\
305177633Sdfr	__tbl_10_h.o		\
306177633Sdfr	__tbl_10_s.o		\
307177633Sdfr	__tbl_2_b.o		\
308177633Sdfr	__tbl_2_h.o		\
309177633Sdfr	__tbl_2_s.o		\
310177633Sdfr	__tbl_fdq.o		\
311177633Sdfr	__tbl_tens.o		\
312177633Sdfr	__x_power.o		\
313177633Sdfr	_base_sup.o		\
314177633Sdfr	aconvert.o		\
315177633Sdfr	decimal_bin.o		\
316177633Sdfr	double_decim.o		\
317180025Sdfr	econvert.o		\
318180025Sdfr	fconvert.o		\
319177633Sdfr	file_decim.o		\
320184588Sdfr	finite.o		\
321184588Sdfr	fp_data.o		\
322177633Sdfr	func_decim.o		\
323177633Sdfr	gconvert.o		\
324177633Sdfr	hex_bin.o		\
325193272Sjhb	ieee_globals.o		\
326184588Sdfr	pack_float.o		\
327180025Sdfr	sigfpe.o		\
328184588Sdfr	string_decim.o
329184588Sdfr
330177633SdfrPORTGEN=			\
331177633Sdfr	_env_data.o		\
332177633Sdfr	_xftw.o			\
333180025Sdfr	a64l.o			\
334177633Sdfr	abort.o			\
335180025Sdfr	addsev.o		\
336180025Sdfr	assert.o		\
337180025Sdfr	atof.o			\
338184588Sdfr	atoi.o			\
339177633Sdfr	atol.o			\
340177633Sdfr	atoll.o			\
341184588Sdfr	attropen.o		\
342184588Sdfr	atexit.o		\
343180025Sdfr	atfork.o		\
344177633Sdfr	basename.o		\
345177633Sdfr	calloc.o		\
346193272Sjhb	catgets.o		\
347180025Sdfr	catopen.o		\
348180025Sdfr	cfgetispeed.o		\
349177633Sdfr	cfgetospeed.o		\
350177633Sdfr	cfree.o			\
351184588Sdfr	cfsetispeed.o		\
352180025Sdfr	cfsetospeed.o		\
353180025Sdfr	cftime.o		\
354180025Sdfr	clock.o			\
355180025Sdfr	closedir.o		\
356180025Sdfr	closefrom.o		\
357177633Sdfr	confstr.o		\
358184588Sdfr	crypt.o			\
359180025Sdfr	csetlen.o		\
360184588Sdfr	ctime.o			\
361184588Sdfr	ctime_r.o		\
362180025Sdfr	daemon.o		\
363184588Sdfr	deflt.o			\
364184588Sdfr	directio.o		\
365180025Sdfr	dirname.o		\
366180025Sdfr	div.o			\
367180025Sdfr	drand48.o		\
368180025Sdfr	dup.o			\
369180025Sdfr	env_data.o		\
370177633Sdfr	err.o			\
371180025Sdfr	errno.o			\
372177633Sdfr	euclen.o		\
373180025Sdfr	event_port.o		\
374177633Sdfr	execvp.o		\
375180025Sdfr	fattach.o		\
376180025Sdfr	fdetach.o		\
377180025Sdfr	fdopendir.o		\
378180025Sdfr	fmtmsg.o		\
379177633Sdfr	ftime.o			\
380177633Sdfr	ftok.o			\
381177633Sdfr	ftw.o			\
382177633Sdfr	gcvt.o			\
383177633Sdfr	getauxv.o		\
384177633Sdfr	getcwd.o		\
385177633Sdfr	getdate_err.o		\
386184588Sdfr	getdtblsize.o		\
387184588Sdfr	getenv.o		\
388177633Sdfr	getexecname.o		\
389177633Sdfr	getgrnam.o		\
390177633Sdfr	getgrnam_r.o		\
391177633Sdfr	gethostid.o		\
392177633Sdfr	gethostname.o		\
393177633Sdfr	gethz.o			\
394177633Sdfr	getisax.o		\
395177633Sdfr	getloadavg.o		\
396177633Sdfr	getlogin.o		\
397177633Sdfr	getmntent.o		\
398177633Sdfr	getnetgrent.o		\
399180025Sdfr	getopt.o		\
400180025Sdfr	getopt_long.o		\
401184588Sdfr	getpagesize.o		\
402184588Sdfr	getpw.o			\
403184588Sdfr	getpwnam.o		\
404184588Sdfr	getpwnam_r.o		\
405184588Sdfr	getrusage.o		\
406184588Sdfr	getspent.o		\
407184588Sdfr	getspent_r.o		\
408184588Sdfr	getsubopt.o		\
409184588Sdfr	gettxt.o		\
410177633Sdfr	getusershell.o		\
411180025Sdfr	getut.o			\
412177633Sdfr	getutx.o		\
413177633Sdfr	getvfsent.o		\
414177633Sdfr	getwd.o			\
415177633Sdfr	getwidth.o		\
416177633Sdfr	getxby_door.o		\
417177633Sdfr	gtxt.o			\
418177633Sdfr	hsearch.o		\
419177633Sdfr	iconv.o			\
420177633Sdfr	imaxabs.o		\
421177633Sdfr	imaxdiv.o		\
422177633Sdfr	index.o			\
423184588Sdfr	initgroups.o		\
424184588Sdfr	insque.o		\
425184588Sdfr	isaexec.o		\
426177633Sdfr	isastream.o		\
427177633Sdfr	isatty.o		\
428177633Sdfr	killpg.o		\
429177633Sdfr	klpdlib.o		\
430177633Sdfr	l64a.o			\
431177633Sdfr	lckpwdf.o		\
432177633Sdfr	lconstants.o		\
433177633Sdfr	lexp10.o		\
434184588Sdfr	lfind.o			\
435177633Sdfr	lfmt.o			\
436177633Sdfr	lfmt_log.o		\
437177633Sdfr	lldiv.o			\
438184588Sdfr	llog10.o		\
439184588Sdfr	lltostr.o		\
440184588Sdfr	lmath.o			\
441177633Sdfr	localtime.o		\
442177633Sdfr	lsearch.o		\
443177633Sdfr	madvise.o		\
444184588Sdfr	malloc.o		\
445177633Sdfr	memalign.o		\
446180025Sdfr	mkdev.o			\
447177633Sdfr	mkdtemp.o		\
448184588Sdfr	mkfifo.o		\
449184588Sdfr	mkstemp.o		\
450184588Sdfr	mktemp.o		\
451184588Sdfr	mlock.o			\
452184588Sdfr	mlockall.o		\
453184588Sdfr	mon.o			\
454184588Sdfr	msync.o			\
455184588Sdfr	munlock.o		\
456184588Sdfr	munlockall.o		\
457184588Sdfr	ndbm.o			\
458184588Sdfr	nftw.o			\
459184588Sdfr	nlspath_checks.o	\
460184588Sdfr	nsparse.o		\
461184588Sdfr	nss_common.o		\
462184588Sdfr	nss_dbdefs.o		\
463184588Sdfr	nss_deffinder.o		\
464180025Sdfr	opendir.o		\
465177633Sdfr	opt_data.o		\
466177633Sdfr	perror.o		\
467177633Sdfr	pfmt.o			\
468177633Sdfr	pfmt_data.o		\
469177633Sdfr	pfmt_print.o		\
470177633Sdfr	plock.o			\
471177633Sdfr	poll.o			\
472177633Sdfr	posix_fadvise.o		\
473177633Sdfr	posix_fallocate.o	\
474177633Sdfr	posix_madvise.o		\
475177633Sdfr	posix_memalign.o	\
476177633Sdfr	priocntl.o		\
477177633Sdfr	privlib.o		\
478184588Sdfr	priv_str_xlate.o	\
479184588Sdfr	psiginfo.o		\
480184588Sdfr	psignal.o		\
481184588Sdfr	pt.o			\
482184588Sdfr	putpwent.o		\
483177633Sdfr	putspent.o		\
484177633Sdfr	raise.o			\
485177633Sdfr	rand.o			\
486180025Sdfr	random.o		\
487184588Sdfr	rctlops.o		\
488184588Sdfr	readdir.o		\
489184588Sdfr	readdir_r.o		\
490184588Sdfr	realpath.o		\
491184588Sdfr	reboot.o		\
492184588Sdfr	regexpr.o		\
493184588Sdfr	remove.o		\
494177633Sdfr	rewinddir.o		\
495177633Sdfr	rindex.o		\
496177633Sdfr	scandir.o		\
497177633Sdfr	seekdir.o		\
498177633Sdfr	select.o		\
499180025Sdfr	setlabel.o		\
500177633Sdfr	setpriority.o		\
501180025Sdfr	settimeofday.o		\
502180025Sdfr	sh_locks.o		\
503184588Sdfr	sigflag.o		\
504184588Sdfr	siglist.o		\
505184588Sdfr	sigsend.o		\
506184588Sdfr	sigsetops.o		\
507184588Sdfr	ssignal.o		\
508184588Sdfr	stack.o			\
509184588Sdfr	str2sig.o		\
510177633Sdfr	strcase_charmap.o	\
511177633Sdfr	strcasecmp.o		\
512180025Sdfr	strcat.o		\
513180025Sdfr	strchr.o		\
514184588Sdfr	strcspn.o		\
515184588Sdfr	strdup.o		\
516184588Sdfr	strerror.o		\
517184588Sdfr	strlcat.o		\
518184588Sdfr	strlcpy.o		\
519177633Sdfr	strncasecmp.o		\
520177633Sdfr	strncat.o		\
521177633Sdfr	strpbrk.o		\
522177633Sdfr	strrchr.o		\
523177633Sdfr	strsep.o		\
524177633Sdfr	strsignal.o		\
525180025Sdfr	strspn.o		\
526180025Sdfr	strstr.o		\
527184588Sdfr	strtod.o		\
528184588Sdfr	strtoimax.o		\
529184588Sdfr	strtok.o		\
530184588Sdfr	strtok_r.o		\
531184588Sdfr	strtoumax.o		\
532184588Sdfr	swab.o			\
533177633Sdfr	swapctl.o		\
534177633Sdfr	sysconf.o		\
535177633Sdfr	syslog.o		\
536177633Sdfr	tcdrain.o		\
537177633Sdfr	tcflow.o		\
538177633Sdfr	tcflush.o		\
539180025Sdfr	tcgetattr.o		\
540177633Sdfr	tcgetpgrp.o		\
541180025Sdfr	tcgetsid.o		\
542180025Sdfr	tcsendbreak.o		\
543180025Sdfr	tcsetattr.o		\
544180025Sdfr	tcsetpgrp.o		\
545180025Sdfr	tell.o			\
546184588Sdfr	telldir.o		\
547180025Sdfr	tfind.o			\
548180025Sdfr	time_data.o		\
549180025Sdfr	time_gdata.o		\
550180025Sdfr	truncate.o		\
551177633Sdfr	tsdalloc.o		\
552180025Sdfr	tsearch.o		\
553177633Sdfr	ttyname.o		\
554177633Sdfr	ttyslot.o		\
555180025Sdfr	ualarm.o		\
556184588Sdfr	ucred.o			\
557184588Sdfr	valloc.o		\
558184588Sdfr	vlfmt.o			\
559184588Sdfr	vpfmt.o			\
560184588Sdfr	waitpid.o		\
561177633Sdfr	walkstack.o		\
562177633Sdfr	wdata.o			\
563177633Sdfr	xgetwidth.o		\
564177633Sdfr	xpg4.o			\
565177633Sdfr	xpg6.o
566177633Sdfr
567177633SdfrPORTPRINT_W=			\
568180025Sdfr	doprnt_w.o
569184588Sdfr
570184588SdfrPORTPRINT=			\
571177633Sdfr	asprintf.o		\
572177633Sdfr	doprnt.o		\
573184588Sdfr	fprintf.o		\
574184588Sdfr	printf.o		\
575184588Sdfr	snprintf.o		\
576184588Sdfr	sprintf.o		\
577184588Sdfr	vfprintf.o		\
578184588Sdfr	vprintf.o		\
579184588Sdfr	vsnprintf.o		\
580184588Sdfr	vsprintf.o		\
581184588Sdfr	vwprintf.o		\
582184588Sdfr	wprintf.o
583184588Sdfr
584184588Sdfr# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
585184588Sdfr# This macro should ALWAYS be empty; native APIs are already 'large file'.
586184588SdfrPORTSTDIO64=
587184588Sdfr
588184588SdfrPORTSTDIO_W=			\
589184588Sdfr	doscan_w.o
590184588Sdfr
591184588SdfrPORTSTDIO=			\
592184588Sdfr	__extensions.o		\
593184588Sdfr	_endopen.o		\
594184588Sdfr	_filbuf.o		\
595184588Sdfr	_findbuf.o		\
596184588Sdfr	_flsbuf.o		\
597184588Sdfr	_wrtchk.o		\
598184588Sdfr	clearerr.o		\
599184588Sdfr	ctermid.o		\
600184588Sdfr	ctermid_r.o		\
601184588Sdfr	cuserid.o		\
602184588Sdfr	data.o			\
603184588Sdfr	doscan.o		\
604184588Sdfr	fdopen.o		\
605184588Sdfr	feof.o			\
606184588Sdfr	ferror.o		\
607184588Sdfr	fgetc.o			\
608184588Sdfr	fgets.o			\
609184588Sdfr	fileno.o		\
610184588Sdfr	flockf.o		\
611184588Sdfr	flush.o			\
612184588Sdfr	fopen.o			\
613184588Sdfr	fpos.o			\
614184588Sdfr	fputc.o			\
615177633Sdfr	fputs.o			\
616177633Sdfr	fread.o			\
617177633Sdfr	fseek.o			\
618177633Sdfr	fseeko.o		\
619177633Sdfr	ftell.o			\
620177633Sdfr	ftello.o		\
621177633Sdfr	fwrite.o		\
622177633Sdfr	getc.o			\
623177633Sdfr	getchar.o		\
624184588Sdfr	getpass.o		\
625177633Sdfr	gets.o			\
626184588Sdfr	getw.o			\
627177633Sdfr	mse.o			\
628184588Sdfr	popen.o			\
629177633Sdfr	putc.o			\
630177633Sdfr	putchar.o		\
631177633Sdfr	puts.o			\
632180025Sdfr	putw.o			\
633177633Sdfr	rewind.o		\
634177633Sdfr	scanf.o			\
635180025Sdfr	setbuf.o		\
636184588Sdfr	setbuffer.o		\
637184588Sdfr	setvbuf.o		\
638177633Sdfr	system.o		\
639177633Sdfr	tempnam.o		\
640177633Sdfr	tmpfile.o		\
641177633Sdfr	tmpnam_r.o		\
642180025Sdfr	ungetc.o		\
643184588Sdfr	vscanf.o		\
644184588Sdfr	vwscanf.o		\
645184588Sdfr	wscanf.o
646180025Sdfr
647180025SdfrPORTI18N=			\
648180025Sdfr	__fgetwc_xpg5.o		\
649180025Sdfr	__fgetws_xpg5.o		\
650180025Sdfr	__fputwc_xpg5.o		\
651180025Sdfr	__fputws_xpg5.o		\
652180025Sdfr	__ungetwc_xpg5.o	\
653180025Sdfr	getwchar.o		\
654180025Sdfr	putwchar.o		\
655180025Sdfr	putws.o			\
656184588Sdfr	strtows.o		\
657184588Sdfr	wcsstr.o		\
658184588Sdfr	wcstoimax.o		\
659180025Sdfr	wcstol.o		\
660180025Sdfr	wcstoul.o		\
661180025Sdfr	wcswcs.o		\
662177633Sdfr	wmemchr.o		\
663180025Sdfr	wmemcmp.o		\
664180025Sdfr	wmemcpy.o		\
665180025Sdfr	wmemmove.o		\
666177633Sdfr	wmemset.o		\
667177633Sdfr	wscasecmp.o		\
668180025Sdfr	wscat.o			\
669177633Sdfr	wschr.o			\
670177633Sdfr	wscmp.o			\
671177633Sdfr	wscpy.o			\
672177633Sdfr	wscspn.o		\
673177633Sdfr	wsdup.o			\
674177633Sdfr	wslen.o			\
675177633Sdfr	wsncasecmp.o		\
676177633Sdfr	wsncat.o		\
677177633Sdfr	wsncmp.o		\
678180025Sdfr	wsncpy.o		\
679180025Sdfr	wspbrk.o		\
680180025Sdfr	wsprintf.o		\
681180025Sdfr	wsrchr.o		\
682177633Sdfr	wsscanf.o		\
683180025Sdfr	wsspn.o			\
684177633Sdfr	wstod.o			\
685177633Sdfr	wstok.o			\
686177633Sdfr	wstol.o			\
687184588Sdfr	wstoll.o		\
688184588Sdfr	wsxfrm.o		\
689177633Sdfr	gettext.o		\
690184588Sdfr	gettext_gnu.o		\
691177633Sdfr	gettext_real.o		\
692184588Sdfr	gettext_util.o		\
693184588Sdfr	plural_parser.o		\
694184588Sdfr	wdresolve.o		\
695184588Sdfr	_ctype.o		\
696184588Sdfr	isascii.o		\
697184588Sdfr	toascii.o
698184588Sdfr
699184588SdfrPORTI18N_COND=			\
700184588Sdfr	wcstol_longlong.o	\
701184588Sdfr	wcstoul_longlong.o
702184588Sdfr
703184588SdfrAIOOBJS=			\
704184588Sdfr	aio.o			\
705184588Sdfr	aio_alloc.o		\
706184588Sdfr	posix_aio.o
707184588Sdfr
708184588SdfrRTOBJS=				\
709184588Sdfr	clock_timer.o		\
710184588Sdfr	mqueue.o		\
711184588Sdfr	pos4obj.o		\
712184588Sdfr	sched.o			\
713184588Sdfr	sem.o			\
714184588Sdfr	shm.o			\
715184588Sdfr	sigev_thread.o
716184588Sdfr
717184588SdfrTPOOLOBJS=			\
718184588Sdfr	thread_pool.o
719184588Sdfr
720184588SdfrTHREADSOBJS=			\
721184588Sdfr	alloc.o			\
722184588Sdfr	assfail.o		\
723184588Sdfr	cancel.o		\
724184588Sdfr	door_calls.o		\
725184588Sdfr	pthr_attr.o		\
726177633Sdfr	pthr_barrier.o		\
727177633Sdfr	pthr_cond.o		\
728177633Sdfr	pthr_mutex.o		\
729177633Sdfr	pthr_rwlock.o		\
730177633Sdfr	pthread.o		\
731177633Sdfr	rwlock.o		\
732184588Sdfr	scalls.o		\
733177633Sdfr	sema.o			\
734177633Sdfr	sigaction.o		\
735184588Sdfr	spawn.o			\
736177633Sdfr	synch.o			\
737184588Sdfr	tdb_agent.o		\
738184588Sdfr	thr.o			\
739177633Sdfr	thread_interface.o	\
740177633Sdfr	tls.o			\
741177633Sdfr	tsd.o
742177633Sdfr
743177633SdfrTHREADSMACHOBJS=		\
744184588Sdfr	machdep.o
745177633Sdfr
746177633SdfrTHREADSASMOBJS=			\
747184588Sdfr	asm_subr.o
748184588Sdfr
749177633SdfrUNICODEOBJS=			\
750177633Sdfr	u8_textprep.o		\
751177633Sdfr	uconv.o
752177633Sdfr
753177633SdfrUNWINDMACHOBJS=			\
754180025Sdfr	call_frame_inst.o	\
755180025Sdfr	eh_frame.o		\
756177633Sdfr	thrp_unwind.o		\
757180025Sdfr	unwind.o
758180025Sdfr
759180025Sdfrpics/unwind.o:= COPTFLAG64 =
760180025Sdfr
761177633SdfrUNWINDASMOBJS=			\
762180025Sdfr	unwind_frame.o
763184588Sdfr
764184588Sdfr# Preserved solely to ease maintenance of 32-bit and 64-bit library builds
765184588Sdfr# This macro should ALWAYS be empty; native APIs are already 'large file'.
766180025SdfrPORTSYS64=
767180025Sdfr
768184588SdfrPORTSYS=			\
769177633Sdfr	_autofssys.o		\
770177633Sdfr	access.o		\
771177633Sdfr	acctctl.o		\
772177633Sdfr	bsd_signal.o		\
773177633Sdfr	chown.o			\
774177633Sdfr	corectl.o		\
775177633Sdfr	exacctsys.o		\
776177633Sdfr	execl.o			\
777177633Sdfr	execle.o		\
778177633Sdfr	execv.o			\
779177633Sdfr	fcntl.o			\
780177633Sdfr	getpagesizes.o		\
781177633Sdfr	getpeerucred.o		\
782177633Sdfr	inst_sync.o		\
783177633Sdfr	issetugid.o		\
784177633Sdfr	label.o			\
785177633Sdfr	libc_link.o		\
786177633Sdfr	lockf.o			\
787177633Sdfr	lwp.o			\
788177633Sdfr	lwp_cond.o		\
789177633Sdfr	lwp_rwlock.o		\
790177633Sdfr	lwp_sigmask.o		\
791177633Sdfr	meminfosys.o		\
792177633Sdfr	msgsys.o		\
793177633Sdfr	nfssys.o		\
794177633Sdfr	open.o			\
795177633Sdfr	pgrpsys.o		\
796177633Sdfr	posix_sigwait.o		\
797177633Sdfr	ppriv.o			\
798177633Sdfr	psetsys.o		\
799177633Sdfr	rctlsys.o		\
800177633Sdfr	rename.o		\
801193272Sjhb	sbrk.o			\
802177633Sdfr	semsys.o		\
803177633Sdfr	set_errno.o		\
804193272Sjhb	sharefs.o		\
805177633Sdfr	shmsys.o		\
806177633Sdfr	sidsys.o		\
807177633Sdfr	siginterrupt.o		\
808177633Sdfr	signal.o		\
809177633Sdfr	sigpending.o		\
810177633Sdfr	sigstack.o		\
811177633Sdfr	stat.o			\
812177633Sdfr	tasksys.o		\
813177633Sdfr	time.o			\
814177633Sdfr	time_util.o		\
815177633Sdfr	ucontext.o		\
816177633Sdfr	unlink.o		\
817177633Sdfr	ustat.o			\
818177633Sdfr	utimesys.o		\
819177633Sdfr	zone.o
820177633Sdfr
821177633SdfrPORTREGEX=			\
822177633Sdfr	glob.o			\
823177633Sdfr	regcmp.o		\
824177633Sdfr	regex.o			\
825177633Sdfr	wordexp.o
826177633Sdfr
827177633SdfrVALUES=				\
828177633Sdfr	values-Xa.o
829177633Sdfr
830177633SdfrMOSTOBJS=			\
831177633Sdfr	$(STRETS)		\
832177633Sdfr	$(CRTOBJS)		\
833177633Sdfr	$(DYNOBJS)		\
834177633Sdfr	$(FPOBJS)		\
835177633Sdfr	$(I386FPOBJS)		\
836177633Sdfr	$(FPASMOBJS)		\
837177633Sdfr	$(ATOMICOBJS)		\
838177633Sdfr	$(XATTROBJS)		\
839177633Sdfr	$(COMOBJS)		\
840177633Sdfr	$(GENOBJS)		\
841177633Sdfr	$(PORTFP)		\
842177633Sdfr	$(PORTGEN)		\
843177633Sdfr	$(PORTGEN64)		\
844177633Sdfr	$(PORTI18N)		\
845177633Sdfr	$(PORTI18N_COND)	\
846177633Sdfr	$(PORTPRINT)		\
847177633Sdfr	$(PORTPRINT_W)		\
848177633Sdfr	$(PORTREGEX)		\
849177633Sdfr	$(PORTSTDIO)		\
850177633Sdfr	$(PORTSTDIO64)		\
851177633Sdfr	$(PORTSTDIO_W)		\
852177633Sdfr	$(PORTSYS)		\
853177633Sdfr	$(PORTSYS64)		\
854177633Sdfr	$(AIOOBJS)		\
855177633Sdfr	$(RTOBJS)		\
856177633Sdfr	$(TPOOLOBJS)		\
857177633Sdfr	$(THREADSOBJS)		\
858177633Sdfr	$(THREADSMACHOBJS)	\
859177633Sdfr	$(THREADSASMOBJS)	\
860177633Sdfr	$(UNICODEOBJS)		\
861177633Sdfr	$(UNWINDMACHOBJS)	\
862177633Sdfr	$(UNWINDASMOBJS)	\
863177633Sdfr	$(COMSYSOBJS)		\
864177633Sdfr	$(SYSOBJS)		\
865177633Sdfr	$(COMSYSOBJS64)		\
866177633Sdfr	$(SYSOBJS64)		\
867177633Sdfr	$(VALUES)
868177633Sdfr
869177633SdfrTRACEOBJS=			\
870177633Sdfr	plockstat.o
871177633Sdfr
872177633Sdfr# NOTE:	libc.so.1 must be linked with the minimal crti.o and crtn.o
873177633Sdfr# modules whose source is provided in the $(SRC)/lib/common directory.
874177633Sdfr# This must be done because otherwise the Sun C compiler would insert
875177633Sdfr# its own versions of these modules and those versions contain code
876177633Sdfr# to call out to C++ initialization functions.  Such C++ initialization
877177633Sdfr# functions can call back into libc before thread initialization is
878177633Sdfr# complete and this leads to segmentation violations and other problems.
879177633Sdfr# Since libc contains no C++ code, linking with the minimal crti.o and
880177633Sdfr# crtn.o modules is safe and avoids the problems described above.
881177633SdfrOBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
882177633SdfrCRTSRCS= ../../common/amd64
883177633Sdfr
884177633Sdfr# include common library definitions
885177633Sdfrinclude ../../Makefile.lib
886177633Sdfrinclude ../../Makefile.lib.64
887177633Sdfr
888177633Sdfr# NOTE: libc_i18n.a will be part of libc.so.1.  Therefore, the compilation
889177633Sdfr# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
890177633Sdfr# need to be compatible with the ones for the libc stuff.  Whenever the changes
891177633Sdfr# that affect the compilation conditions of libc happened, those for libc_i18n
892177633Sdfr# also need to be updated.
893177633Sdfr
894177633SdfrCFLAGS64 += $(CTF_FLAGS)
895177633Sdfr
896177633Sdfr# This is necessary to avoid problems with calling _ex_unwind().
897177633Sdfr# We probably don't want any inlining anyway.
898177633SdfrCFLAGS64 += -xinline=
899177633Sdfr
900177633Sdfr# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
901177633Sdfr# enables ASSERT() checking in the threads portion of the library.
902177633Sdfr# This is automatically enabled for DEBUG builds, not for non-debug builds.
903177633SdfrTHREAD_DEBUG =
904177633Sdfr$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG
905184588Sdfr
906177633Sdfr# Make string literals read-only to save memory
907177633SdfrCFLAGS64 += $(XSTRCONST)
908177633Sdfr
909177633SdfrALTPICS= $(TRACEOBJS:%=pics/%)
910177633Sdfr
911177633Sdfr$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a
912177633Sdfr$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS)
913177633Sdfr
914177633SdfrMAPFILES =	../port/mapfile-vers
915177633Sdfr
916177633SdfrCPPFLAGS=	-D_REENTRANT -D$(MACH64) -D__$(MACH64) $(THREAD_DEBUG) \
917177633Sdfr		-I. -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) -I/usr/include
918177633SdfrASFLAGS=	$(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) \
919177633Sdfr		$(amd64_AS_XARCH)
920177633Sdfr
921177633Sdfr# As a favor to the dtrace syscall provider, libc still calls the
922177633Sdfr# old syscall traps that have been obsoleted by the *at() interfaces.
923177633Sdfr# Delete this to compile libc using only the new *at() system call traps
924177633SdfrCPPFLAGS += -D_RETAIN_OLD_SYSCALLS
925177633Sdfr
926177633Sdfr# proc64_id.o is built with defines in $(SRC)/uts/intel/sys/x86_archext.h
927177633Sdfrpics/proc64_id.o	:= CFLAGS64 += -I$(SRC)/uts/intel
928177633Sdfr
929177633Sdfr# Inform the run-time linker about libc specialized initialization
930177633SdfrRTLDINFO =	-z rtldinfo=tls_rtldinfo
931184588SdfrDYNFLAGS +=	$(RTLDINFO)
932177633Sdfr
933177633Sdfr# Force libc's internal references to be resolved immediately upon loading
934193272Sjhb# in order to avoid critical region problems.  Since almost all libc symbols
935180025Sdfr# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20).
936177633SdfrDYNFLAGS +=	-znow
937193272Sjhb
938180025SdfrBUILD.s=	$(AS) $(ASFLAGS) $< -o $@
939177633Sdfr
940184588Sdfr# Override this top level flag so the compiler builds in its native
941184588Sdfr# C99 mode.  This has been enabled to support the complex arithmetic
942184588Sdfr# added to libc.
943184588SdfrC99MODE=	$(C99_ENABLE)
944184588Sdfr
945184588Sdfr# libc method of building an archive
946184588SdfrBUILD.AR= $(RM) $@ ; \
947184588Sdfr	$(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)`
948184588Sdfr
949184588Sdfr# extra files for the clean target
950184588SdfrCLEANFILES=			\
951184588Sdfr	../port/gen/errlst.c	\
952184588Sdfr	../port/gen/new_list.c	\
953180025Sdfr	assym.h			\
954180025Sdfr	genassym		\
955180025Sdfr	crt/_rtld.s		\
956180025Sdfr	pics/crti.o		\
957180025Sdfr	pics/crtn.o		\
958180025Sdfr	$(ALTPICS)
959180025Sdfr
960180025SdfrCLOBBERFILES +=	$(LIB_PIC)
961180025Sdfr
962180025Sdfr# list of C source for lint
963180025SdfrSRCS=							\
964180025Sdfr	$(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c)	\
965180025Sdfr	$(XATTROBJS:%.o=$(SRC)/common/xattr/%.c)	\
966180025Sdfr	$(COMOBJS:%.o=$(SRC)/common/util/%.c)		\
967180025Sdfr	$(PORTFP:%.o=../port/fp/%.c)			\
968180025Sdfr	$(PORTGEN:%.o=../port/gen/%.c)			\
969184588Sdfr	$(PORTI18N:%.o=../port/i18n/%.c)		\
970184588Sdfr	$(PORTPRINT:%.o=../port/print/%.c)		\
971184588Sdfr	$(PORTREGEX:%.o=../port/regex/%.c)		\
972184588Sdfr	$(PORTSTDIO:%.o=../port/stdio/%.c)		\
973184588Sdfr	$(PORTSYS:%.o=../port/sys/%.c)			\
974184588Sdfr	$(AIOOBJS:%.o=../port/aio/%.c)			\
975184588Sdfr	$(RTOBJS:%.o=../port/rt/%.c)			\
976184588Sdfr	$(TPOOLOBJS:%.o=../port/tpool/%.c)		\
977184588Sdfr	$(THREADSOBJS:%.o=../port/threads/%.c)		\
978184588Sdfr	$(THREADSMACHOBJS:%.o=threads/%.c)		\
979184588Sdfr	$(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c)	\
980193272Sjhb	$(UNWINDMACHOBJS:%.o=unwind/%.c)		\
981184588Sdfr	$(FPOBJS:%.o=fp/%.c)				\
982184588Sdfr	$(I386FPOBJS:%.o=../i386/fp/%.c)		\
983184588Sdfr	$(LIBCBASE)/gen/ecvt.c				\
984193272Sjhb	$(LIBCBASE)/gen/makectxt.c			\
985184588Sdfr	$(LIBCBASE)/gen/siginfolst.c			\
986184588Sdfr	$(LIBCBASE)/gen/siglongjmp.c			\
987184588Sdfr	$(LIBCBASE)/gen/sync_instruction_memory.c	\
988184588Sdfr	$(LIBCBASE)/sys/uadmin.c
989177633Sdfr
990177633Sdfr# conditional assignments
991180025Sdfr# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o
992180025Sdfr$(DYNLIB) := CRTI = crti.o
993193272Sjhb$(DYNLIB) := CRTN = crtn.o
994177633Sdfr
995177633Sdfr# Files which need the threads .il inline template
996177633SdfrTIL=				\
997177633Sdfr	aio.o			\
998177633Sdfr	alloc.o			\
999177633Sdfr	assfail.o		\
1000177633Sdfr	atexit.o		\
1001177633Sdfr	atfork.o		\
1002180025Sdfr	cancel.o		\
1003177633Sdfr	door_calls.o		\
1004177633Sdfr	errno.o			\
1005177633Sdfr	lwp.o			\
1006177633Sdfr	ma.o			\
1007177633Sdfr	machdep.o		\
1008177633Sdfr	posix_aio.o		\
1009177633Sdfr	pthr_attr.o		\
1010177633Sdfr	pthr_barrier.o		\
1011177633Sdfr	pthr_cond.o		\
1012177633Sdfr	pthr_mutex.o		\
1013177633Sdfr	pthr_rwlock.o		\
1014177633Sdfr	pthread.o		\
1015177633Sdfr	rand.o			\
1016177633Sdfr	rwlock.o		\
1017177633Sdfr	scalls.o		\
1018177633Sdfr	sched.o			\
1019177633Sdfr	sema.o			\
1020177633Sdfr	sigaction.o		\
1021177633Sdfr	sigev_thread.o		\
1022177633Sdfr	spawn.o			\
1023177633Sdfr	stack.o			\
1024177633Sdfr	synch.o			\
1025177633Sdfr	tdb_agent.o		\
1026177633Sdfr	thr.o			\
1027177633Sdfr	thread_interface.o	\
1028193272Sjhb	thread_pool.o		\
1029177633Sdfr	thrp_unwind.o		\
1030177633Sdfr	tls.o			\
1031177633Sdfr	tsd.o
1032177633Sdfr
1033177633Sdfr$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il
1034177633Sdfr
1035177633Sdfr# pics/mul64.o := CFLAGS64 += crt/mul64.il
1036177633Sdfr
1037177633Sdfr# large-file-aware components that should be built large
1038177633Sdfr
1039177633Sdfr#$(COMSYSOBJS64:%=pics/%) := \
1040177633Sdfr#	CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1041177633Sdfr
1042193272Sjhb#$(SYSOBJS64:%=pics/%) := \
1043177633Sdfr#	CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1044177633Sdfr
1045177633Sdfr#$(PORTGEN64:%=pics/%) := \
1046177633Sdfr#	CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1047177633Sdfr
1048177633Sdfr#$(PORTSTDIO64:%=pics/%) := \
1049193272Sjhb#	CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1050177633Sdfr
1051177633Sdfr#$(PORTSYS64:%=pics/%) := \
1052177633Sdfr#	CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1053177633Sdfr
1054177633Sdfr$(PORTSTDIO_W:%=pics/%) := \
1055177633Sdfr	CPPFLAGS += -D_WIDE
1056177633Sdfr
1057177633Sdfr$(PORTPRINT_W:%=pics/%) := \
1058177633Sdfr	CPPFLAGS += -D_WIDE
1059177633Sdfr
1060177633Sdfr$(PORTPRINT_C89:%=pics/%) := \
1061180025Sdfr	CPPFLAGS += -D_C89_INTMAX32
1062177633Sdfr
1063177633Sdfr$(PORTSTDIO_C89:%=pics/%) := \
1064177633Sdfr	CPPFLAGS += -D_C89_INTMAX32
1065177633Sdfr
1066177633Sdfr$(PORTI18N_COND:%=pics/%) := \
1067177633Sdfr	CPPFLAGS += -D_WCS_LONGLONG
1068177633Sdfr
1069177633Sdfr.KEEP_STATE:
1070177633Sdfr
1071177633Sdfrall: $(LIBS) $(LIB_PIC)
1072184588Sdfr
1073184588Sdfrlint	:=	CPPFLAGS += -I../$(MACH)/fp
1074177633Sdfrlint	:=	CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
1075180025Sdfrlint	:=	LINTFLAGS64 += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
1076180025Sdfr
1077180025Sdfrlint:
1078180025Sdfr	@echo $(LINT.c) ... $(LDLIBS)
1079180025Sdfr	@$(LINT.c) $(SRCS) $(LDLIBS)
1080177633Sdfr
1081177633Sdfr$(LINTLIB):= SRCS=../port/llib-lc
1082177633Sdfr$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
1083177633Sdfr$(LINTLIB):= LINTFLAGS64=-nvx -m64
1084177633Sdfr
1085177633Sdfr# object files that depend on inline template
1086177633Sdfr$(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il
1087177633Sdfr# pics/mul64.o: crt/mul64.il
1088177633Sdfr
1089177633Sdfr# include common libc targets
1090180025Sdfrinclude ../Makefile.targ
1091177633Sdfr
1092180025Sdfr# We need to strip out all CTF data from the static library
1093180025Sdfr$(LIB_PIC) := DIR = pics
1094180025Sdfr$(LIB_PIC): pics $$(PICS)
1095180025Sdfr	$(BUILD.AR)
1096177633Sdfr	$(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1
1097177633Sdfr	$(AR) -ts $@ > /dev/null
1098177633Sdfr	$(POST_PROCESS_A)
1099177633Sdfr
1100177633SdfrASSYMDEP_OBJS=			\
1101177633Sdfr	_lwp_mutex_unlock.o	\
1102177633Sdfr	_stack_grow.o		\
1103177633Sdfr	asm_subr.o		\
1104177633Sdfr	getcontext.o		\
1105177633Sdfr	setjmp.o		\
1106177633Sdfr	tls_get_addr.o		\
1107177633Sdfr	vforkx.o
1108177633Sdfr
1109177633Sdfr$(ASSYMDEP_OBJS:%=pics/%): assym.h
1110177633Sdfr
1111177633Sdfr# assym.h build rules
1112177633Sdfr
1113177633SdfrGENASSYM_C = genassym.c
1114193272Sjhb
1115177633Sdfr# XXX	A hack.  Perhaps this should be 'CPPFLAGS.native' and
1116177633Sdfr#	live in Makefile.master
1117
1118CPPFLAGS.genassym = \
1119	$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
1120
1121genassym: $(GENASSYM_C)
1122	$(NATIVECC) -Iinc -I../inc $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C)
1123
1124OFFSETS = ../$(MACH)/offsets.in
1125
1126assym.h: $(OFFSETS) genassym
1127	$(OFFSETS_CREATE) <$(OFFSETS) >$@
1128	./genassym >>$@
1129
1130# derived C source and related explicit dependencies
1131../port/gen/errlst.c + \
1132../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk
1133	cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist
1134
1135pics/errlst.o: ../port/gen/errlst.c
1136
1137pics/new_list.o: ../port/gen/new_list.c
1138