xref: /titanic_44/usr/src/lib/libast/Makefile.com (revision 75ce41a57ff334bd8fe2cb9ed51eea835892f944)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27SHELL=/usr/bin/ksh93
28
29LIBRARY=	libast.a
30VERS=		.1
31
32# platform-independent sources are in common/
33OBJECTS += \
34	common/cdt/dtclose.o \
35	common/cdt/dtdisc.o \
36	common/cdt/dtextract.o \
37	common/cdt/dtflatten.o \
38	common/cdt/dthash.o \
39	common/cdt/dtlist.o \
40	common/cdt/dtmethod.o \
41	common/cdt/dtnew.o \
42	common/cdt/dtopen.o \
43	common/cdt/dtrenew.o \
44	common/cdt/dtrestore.o \
45	common/cdt/dtsize.o \
46	common/cdt/dtstat.o \
47	common/cdt/dtstrhash.o \
48	common/cdt/dttree.o \
49	common/cdt/dttreeset.o \
50	common/cdt/dtview.o \
51	common/cdt/dtwalk.o \
52	common/comp/atexit.o \
53	common/comp/basename.o \
54	common/comp/catopen.o \
55	common/comp/closelog.o \
56	common/comp/creat64.o \
57	common/comp/dirname.o \
58	common/comp/dup2.o \
59	common/comp/eaccess.o \
60	common/comp/errno.o \
61	common/comp/execlp.o \
62	common/comp/execve.o \
63	common/comp/execvp.o \
64	common/comp/execvpe.o \
65	common/comp/fcntl.o \
66	common/comp/fmtmsglib.o \
67	common/comp/fnmatch.o \
68	common/comp/frexp.o \
69	common/comp/frexpl.o \
70	common/comp/fsync.o \
71	common/comp/ftw.o \
72	common/comp/getdate.o \
73	common/comp/getgroups.o \
74	common/comp/getlogin.o \
75	common/comp/getopt.o \
76	common/comp/getoptl.o \
77	common/comp/getpgrp.o \
78	common/comp/getsubopt.o \
79	common/comp/getwd.o \
80	common/comp/gross.o \
81	common/comp/hsearch.o \
82	common/comp/iconv.o \
83	common/comp/killpg.o \
84	common/comp/link.o \
85	common/comp/localeconv.o \
86	common/comp/lstat.o \
87	common/comp/memccpy.o \
88	common/comp/memchr.o \
89	common/comp/memcmp.o \
90	common/comp/memcpy.o \
91	common/comp/memmove.o \
92	common/comp/memset.o \
93	common/comp/mkdir.o \
94	common/comp/mkfifo.o \
95	common/comp/mknod.o \
96	common/comp/mktemp.o \
97	common/comp/mktime.o \
98	common/comp/mount.o \
99	common/comp/nftw.o \
100	common/comp/omitted.o \
101	common/comp/open.o \
102	common/comp/openlog.o \
103	common/comp/putenv.o \
104	common/comp/re_comp.o \
105	common/comp/readlink.o \
106	common/comp/realpath.o \
107	common/comp/regcmp.o \
108	common/comp/regexp.o \
109	common/comp/remove.o \
110	common/comp/rename.o \
111	common/comp/resolvepath.o \
112	common/comp/rmdir.o \
113	common/comp/setenv.o \
114	common/comp/setlocale.o \
115	common/comp/setlogmask.o \
116	common/comp/setpgid.o \
117	common/comp/setsid.o \
118	common/comp/sigunblock.o \
119	common/comp/spawnveg.o \
120	common/comp/statvfs.o \
121	common/comp/strcasecmp.o \
122	common/comp/strchr.o \
123	common/comp/strftime.o \
124	common/comp/strncasecmp.o \
125	common/comp/strptime.o \
126	common/comp/strrchr.o \
127	common/comp/strstr.o \
128	common/comp/strtod.o \
129	common/comp/strtol.o \
130	common/comp/strtold.o \
131	common/comp/strtoll.o \
132	common/comp/strtoul.o \
133	common/comp/strtoull.o \
134	common/comp/swab.o \
135	common/comp/symlink.o \
136	common/comp/syslog.o \
137	common/comp/system.o \
138	common/comp/tempnam.o \
139	common/comp/tmpnam.o \
140	common/comp/transition.o \
141	common/comp/tsearch.o \
142	common/comp/unlink.o \
143	common/comp/unsetenv.o \
144	common/comp/vfork.o \
145	common/comp/waitpid.o \
146	common/comp/wc.o \
147	common/comp/wordexp.o \
148	common/dir/getdents.o \
149	common/dir/opendir.o \
150	common/dir/readdir.o \
151	common/dir/rewinddir.o \
152	common/dir/seekdir.o \
153	common/dir/telldir.o \
154	common/disc/memfatal.o \
155	common/disc/sfdcdio.o \
156	common/disc/sfdcdos.o \
157	common/disc/sfdcfilter.o \
158	common/disc/sfdcmore.o \
159	common/disc/sfdcprefix.o \
160	common/disc/sfdcseekable.o \
161	common/disc/sfdcslow.o \
162	common/disc/sfdcsubstr.o \
163	common/disc/sfdctee.o \
164	common/disc/sfdcunion.o \
165	common/disc/sfkeyprintf.o \
166	common/disc/sfstrtmp.o \
167	common/hash/hashalloc.o \
168	common/hash/hashdump.o \
169	common/hash/hashfree.o \
170	common/hash/hashlast.o \
171	common/hash/hashlook.o \
172	common/hash/hashscan.o \
173	common/hash/hashsize.o \
174	common/hash/hashview.o \
175	common/hash/hashwalk.o \
176	common/hash/memhash.o \
177	common/hash/memsum.o \
178	common/hash/strhash.o \
179	common/hash/strkey.o \
180	common/hash/strsum.o \
181	common/misc/astintercept.o \
182	common/misc/debug.o \
183	common/misc/cmdarg.o \
184	common/misc/error.o \
185	common/misc/errorf.o \
186	common/misc/errormsg.o \
187	common/misc/errorx.o \
188	common/misc/fastfind.o \
189	common/misc/fmtrec.o \
190	common/misc/fs3d.o \
191	common/misc/fts.o \
192	common/misc/ftwalk.o \
193	common/misc/ftwflags.o \
194	common/misc/getcwd.o \
195	common/misc/getenv.o \
196	common/misc/glob.o \
197	common/misc/liberror.o \
198	common/misc/libevent.o \
199	common/misc/magic.o \
200	common/misc/mime.o \
201	common/misc/mimetype.o \
202	common/misc/optesc.o \
203	common/misc/optget.o \
204	common/misc/optjoin.o \
205	common/misc/optctx.o \
206	common/misc/procclose.o \
207	common/misc/procfree.o \
208	common/misc/procopen.o \
209	common/misc/procrun.o \
210	common/misc/recfmt.o \
211	common/misc/reclen.o \
212	common/misc/recstr.o \
213	common/misc/setenviron.o \
214	common/misc/sigcrit.o \
215	common/misc/sigdata.o \
216	common/misc/signal.o \
217	common/misc/stack.o \
218	common/misc/state.o \
219	common/misc/stk.o \
220	common/misc/systrace.o \
221	common/misc/translate.o \
222	common/misc/univdata.o \
223	common/obsolete/spawn.o \
224	common/path/pathaccess.o \
225	common/path/pathbin.o \
226	common/path/pathcanon.o \
227	common/path/pathcat.o \
228	common/path/pathcd.o \
229	common/path/pathcheck.o \
230	common/path/pathexists.o \
231	common/path/pathfind.o \
232	common/path/pathgetlink.o \
233	common/path/pathkey.o \
234	common/path/pathnative.o \
235	common/path/pathpath.o \
236	common/path/pathposix.o \
237	common/path/pathprobe.o \
238	common/path/pathrepl.o \
239	common/path/pathsetlink.o \
240	common/path/pathshell.o \
241	common/path/pathstat.o \
242	common/path/pathtemp.o \
243	common/path/pathtmp.o \
244	common/port/astconf.o \
245	common/port/astcopy.o \
246	common/port/astdynamic.o \
247	common/port/astlicense.o \
248	common/port/astquery.o \
249	common/port/aststatic.o \
250	common/port/astwinsize.o \
251	common/port/iblocks.o \
252	common/port/lc.o \
253	common/port/mc.o \
254	common/port/mnt.o \
255	common/port/touch.o \
256	common/preroot/getpreroot.o \
257	common/preroot/ispreroot.o \
258	common/preroot/realopen.o \
259	common/preroot/setpreroot.o \
260	common/regex/regalloc.o \
261	common/regex/regcache.o \
262	common/regex/regclass.o \
263	common/regex/regcoll.o \
264	common/regex/regcomp.o \
265	common/regex/regdecomp.o \
266	common/regex/regerror.o \
267	common/regex/regexec.o \
268	common/regex/regfatal.o \
269	common/regex/reginit.o \
270	common/regex/regnexec.o \
271	common/regex/regrecord.o \
272	common/regex/regrexec.o \
273	common/regex/regstat.o \
274	common/regex/regsub.o \
275	common/regex/regsubcomp.o \
276	common/regex/regsubexec.o \
277	common/sfio/_sfclrerr.o \
278	common/sfio/_sfdlen.o \
279	common/sfio/_sfeof.o \
280	common/sfio/_sferror.o \
281	common/sfio/_sffileno.o \
282	common/sfio/_sfgetc.o \
283	common/sfio/_sfgetl.o \
284	common/sfio/_sfgetl2.o \
285	common/sfio/_sfgetu.o \
286	common/sfio/_sfgetu2.o \
287	common/sfio/_sfllen.o \
288	common/sfio/_sfopen.o \
289	common/sfio/_sfputc.o \
290	common/sfio/_sfputd.o \
291	common/sfio/_sfputl.o \
292	common/sfio/_sfputm.o \
293	common/sfio/_sfputu.o \
294	common/sfio/_sfslen.o \
295	common/sfio/_sfstacked.o \
296	common/sfio/_sfulen.o \
297	common/sfio/_sfvalue.o \
298	common/sfio/sfclose.o \
299	common/sfio/sfclrlock.o \
300	common/sfio/sfcvt.o \
301	common/sfio/sfdisc.o \
302	common/sfio/sfdlen.o \
303	common/sfio/sfecvt.o \
304	common/sfio/sfexcept.o \
305	common/sfio/sfextern.o \
306	common/sfio/sffcvt.o \
307	common/sfio/sffilbuf.o \
308	common/sfio/sfflsbuf.o \
309	common/sfio/sfgetd.o \
310	common/sfio/sfgetl.o \
311	common/sfio/sfgetm.o \
312	common/sfio/sfgetr.o \
313	common/sfio/sfgetu.o \
314	common/sfio/sfllen.o \
315	common/sfio/sfmode.o \
316	common/sfio/sfmove.o \
317	common/sfio/sfmutex.o \
318	common/sfio/sfnew.o \
319	common/sfio/sfnotify.o \
320	common/sfio/sfnputc.o \
321	common/sfio/sfopen.o \
322	common/sfio/sfpeek.o \
323	common/sfio/sfpkrd.o \
324	common/sfio/sfpoll.o \
325	common/sfio/sfpool.o \
326	common/sfio/sfpopen.o \
327	common/sfio/sfprintf.o \
328	common/sfio/sfprints.o \
329	common/sfio/sfpurge.o \
330	common/sfio/sfputd.o \
331	common/sfio/sfputl.o \
332	common/sfio/sfputm.o \
333	common/sfio/sfputr.o \
334	common/sfio/sfputu.o \
335	common/sfio/sfraise.o \
336	common/sfio/sfrd.o \
337	common/sfio/sfread.o \
338	common/sfio/sfreserve.o \
339	common/sfio/sfresize.o \
340	common/sfio/sfscanf.o \
341	common/sfio/sfseek.o \
342	common/sfio/sfset.o \
343	common/sfio/sfsetbuf.o \
344	common/sfio/sfsetfd.o \
345	common/sfio/sfsize.o \
346	common/sfio/sfsk.o \
347	common/sfio/sfstack.o \
348	common/sfio/sfstrtod.o \
349	common/sfio/sfswap.o \
350	common/sfio/sfsync.o \
351	common/sfio/sftable.o \
352	common/sfio/sftell.o \
353	common/sfio/sftmp.o \
354	common/sfio/sfungetc.o \
355	common/sfio/sfvprintf.o \
356	common/sfio/sfvscanf.o \
357	common/sfio/sfwr.o \
358	common/sfio/sfwrite.o \
359	common/stdio/_doprnt.o \
360	common/stdio/_doscan.o \
361	common/stdio/_filbuf.o \
362	common/stdio/_flsbuf.o \
363	common/stdio/_stdfun.o \
364	common/stdio/_stdopen.o \
365	common/stdio/_stdprintf.o \
366	common/stdio/_stdscanf.o \
367	common/stdio/_stdsprnt.o \
368	common/stdio/_stdvbuf.o \
369	common/stdio/_stdvsnprnt.o \
370	common/stdio/_stdvsprnt.o \
371	common/stdio/_stdvsscn.o \
372	common/stdio/asprintf.o \
373	common/stdio/clearerr.o \
374	common/stdio/fclose.o \
375	common/stdio/fdopen.o \
376	common/stdio/feof.o \
377	common/stdio/ferror.o \
378	common/stdio/fflush.o \
379	common/stdio/fgetc.o \
380	common/stdio/fgetpos.o \
381	common/stdio/fgets.o \
382	common/stdio/fgetwc.o \
383	common/stdio/fgetws.o \
384	common/stdio/fileno.o \
385	common/stdio/flockfile.o \
386	common/stdio/fopen.o \
387	common/stdio/fprintf.o \
388	common/stdio/fpurge.o \
389	common/stdio/fputc.o \
390	common/stdio/fputs.o \
391	common/stdio/fputwc.o \
392	common/stdio/fputws.o \
393	common/stdio/funlockfile.o \
394	common/stdio/fread.o \
395	common/stdio/freopen.o \
396	common/stdio/fscanf.o \
397	common/stdio/fseek.o \
398	common/stdio/fseeko.o \
399	common/stdio/fsetpos.o \
400	common/stdio/ftell.o \
401	common/stdio/ftello.o \
402	common/stdio/ftrylockfile.o \
403	common/stdio/fwide.o \
404	common/stdio/fwprintf.o \
405	common/stdio/fwrite.o \
406	common/stdio/fwscanf.o \
407	common/stdio/getc.o \
408	common/stdio/getchar.o \
409	common/stdio/getw.o \
410	common/stdio/getwc.o \
411	common/stdio/getwchar.o \
412	common/stdio/pclose.o \
413	common/stdio/popen.o \
414	common/stdio/printf.o \
415	common/stdio/putc.o \
416	common/stdio/putchar.o \
417	common/stdio/puts.o \
418	common/stdio/putw.o \
419	common/stdio/putwc.o \
420	common/stdio/putwchar.o \
421	common/stdio/rewind.o \
422	common/stdio/scanf.o \
423	common/stdio/setbuf.o \
424	common/stdio/setbuffer.o \
425	common/stdio/setlinebuf.o \
426	common/stdio/setvbuf.o \
427	common/stdio/snprintf.o \
428	common/stdio/sprintf.o \
429	common/stdio/sscanf.o \
430	common/stdio/stdio_c99.o \
431	common/stdio/stdio_gnu.o \
432	common/stdio/swprintf.o \
433	common/stdio/swscanf.o \
434	common/stdio/tmpfile.o \
435	common/stdio/ungetc.o \
436	common/stdio/ungetwc.o \
437	common/stdio/vasprintf.o \
438	common/stdio/vfprintf.o \
439	common/stdio/vfscanf.o \
440	common/stdio/vfwprintf.o \
441	common/stdio/vfwscanf.o \
442	common/stdio/vprintf.o \
443	common/stdio/vscanf.o \
444	common/stdio/vsnprintf.o \
445	common/stdio/vsprintf.o \
446	common/stdio/vsscanf.o \
447	common/stdio/vswprintf.o \
448	common/stdio/vswscanf.o \
449	common/stdio/vwprintf.o \
450	common/stdio/vwscanf.o \
451	common/stdio/wprintf.o \
452	common/stdio/wscanf.o \
453	common/string/base64.o \
454	common/string/ccmap.o \
455	common/string/ccmapid.o \
456	common/string/ccnative.o \
457	common/string/chresc.o \
458	common/string/chrtoi.o \
459	common/string/fmtbase.o \
460	common/string/fmtbuf.o \
461	common/string/fmtclock.o \
462	common/string/fmtdev.o \
463	common/string/fmtelapsed.o \
464	common/string/fmterror.o \
465	common/string/fmtesc.o \
466	common/string/fmtfmt.o \
467	common/string/fmtfs.o \
468	common/string/fmtgid.o \
469	common/string/fmtident.o \
470	common/string/fmtip4.o \
471	common/string/fmtip6.o \
472	common/string/fmtls.o \
473	common/string/fmtmatch.o \
474	common/string/fmtmode.o \
475	common/string/fmtnum.o \
476	common/string/fmtperm.o \
477	common/string/fmtre.o \
478	common/string/fmtscale.o \
479	common/string/fmtsignal.o \
480	common/string/fmttime.o \
481	common/string/fmttmx.o \
482	common/string/fmttv.o \
483	common/string/fmtuid.o \
484	common/string/fmtversion.o \
485	common/string/memdup.o \
486	common/string/modedata.o \
487	common/string/modei.o \
488	common/string/modex.o \
489	common/string/stracmp.o \
490	common/string/strcopy.o \
491	common/string/strdup.o \
492	common/string/strelapsed.o \
493	common/string/strerror.o \
494	common/string/stresc.o \
495	common/string/streval.o \
496	common/string/strexpr.o \
497	common/string/strgid.o \
498	common/string/strlcat.o \
499	common/string/strlcpy.o \
500	common/string/strlook.o \
501	common/string/strmatch.o \
502	common/string/strmode.o \
503	common/string/strnacmp.o \
504	common/string/strncopy.o \
505	common/string/strntod.o \
506	common/string/strntol.o \
507	common/string/strntold.o \
508	common/string/strntoll.o \
509	common/string/strnton.o \
510	common/string/strntoul.o \
511	common/string/strntonll.o \
512	common/string/strntoull.o \
513	common/string/stropt.o \
514	common/string/strperm.o \
515	common/string/strpsearch.o \
516	common/string/strsearch.o \
517	common/string/strsort.o \
518	common/string/strtape.o \
519	common/string/strtoip4.o \
520	common/string/strtoip6.o \
521	common/string/strton.o \
522	common/string/strtonll.o \
523	common/string/struid.o \
524	common/string/struniq.o \
525	common/string/swapget.o \
526	common/string/swapmem.o \
527	common/string/swapop.o \
528	common/string/swapput.o \
529	common/string/tok.o \
530	common/string/tokline.o \
531	common/string/tokscan.o \
532	common/tm/tmdata.o \
533	common/tm/tmdate.o \
534	common/tm/tmequiv.o \
535	common/tm/tmfix.o \
536	common/tm/tmfmt.o \
537	common/tm/tmform.o \
538	common/tm/tmgoff.o \
539	common/tm/tminit.o \
540	common/tm/tmleap.o \
541	common/tm/tmlex.o \
542	common/tm/tmlocale.o \
543	common/tm/tmmake.o \
544	common/tm/tmpoff.o \
545	common/tm/tmscan.o \
546	common/tm/tmsleep.o \
547	common/tm/tmtime.o \
548	common/tm/tmtype.o \
549	common/tm/tmweek.o \
550	common/tm/tmword.o \
551	common/tm/tmxdate.o \
552	common/tm/tmxfmt.o \
553	common/tm/tmxgettime.o \
554	common/tm/tmxleap.o \
555	common/tm/tmxmake.o \
556	common/tm/tmxscan.o \
557	common/tm/tmxsettime.o \
558	common/tm/tmxsleep.o \
559	common/tm/tmxtime.o \
560	common/tm/tmxtouch.o \
561	common/tm/tmzone.o \
562	common/tm/tvcmp.o \
563	common/tm/tvgettime.o \
564	common/tm/tvsettime.o \
565	common/tm/tvsleep.o \
566	common/tm/tvtouch.o \
567	common/uwin/a64l.o \
568	common/uwin/acosh.o \
569	common/uwin/asinh.o \
570	common/uwin/atanh.o \
571	common/uwin/cbrt.o \
572	common/uwin/crypt.o \
573	common/uwin/erf.o \
574	common/uwin/err.o \
575	common/uwin/exp.o \
576	common/uwin/exp__E.o \
577	common/uwin/expm1.o \
578	common/uwin/gamma.o \
579	common/uwin/getpass.o \
580	common/uwin/lgamma.o \
581	common/uwin/log.o \
582	common/uwin/log1p.o \
583	common/uwin/log__L.o \
584	common/uwin/rand48.o \
585	common/uwin/random.o \
586	common/uwin/rcmd.o \
587	common/uwin/rint.o \
588	common/uwin/support.o \
589	common/vec/vecargs.o \
590	common/vec/vecfile.o \
591	common/vec/vecfree.o \
592	common/vec/vecload.o \
593	common/vec/vecstring.o \
594	common/vmalloc/malloc.o \
595	common/vmalloc/vmbest.o \
596	common/vmalloc/vmclear.o \
597	common/vmalloc/vmclose.o \
598	common/vmalloc/vmdcheap.o \
599	common/vmalloc/vmdebug.o \
600	common/vmalloc/vmdisc.o \
601	common/vmalloc/vmexit.o \
602	common/vmalloc/vmgetmem.o \
603	common/vmalloc/vmlast.o \
604	common/vmalloc/vmmopen.o \
605	common/vmalloc/vmopen.o \
606	common/vmalloc/vmpool.o \
607	common/vmalloc/vmprivate.o \
608	common/vmalloc/vmprofile.o \
609	common/vmalloc/vmregion.o \
610	common/vmalloc/vmsegment.o \
611	common/vmalloc/vmset.o \
612	common/vmalloc/vmstat.o \
613	common/vmalloc/vmstrdup.o \
614	common/vmalloc/vmtrace.o \
615	common/vmalloc/vmwalk.o
616
617# We are storing the object files into subdirs avoid the
618# confusion with having 550+ object files in the toplevel pics/
619# directory (this matches the way how the original AST build system
620# deals with this "logistic" issue) - the rules below ensure that
621# the destination directory is available.
622OBJDIRS += \
623	common/cdt \
624	common/comp \
625	common/dir \
626	common/disc \
627	common/hash \
628	common/misc \
629	common/obsolete \
630	common/path \
631	common/port \
632	common/preroot \
633	common/regex \
634	common/sfio \
635	common/stdio \
636	common/string \
637	common/tm \
638	common/uwin \
639	common/vec \
640	common/vmalloc
641PICSDIRS= $(OBJDIRS:%=pics/%)
642mkpicdirs:
643	@mkdir -p $(PICSDIRS)
644
645# We need our own rules here since some source files come from
646# the plaftorm-specific directories and the default rules do
647# not cover this
648pics/%.o: ../%.c
649	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
650	$(POST_PROCESS_O)
651
652include ../../Makefile.astmsg
653
654include ../../Makefile.lib
655
656# mapfile-vers does not live with the sources in in common/ to make
657# automated code updates easier.
658MAPFILES=       ../mapfile-vers
659
660# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
661include ../../../Makefile.ast
662
663# special rule because sources live both ../common (normal)
664# and $(TRANSMACH) (generated)
665SRCS=		$(OBJECTS:%.o=../%.c)
666
667LIBS =		$(DYNLIB) $(LINTLIB)
668
669LDLIBS += \
670	-lsocket \
671	-lm \
672	-lc
673
674$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
675
676SRCDIR =	../common
677
678# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
679# case - it MUST come as the last element but future changes in -D options
680# may then cause silent breakage in the AST sources because the last -D
681# option specified overrides previous -D options so we prefer the current
682# way to explicitly list each single flag.
683# Notes:
684#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
685#   - Be careful with "-D__OBSOLETE__=xxx". Make sure this is in sync with
686#     upstream (see Mamfile) and do not change the |__OBSOLETE__| value
687#     without examining the symbols that will be removed, and evaluating
688#     whether that breaks compatibility with upstream binaries.
689CPPFLAGS = \
690	$(DTEXTDOM) $(DTS_ERRNO) \
691	$(ASTPLATFORMCPPFLAGS) \
692	-Isrc/lib/libast \
693	-I$(SRCDIR) \
694	-I$(SRCDIR)/comp \
695	-I$(SRCDIR)/include \
696	-I$(SRCDIR)/std \
697	-I$(SRCDIR)/dir \
698	-I$(SRCDIR)/port \
699	-I$(SRCDIR)/sfio \
700	-I$(SRCDIR)/astsa \
701	-I$(SRCDIR)/misc \
702	-I$(SRCDIR)/string \
703	-Iinclude/ast \
704	'-DCONF_LIBSUFFIX=".so"' \
705	'-DCONF_LIBPREFIX="lib"' \
706	-DERROR_CATALOG=\""libast"\" \
707	-D__OBSOLETE__=20080101 \
708	-D_BLD_ast \
709	-D_PACKAGE_ast \
710	-D_BLD_DLL
711
712CFLAGS += \
713	$(ASTCFLAGS)
714CFLAGS64 += \
715	$(ASTCFLAGS64)
716
717pics/$(MACH)/src/lib/libast/conftab.o \
718pics/$(MACH64)/src/lib/libast/conftab.o	:= CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
719pics/common/comp/setlocale.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
720pics/common/comp/setlocale.o		:= CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
721pics/common/hash/hashlook.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
722pics/common/hash/memhash.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
723pics/common/hash/memsum.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
724pics/common/hash/strhash.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
725pics/common/hash/strsum.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
726pics/common/misc/recstr.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
727pics/common/misc/translate.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
728pics/common/path/pathkey.o		:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
729pics/common/port/astconf.o		:= CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
730pics/common/sfio/sfmove.o 		:= CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
731pics/common/sfio/sfrd.o 		:= CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
732pics/common/sfio/sfvscanf.o 		:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
733
734.KEEP_STATE:
735
736all: mkpicdirs .WAIT $(LIBS)
737
738#
739# libast is not lint-clean yet; fake up a target.  (You can use
740# "make lintcheck" to actually run lint; please send all lint fixes
741# upstream (to AT&T) so the next update will pull them into ON.)
742#
743lint:
744	@ print "usr/src/lib/libast is not lint-clean: skipping"
745
746include ../../Makefile.targ
747