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.
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.
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]
23 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
31 # platform-independent sources are in common/
33 common/cdt/dtclose.o \
35 common/cdt/dtextract.o \
36 common/cdt/dtflatten.o \
39 common/cdt/dtmethod.o \
42 common/cdt/dtrenew.o \
43 common/cdt/dtrestore.o \
46 common/cdt/dtstrhash.o \
48 common/cdt/dttreeset.o \
51 common/comp/atexit.o \
52 common/comp/basename.o \
53 common/comp/catopen.o \
54 common/comp/closelog.o \
55 common/comp/creat64.o \
56 common/comp/dirname.o \
58 common/comp/eaccess.o \
60 common/comp/execlp.o \
61 common/comp/execve.o \
62 common/comp/execvp.o \
63 common/comp/execvpe.o \
65 common/comp/fmtmsglib.o \
66 common/comp/fnmatch.o \
68 common/comp/frexpl.o \
71 common/comp/getdate.o \
72 common/comp/getgroups.o \
73 common/comp/getlogin.o \
74 common/comp/getopt.o \
75 common/comp/getoptl.o \
76 common/comp/getpgrp.o \
77 common/comp/getsubopt.o \
80 common/comp/hsearch.o \
82 common/comp/killpg.o \
84 common/comp/localeconv.o \
86 common/comp/memccpy.o \
87 common/comp/memchr.o \
88 common/comp/memcmp.o \
89 common/comp/memcpy.o \
90 common/comp/memmove.o \
91 common/comp/memset.o \
93 common/comp/mkfifo.o \
95 common/comp/mktemp.o \
96 common/comp/mktime.o \
99 common/comp/omitted.o \
101 common/comp/openlog.o \
102 common/comp/putenv.o \
103 common/comp/re_comp.o \
104 common/comp/readlink.o \
105 common/comp/realpath.o \
106 common/comp/regcmp.o \
107 common/comp/regexp.o \
108 common/comp/remove.o \
109 common/comp/rename.o \
110 common/comp/resolvepath.o \
111 common/comp/rmdir.o \
112 common/comp/setenv.o \
113 common/comp/setlocale.o \
114 common/comp/setlogmask.o \
115 common/comp/setpgid.o \
116 common/comp/setsid.o \
117 common/comp/sigunblock.o \
118 common/comp/sigflag.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 \
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 \
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 \
192 common/misc/ftwalk.o \
193 common/misc/ftwflags.o \
194 common/misc/getcwd.o \
195 common/misc/getenv.o \
197 common/misc/magic.o \
199 common/misc/mimetype.o \
200 common/misc/optesc.o \
201 common/misc/optget.o \
202 common/misc/optjoin.o \
203 common/misc/optctx.o \
204 common/misc/procclose.o \
205 common/misc/procfree.o \
206 common/misc/procopen.o \
207 common/misc/procrun.o \
208 common/misc/recfmt.o \
209 common/misc/reclen.o \
210 common/misc/recstr.o \
211 common/misc/setenviron.o \
212 common/misc/sigcrit.o \
213 common/misc/sigdata.o \
214 common/misc/signal.o \
215 common/misc/stack.o \
216 common/misc/state.o \
218 common/misc/systrace.o \
219 common/misc/translate.o \
220 common/misc/univdata.o \
221 common/obsolete/spawn.o \
222 common/path/pathaccess.o \
223 common/path/pathbin.o \
224 common/path/pathcanon.o \
225 common/path/pathcat.o \
226 common/path/pathcd.o \
227 common/path/pathcheck.o \
228 common/path/pathexists.o \
229 common/path/pathfind.o \
230 common/path/pathgetlink.o \
231 common/path/pathkey.o \
232 common/path/pathnative.o \
233 common/path/pathpath.o \
234 common/path/pathposix.o \
235 common/path/pathprobe.o \
236 common/path/pathprog.o \
237 common/path/pathrepl.o \
238 common/path/pathsetlink.o \
239 common/path/pathshell.o \
240 common/path/pathstat.o \
241 common/path/pathtemp.o \
242 common/path/pathtmp.o \
243 common/port/astconf.o \
244 common/port/astcopy.o \
245 common/port/astdynamic.o \
246 common/port/astlicense.o \
247 common/port/astquery.o \
248 common/port/aststatic.o \
249 common/port/astwinsize.o \
250 common/port/iblocks.o \
254 common/port/touch.o \
255 common/preroot/getpreroot.o \
256 common/preroot/ispreroot.o \
257 common/preroot/realopen.o \
258 common/preroot/setpreroot.o \
259 common/regex/regalloc.o \
260 common/regex/regcache.o \
261 common/regex/regclass.o \
262 common/regex/regcoll.o \
263 common/regex/regcomp.o \
264 common/regex/regdecomp.o \
265 common/regex/regerror.o \
266 common/regex/regexec.o \
267 common/regex/regfatal.o \
268 common/regex/reginit.o \
269 common/regex/regnexec.o \
270 common/regex/regrecord.o \
271 common/regex/regrexec.o \
272 common/regex/regstat.o \
273 common/regex/regsub.o \
274 common/regex/regsubcomp.o \
275 common/regex/regsubexec.o \
276 common/sfio/_sfclrerr.o \
277 common/sfio/_sfdlen.o \
278 common/sfio/_sfeof.o \
279 common/sfio/_sferror.o \
280 common/sfio/_sffileno.o \
281 common/sfio/_sfgetc.o \
282 common/sfio/_sfgetl.o \
283 common/sfio/_sfgetl2.o \
284 common/sfio/_sfgetu.o \
285 common/sfio/_sfgetu2.o \
286 common/sfio/_sfllen.o \
287 common/sfio/_sfopen.o \
288 common/sfio/_sfputc.o \
289 common/sfio/_sfputd.o \
290 common/sfio/_sfputl.o \
291 common/sfio/_sfputm.o \
292 common/sfio/_sfputu.o \
293 common/sfio/_sfslen.o \
294 common/sfio/_sfstacked.o \
295 common/sfio/_sfulen.o \
296 common/sfio/_sfvalue.o \
297 common/sfio/sfclose.o \
298 common/sfio/sfclrlock.o \
299 common/sfio/sfcvt.o \
300 common/sfio/sfdisc.o \
301 common/sfio/sfdlen.o \
302 common/sfio/sfecvt.o \
303 common/sfio/sfexcept.o \
304 common/sfio/sfextern.o \
305 common/sfio/sffcvt.o \
306 common/sfio/sffilbuf.o \
307 common/sfio/sfflsbuf.o \
308 common/sfio/sfgetd.o \
309 common/sfio/sfgetl.o \
310 common/sfio/sfgetm.o \
311 common/sfio/sfgetr.o \
312 common/sfio/sfgetu.o \
313 common/sfio/sfllen.o \
314 common/sfio/sfmode.o \
315 common/sfio/sfmove.o \
316 common/sfio/sfmutex.o \
317 common/sfio/sfnew.o \
318 common/sfio/sfnotify.o \
319 common/sfio/sfnputc.o \
320 common/sfio/sfopen.o \
321 common/sfio/sfpeek.o \
322 common/sfio/sfpkrd.o \
323 common/sfio/sfpoll.o \
324 common/sfio/sfpool.o \
325 common/sfio/sfpopen.o \
326 common/sfio/sfprintf.o \
327 common/sfio/sfprints.o \
328 common/sfio/sfpurge.o \
329 common/sfio/sfputd.o \
330 common/sfio/sfputl.o \
331 common/sfio/sfputm.o \
332 common/sfio/sfputr.o \
333 common/sfio/sfputu.o \
334 common/sfio/sfraise.o \
336 common/sfio/sfread.o \
337 common/sfio/sfreserve.o \
338 common/sfio/sfresize.o \
339 common/sfio/sfscanf.o \
340 common/sfio/sfseek.o \
341 common/sfio/sfset.o \
342 common/sfio/sfsetbuf.o \
343 common/sfio/sfsetfd.o \
344 common/sfio/sfsize.o \
346 common/sfio/sfstack.o \
347 common/sfio/sfstrtod.o \
348 common/sfio/sfswap.o \
349 common/sfio/sfsync.o \
350 common/sfio/sftable.o \
351 common/sfio/sftell.o \
352 common/sfio/sftmp.o \
353 common/sfio/sfungetc.o \
354 common/sfio/sfvprintf.o \
355 common/sfio/sfvscanf.o \
356 common/sfio/sfwalk.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/fcloseall.o \
376 common/stdio/fdopen.o \
377 common/stdio/feof.o \
378 common/stdio/ferror.o \
379 common/stdio/fflush.o \
380 common/stdio/fgetc.o \
381 common/stdio/fgetpos.o \
382 common/stdio/fgets.o \
383 common/stdio/fgetwc.o \
384 common/stdio/fgetws.o \
385 common/stdio/fileno.o \
386 common/stdio/flockfile.o \
387 common/stdio/fmemopen.o \
388 common/stdio/fopen.o \
389 common/stdio/fprintf.o \
390 common/stdio/fpurge.o \
391 common/stdio/fputc.o \
392 common/stdio/fputs.o \
393 common/stdio/fputwc.o \
394 common/stdio/fputws.o \
395 common/stdio/funlockfile.o \
396 common/stdio/fread.o \
397 common/stdio/freopen.o \
398 common/stdio/fscanf.o \
399 common/stdio/fseek.o \
400 common/stdio/fseeko.o \
401 common/stdio/fsetpos.o \
402 common/stdio/ftell.o \
403 common/stdio/ftello.o \
404 common/stdio/ftrylockfile.o \
405 common/stdio/fwide.o \
406 common/stdio/fwprintf.o \
407 common/stdio/fwrite.o \
408 common/stdio/fwscanf.o \
409 common/stdio/getc.o \
410 common/stdio/getchar.o \
411 common/stdio/getdelim.o \
412 common/stdio/getline.o \
413 common/stdio/getw.o \
414 common/stdio/getwc.o \
415 common/stdio/getwchar.o \
416 common/stdio/pclose.o \
417 common/stdio/popen.o \
418 common/stdio/printf.o \
419 common/stdio/putc.o \
420 common/stdio/putchar.o \
421 common/stdio/puts.o \
422 common/stdio/putw.o \
423 common/stdio/putwc.o \
424 common/stdio/putwchar.o \
425 common/stdio/rewind.o \
426 common/stdio/scanf.o \
427 common/stdio/setbuf.o \
428 common/stdio/setbuffer.o \
429 common/stdio/setlinebuf.o \
430 common/stdio/setvbuf.o \
431 common/stdio/snprintf.o \
432 common/stdio/sprintf.o \
433 common/stdio/sscanf.o \
434 common/stdio/stdio_c99.o \
435 common/stdio/swprintf.o \
436 common/stdio/swscanf.o \
437 common/stdio/tmpfile.o \
438 common/stdio/ungetc.o \
439 common/stdio/ungetwc.o \
440 common/stdio/vasprintf.o \
441 common/stdio/vfprintf.o \
442 common/stdio/vfscanf.o \
443 common/stdio/vfwprintf.o \
444 common/stdio/vfwscanf.o \
445 common/stdio/vprintf.o \
446 common/stdio/vscanf.o \
447 common/stdio/vsnprintf.o \
448 common/stdio/vsprintf.o \
449 common/stdio/vsscanf.o \
450 common/stdio/vswprintf.o \
451 common/stdio/vswscanf.o \
452 common/stdio/vwprintf.o \
453 common/stdio/vwscanf.o \
454 common/stdio/wprintf.o \
455 common/stdio/wscanf.o \
456 common/string/base64.o \
457 common/string/ccmap.o \
458 common/string/ccmapid.o \
459 common/string/ccnative.o \
460 common/string/chresc.o \
461 common/string/chrtoi.o \
462 common/string/fmtbase.o \
463 common/string/fmtbuf.o \
464 common/string/fmtclock.o \
465 common/string/fmtdev.o \
466 common/string/fmtelapsed.o \
467 common/string/fmterror.o \
468 common/string/fmtesc.o \
469 common/string/fmtfmt.o \
470 common/string/fmtfs.o \
471 common/string/fmtgid.o \
472 common/string/fmtident.o \
473 common/string/fmtip4.o \
474 common/string/fmtip6.o \
475 common/string/fmtls.o \
476 common/string/fmtmatch.o \
477 common/string/fmtmode.o \
478 common/string/fmtnum.o \
479 common/string/fmtperm.o \
480 common/string/fmtre.o \
481 common/string/fmtscale.o \
482 common/string/fmtsignal.o \
483 common/string/fmttime.o \
484 common/string/fmttmx.o \
485 common/string/fmttv.o \
486 common/string/fmtuid.o \
487 common/string/fmtversion.o \
488 common/string/memdup.o \
489 common/string/modedata.o \
490 common/string/modei.o \
491 common/string/modex.o \
492 common/string/stracmp.o \
493 common/string/strcopy.o \
494 common/string/strdup.o \
495 common/string/strelapsed.o \
496 common/string/strerror.o \
497 common/string/stresc.o \
498 common/string/streval.o \
499 common/string/strexpr.o \
500 common/string/strgid.o \
501 common/string/strlcat.o \
502 common/string/strlcpy.o \
503 common/string/strlook.o \
504 common/string/strmatch.o \
505 common/string/strmode.o \
506 common/string/strnacmp.o \
507 common/string/strncopy.o \
508 common/string/strnpcmp.o \
509 common/string/strntod.o \
510 common/string/strntol.o \
511 common/string/strntold.o \
512 common/string/strntoll.o \
513 common/string/strnton.o \
514 common/string/strntoul.o \
515 common/string/strntonll.o \
516 common/string/strntoull.o \
517 common/string/strnvcmp.o \
518 common/string/stropt.o \
519 common/string/strpcmp.o \
520 common/string/strperm.o \
521 common/string/strpsearch.o \
522 common/string/strsearch.o \
523 common/string/strsort.o \
524 common/string/strtape.o \
525 common/string/strtoip4.o \
526 common/string/strtoip6.o \
527 common/string/strton.o \
528 common/string/strtonll.o \
529 common/string/struid.o \
530 common/string/struniq.o \
531 common/string/strvcmp.o \
532 common/string/swapget.o \
533 common/string/swapmem.o \
534 common/string/swapop.o \
535 common/string/swapput.o \
536 common/string/tok.o \
537 common/string/tokline.o \
538 common/string/tokscan.o \
541 common/tm/tmequiv.o \
549 common/tm/tmlocale.o \
553 common/tm/tmsleep.o \
558 common/tm/tmxdate.o \
559 common/tm/tmxduration.o \
561 common/tm/tmxgettime.o \
562 common/tm/tmxleap.o \
563 common/tm/tmxmake.o \
564 common/tm/tmxscan.o \
565 common/tm/tmxsettime.o \
566 common/tm/tmxsleep.o \
567 common/tm/tmxtime.o \
568 common/tm/tmxtouch.o \
571 common/tm/tvgettime.o \
572 common/tm/tvsettime.o \
573 common/tm/tvsleep.o \
574 common/tm/tvtouch.o \
576 common/uwin/acosh.o \
577 common/uwin/asinh.o \
578 common/uwin/atanh.o \
580 common/uwin/crypt.o \
584 common/uwin/exp__E.o \
585 common/uwin/expm1.o \
586 common/uwin/gamma.o \
587 common/uwin/getpass.o \
588 common/uwin/lgamma.o \
590 common/uwin/log1p.o \
591 common/uwin/log__L.o \
592 common/uwin/rand48.o \
593 common/uwin/random.o \
595 common/uwin/support.o \
596 common/vec/vecargs.o \
597 common/vec/vecfile.o \
598 common/vec/vecfree.o \
599 common/vec/vecload.o \
600 common/vec/vecstring.o \
601 common/vmalloc/malloc.o \
602 common/vmalloc/vmbest.o \
603 common/vmalloc/vmclear.o \
604 common/vmalloc/vmclose.o \
605 common/vmalloc/vmdcheap.o \
606 common/vmalloc/vmdebug.o \
607 common/vmalloc/vmdisc.o \
608 common/vmalloc/vmexit.o \
609 common/vmalloc/vmgetmem.o \
610 common/vmalloc/vmlast.o \
611 common/vmalloc/vmmopen.o \
612 common/vmalloc/vmopen.o \
613 common/vmalloc/vmpool.o \
614 common/vmalloc/vmprivate.o \
615 common/vmalloc/vmprofile.o \
616 common/vmalloc/vmregion.o \
617 common/vmalloc/vmsegment.o \
618 common/vmalloc/vmset.o \
619 common/vmalloc/vmstat.o \
620 common/vmalloc/vmstrdup.o \
621 common/vmalloc/vmtrace.o \
622 common/vmalloc/vmwalk.o
624 # We are storing the object files into subdirs avoid the
625 # confusion with having 550+ object files in the toplevel pics/
626 # directory (this matches the way how the original AST build system
627 # deals with this "logistic" issue) - the rules below ensure that
628 # the destination directory is available.
648 PICSDIRS= $(OBJDIRS:%=pics/%)
650 @mkdir -p $(PICSDIRS)
652 # We need our own rules here since some source files come from
653 # the plaftorm-specific directories and the default rules do
656 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
659 include ../../Makefile.astmsg
661 include ../../Makefile.lib
663 # mapfile-vers does not live with the sources in in common/ to make
664 # automated code updates easier.
665 MAPFILES= ../mapfile-vers
667 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
668 include ../../../Makefile.ast
670 # special rule because sources live both ../common (normal)
671 # and $(TRANSMACH) (generated)
672 SRCS= $(OBJECTS:%.o=../%.c)
682 # We use "=" here since using $(CPPFLAGS.master) is very tricky in our
683 # case - it MUST come as the last element but future changes in -D options
684 # may then cause silent breakage in the AST sources because the last -D
685 # option specified overrides previous -D options so we prefer the current
686 # way to explicitly list each single flag.
688 # - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
689 # - Be careful with "-D__OBSOLETE__=xxx". Make sure this is in sync with
690 # upstream (see Mamfile) and do not change the |__OBSOLETE__| value
691 # without examining the symbols that will be removed, and evaluating
692 # whether that breaks compatibility with upstream binaries.
695 $(ASTPLATFORMCPPFLAGS) \
699 -I$(SRCDIR)/include \
708 -I$(ROOT)/usr/include \
709 '-DCONF_LIBSUFFIX=".so"' \
710 '-DCONF_LIBPREFIX="lib"' \
711 -DERROR_CATALOG=\""libast"\" \
712 -D__OBSOLETE__=20100101 \
722 CERRWARN += -Wno-parentheses
723 CERRWARN += -Wno-uninitialized
724 CERRWARN += -Wno-char-subscripts
725 CERRWARN += -Wno-clobbered
726 CERRWARN += -Wno-unused-variable
727 CERRWARN += -Wno-unused-value
728 CERRWARN += -Wno-unused-function
729 CERRWARN += -Wno-unused-label
730 CERRWARN += -Wno-implicit-function-declaration
731 CERRWARN += -Wno-empty-body
732 CERRWARN += -Wno-type-limits
733 CERRWARN += -Wno-address
737 all: mkpicdirs .WAIT $(LIBS)
739 include ../../Makefile.targ