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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  24 #
  25 # Copyright (c) 2018, Joyent, Inc.
  26 
  27 SHELL=/usr/bin/ksh93
  28 
  29 LIBRARY=        libast.a
  30 VERS=           .1
  31 
  32 # platform-independent sources are in common/
  33 OBJECTS += \
  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/sigflag.o \
 120         common/comp/spawnveg.o \
 121         common/comp/statvfs.o \
 122         common/comp/strcasecmp.o \
 123         common/comp/strchr.o \
 124         common/comp/strftime.o \
 125         common/comp/strncasecmp.o \
 126         common/comp/strptime.o \
 127         common/comp/strrchr.o \
 128         common/comp/strstr.o \
 129         common/comp/strtod.o \
 130         common/comp/strtol.o \
 131         common/comp/strtold.o \
 132         common/comp/strtoll.o \
 133         common/comp/strtoul.o \
 134         common/comp/strtoull.o \
 135         common/comp/swab.o \
 136         common/comp/symlink.o \
 137         common/comp/syslog.o \
 138         common/comp/system.o \
 139         common/comp/tempnam.o \
 140         common/comp/tmpnam.o \
 141         common/comp/transition.o \
 142         common/comp/tsearch.o \
 143         common/comp/unlink.o \
 144         common/comp/unsetenv.o \
 145         common/comp/vfork.o \
 146         common/comp/waitpid.o \
 147         common/comp/wc.o \
 148         common/comp/wordexp.o \
 149         common/dir/getdents.o \
 150         common/dir/opendir.o \
 151         common/dir/readdir.o \
 152         common/dir/rewinddir.o \
 153         common/dir/seekdir.o \
 154         common/dir/telldir.o \
 155         common/disc/memfatal.o \
 156         common/disc/sfdcdio.o \
 157         common/disc/sfdcdos.o \
 158         common/disc/sfdcfilter.o \
 159         common/disc/sfdcmore.o \
 160         common/disc/sfdcprefix.o \
 161         common/disc/sfdcseekable.o \
 162         common/disc/sfdcslow.o \
 163         common/disc/sfdcsubstr.o \
 164         common/disc/sfdctee.o \
 165         common/disc/sfdcunion.o \
 166         common/disc/sfkeyprintf.o \
 167         common/disc/sfstrtmp.o \
 168         common/hash/hashalloc.o \
 169         common/hash/hashdump.o \
 170         common/hash/hashfree.o \
 171         common/hash/hashlast.o \
 172         common/hash/hashlook.o \
 173         common/hash/hashscan.o \
 174         common/hash/hashsize.o \
 175         common/hash/hashview.o \
 176         common/hash/hashwalk.o \
 177         common/hash/memhash.o \
 178         common/hash/memsum.o \
 179         common/hash/strhash.o \
 180         common/hash/strkey.o \
 181         common/hash/strsum.o \
 182         common/misc/astintercept.o \
 183         common/misc/debug.o \
 184         common/misc/cmdarg.o \
 185         common/misc/error.o \
 186         common/misc/errorf.o \
 187         common/misc/errormsg.o \
 188         common/misc/errorx.o \
 189         common/misc/fastfind.o \
 190         common/misc/fmtrec.o \
 191         common/misc/fs3d.o \
 192         common/misc/fts.o \
 193         common/misc/ftwalk.o \
 194         common/misc/ftwflags.o \
 195         common/misc/getcwd.o \
 196         common/misc/getenv.o \
 197         common/misc/glob.o \
 198         common/misc/magic.o \
 199         common/misc/mime.o \
 200         common/misc/mimetype.o \
 201         common/misc/optesc.o \
 202         common/misc/optget.o \
 203         common/misc/optjoin.o \
 204         common/misc/optctx.o \
 205         common/misc/procclose.o \
 206         common/misc/procfree.o \
 207         common/misc/procopen.o \
 208         common/misc/procrun.o \
 209         common/misc/recfmt.o \
 210         common/misc/reclen.o \
 211         common/misc/recstr.o \
 212         common/misc/setenviron.o \
 213         common/misc/sigcrit.o \
 214         common/misc/sigdata.o \
 215         common/misc/signal.o \
 216         common/misc/stack.o \
 217         common/misc/state.o \
 218         common/misc/stk.o \
 219         common/misc/systrace.o \
 220         common/misc/translate.o \
 221         common/misc/univdata.o \
 222         common/obsolete/spawn.o \
 223         common/path/pathaccess.o \
 224         common/path/pathbin.o \
 225         common/path/pathcanon.o \
 226         common/path/pathcat.o \
 227         common/path/pathcd.o \
 228         common/path/pathcheck.o \
 229         common/path/pathexists.o \
 230         common/path/pathfind.o \
 231         common/path/pathgetlink.o \
 232         common/path/pathkey.o \
 233         common/path/pathnative.o \
 234         common/path/pathpath.o \
 235         common/path/pathposix.o \
 236         common/path/pathprobe.o \
 237         common/path/pathprog.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/sfwalk.o \
 358         common/sfio/sfwr.o \
 359         common/sfio/sfwrite.o \
 360         common/stdio/_doprnt.o \
 361         common/stdio/_doscan.o \
 362         common/stdio/_filbuf.o \
 363         common/stdio/_flsbuf.o \
 364         common/stdio/_stdfun.o \
 365         common/stdio/_stdopen.o \
 366         common/stdio/_stdprintf.o \
 367         common/stdio/_stdscanf.o \
 368         common/stdio/_stdsprnt.o \
 369         common/stdio/_stdvbuf.o \
 370         common/stdio/_stdvsnprnt.o \
 371         common/stdio/_stdvsprnt.o \
 372         common/stdio/_stdvsscn.o \
 373         common/stdio/asprintf.o \
 374         common/stdio/clearerr.o \
 375         common/stdio/fclose.o \
 376         common/stdio/fcloseall.o \
 377         common/stdio/fdopen.o \
 378         common/stdio/feof.o \
 379         common/stdio/ferror.o \
 380         common/stdio/fflush.o \
 381         common/stdio/fgetc.o \
 382         common/stdio/fgetpos.o \
 383         common/stdio/fgets.o \
 384         common/stdio/fgetwc.o \
 385         common/stdio/fgetws.o \
 386         common/stdio/fileno.o \
 387         common/stdio/flockfile.o \
 388         common/stdio/fmemopen.o \
 389         common/stdio/fopen.o \
 390         common/stdio/fprintf.o \
 391         common/stdio/fpurge.o \
 392         common/stdio/fputc.o \
 393         common/stdio/fputs.o \
 394         common/stdio/fputwc.o \
 395         common/stdio/fputws.o \
 396         common/stdio/funlockfile.o \
 397         common/stdio/fread.o \
 398         common/stdio/freopen.o \
 399         common/stdio/fscanf.o \
 400         common/stdio/fseek.o \
 401         common/stdio/fseeko.o \
 402         common/stdio/fsetpos.o \
 403         common/stdio/ftell.o \
 404         common/stdio/ftello.o \
 405         common/stdio/ftrylockfile.o \
 406         common/stdio/fwide.o \
 407         common/stdio/fwprintf.o \
 408         common/stdio/fwrite.o \
 409         common/stdio/fwscanf.o \
 410         common/stdio/getc.o \
 411         common/stdio/getchar.o \
 412         common/stdio/getdelim.o \
 413         common/stdio/getline.o \
 414         common/stdio/getw.o \
 415         common/stdio/getwc.o \
 416         common/stdio/getwchar.o \
 417         common/stdio/pclose.o \
 418         common/stdio/popen.o \
 419         common/stdio/printf.o \
 420         common/stdio/putc.o \
 421         common/stdio/putchar.o \
 422         common/stdio/puts.o \
 423         common/stdio/putw.o \
 424         common/stdio/putwc.o \
 425         common/stdio/putwchar.o \
 426         common/stdio/rewind.o \
 427         common/stdio/scanf.o \
 428         common/stdio/setbuf.o \
 429         common/stdio/setbuffer.o \
 430         common/stdio/setlinebuf.o \
 431         common/stdio/setvbuf.o \
 432         common/stdio/snprintf.o \
 433         common/stdio/sprintf.o \
 434         common/stdio/sscanf.o \
 435         common/stdio/stdio_c99.o \
 436         common/stdio/swprintf.o \
 437         common/stdio/swscanf.o \
 438         common/stdio/tmpfile.o \
 439         common/stdio/ungetc.o \
 440         common/stdio/ungetwc.o \
 441         common/stdio/vasprintf.o \
 442         common/stdio/vfprintf.o \
 443         common/stdio/vfscanf.o \
 444         common/stdio/vfwprintf.o \
 445         common/stdio/vfwscanf.o \
 446         common/stdio/vprintf.o \
 447         common/stdio/vscanf.o \
 448         common/stdio/vsnprintf.o \
 449         common/stdio/vsprintf.o \
 450         common/stdio/vsscanf.o \
 451         common/stdio/vswprintf.o \
 452         common/stdio/vswscanf.o \
 453         common/stdio/vwprintf.o \
 454         common/stdio/vwscanf.o \
 455         common/stdio/wprintf.o \
 456         common/stdio/wscanf.o \
 457         common/string/base64.o \
 458         common/string/ccmap.o \
 459         common/string/ccmapid.o \
 460         common/string/ccnative.o \
 461         common/string/chresc.o \
 462         common/string/chrtoi.o \
 463         common/string/fmtbase.o \
 464         common/string/fmtbuf.o \
 465         common/string/fmtclock.o \
 466         common/string/fmtdev.o \
 467         common/string/fmtelapsed.o \
 468         common/string/fmterror.o \
 469         common/string/fmtesc.o \
 470         common/string/fmtfmt.o \
 471         common/string/fmtfs.o \
 472         common/string/fmtgid.o \
 473         common/string/fmtident.o \
 474         common/string/fmtip4.o \
 475         common/string/fmtip6.o \
 476         common/string/fmtls.o \
 477         common/string/fmtmatch.o \
 478         common/string/fmtmode.o \
 479         common/string/fmtnum.o \
 480         common/string/fmtperm.o \
 481         common/string/fmtre.o \
 482         common/string/fmtscale.o \
 483         common/string/fmtsignal.o \
 484         common/string/fmttime.o \
 485         common/string/fmttmx.o \
 486         common/string/fmttv.o \
 487         common/string/fmtuid.o \
 488         common/string/fmtversion.o \
 489         common/string/memdup.o \
 490         common/string/modedata.o \
 491         common/string/modei.o \
 492         common/string/modex.o \
 493         common/string/stracmp.o \
 494         common/string/strcopy.o \
 495         common/string/strdup.o \
 496         common/string/strelapsed.o \
 497         common/string/strerror.o \
 498         common/string/stresc.o \
 499         common/string/streval.o \
 500         common/string/strexpr.o \
 501         common/string/strgid.o \
 502         common/string/strlcat.o \
 503         common/string/strlcpy.o \
 504         common/string/strlook.o \
 505         common/string/strmatch.o \
 506         common/string/strmode.o \
 507         common/string/strnacmp.o \
 508         common/string/strncopy.o \
 509         common/string/strnpcmp.o \
 510         common/string/strntod.o \
 511         common/string/strntol.o \
 512         common/string/strntold.o \
 513         common/string/strntoll.o \
 514         common/string/strnton.o \
 515         common/string/strntoul.o \
 516         common/string/strntonll.o \
 517         common/string/strntoull.o \
 518         common/string/strnvcmp.o \
 519         common/string/stropt.o \
 520         common/string/strpcmp.o \
 521         common/string/strperm.o \
 522         common/string/strpsearch.o \
 523         common/string/strsearch.o \
 524         common/string/strsort.o \
 525         common/string/strtape.o \
 526         common/string/strtoip4.o \
 527         common/string/strtoip6.o \
 528         common/string/strton.o \
 529         common/string/strtonll.o \
 530         common/string/struid.o \
 531         common/string/struniq.o \
 532         common/string/strvcmp.o \
 533         common/string/swapget.o \
 534         common/string/swapmem.o \
 535         common/string/swapop.o \
 536         common/string/swapput.o \
 537         common/string/tok.o \
 538         common/string/tokline.o \
 539         common/string/tokscan.o \
 540         common/tm/tmdata.o \
 541         common/tm/tmdate.o \
 542         common/tm/tmequiv.o \
 543         common/tm/tmfix.o \
 544         common/tm/tmfmt.o \
 545         common/tm/tmform.o \
 546         common/tm/tmgoff.o \
 547         common/tm/tminit.o \
 548         common/tm/tmleap.o \
 549         common/tm/tmlex.o \
 550         common/tm/tmlocale.o \
 551         common/tm/tmmake.o \
 552         common/tm/tmpoff.o \
 553         common/tm/tmscan.o \
 554         common/tm/tmsleep.o \
 555         common/tm/tmtime.o \
 556         common/tm/tmtype.o \
 557         common/tm/tmweek.o \
 558         common/tm/tmword.o \
 559         common/tm/tmxdate.o \
 560         common/tm/tmxduration.o \
 561         common/tm/tmxfmt.o \
 562         common/tm/tmxgettime.o \
 563         common/tm/tmxleap.o \
 564         common/tm/tmxmake.o \
 565         common/tm/tmxscan.o \
 566         common/tm/tmxsettime.o \
 567         common/tm/tmxsleep.o \
 568         common/tm/tmxtime.o \
 569         common/tm/tmxtouch.o \
 570         common/tm/tmzone.o \
 571         common/tm/tvcmp.o \
 572         common/tm/tvgettime.o \
 573         common/tm/tvsettime.o \
 574         common/tm/tvsleep.o \
 575         common/tm/tvtouch.o \
 576         common/uwin/a64l.o \
 577         common/uwin/acosh.o \
 578         common/uwin/asinh.o \
 579         common/uwin/atanh.o \
 580         common/uwin/cbrt.o \
 581         common/uwin/crypt.o \
 582         common/uwin/erf.o \
 583         common/uwin/err.o \
 584         common/uwin/exp.o \
 585         common/uwin/exp__E.o \
 586         common/uwin/expm1.o \
 587         common/uwin/gamma.o \
 588         common/uwin/getpass.o \
 589         common/uwin/lgamma.o \
 590         common/uwin/log.o \
 591         common/uwin/log1p.o \
 592         common/uwin/log__L.o \
 593         common/uwin/rand48.o \
 594         common/uwin/random.o \
 595         common/uwin/rcmd.o \
 596         common/uwin/rint.o \
 597         common/uwin/support.o \
 598         common/vec/vecargs.o \
 599         common/vec/vecfile.o \
 600         common/vec/vecfree.o \
 601         common/vec/vecload.o \
 602         common/vec/vecstring.o \
 603         common/vmalloc/malloc.o \
 604         common/vmalloc/vmbest.o \
 605         common/vmalloc/vmclear.o \
 606         common/vmalloc/vmclose.o \
 607         common/vmalloc/vmdcheap.o \
 608         common/vmalloc/vmdebug.o \
 609         common/vmalloc/vmdisc.o \
 610         common/vmalloc/vmexit.o \
 611         common/vmalloc/vmgetmem.o \
 612         common/vmalloc/vmlast.o \
 613         common/vmalloc/vmmopen.o \
 614         common/vmalloc/vmopen.o \
 615         common/vmalloc/vmpool.o \
 616         common/vmalloc/vmprivate.o \
 617         common/vmalloc/vmprofile.o \
 618         common/vmalloc/vmregion.o \
 619         common/vmalloc/vmsegment.o \
 620         common/vmalloc/vmset.o \
 621         common/vmalloc/vmstat.o \
 622         common/vmalloc/vmstrdup.o \
 623         common/vmalloc/vmtrace.o \
 624         common/vmalloc/vmwalk.o
 625 
 626 # We are storing the object files into subdirs avoid the
 627 # confusion with having 550+ object files in the toplevel pics/
 628 # directory (this matches the way how the original AST build system
 629 # deals with this "logistic" issue) - the rules below ensure that
 630 # the destination directory is available.
 631 OBJDIRS += \
 632         common/cdt \
 633         common/comp \
 634         common/dir \
 635         common/disc \
 636         common/hash \
 637         common/misc \
 638         common/obsolete \
 639         common/path \
 640         common/port \
 641         common/preroot \
 642         common/regex \
 643         common/sfio \
 644         common/stdio \
 645         common/string \
 646         common/tm \
 647         common/uwin \
 648         common/vec \
 649         common/vmalloc
 650 PICSDIRS= $(OBJDIRS:%=pics/%)
 651 mkpicdirs:
 652         @mkdir -p $(PICSDIRS)
 653 
 654 # We need our own rules here since some source files come from
 655 # the plaftorm-specific directories and the default rules do
 656 # not cover this
 657 pics/%.o: ../%.c
 658         $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 659         $(POST_PROCESS_O)
 660 
 661 include ../../Makefile.astmsg
 662 
 663 include ../../Makefile.lib
 664 
 665 # mapfile-vers does not live with the sources in in common/ to make
 666 # automated code updates easier.
 667 MAPFILES=       ../mapfile-vers
 668 
 669 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
 670 include ../../../Makefile.ast
 671 
 672 # special rule because sources live both ../common (normal)
 673 # and $(TRANSMACH) (generated)
 674 SRCS=           $(OBJECTS:%.o=../%.c)
 675 
 676 LIBS =          $(DYNLIB) $(LINTLIB)
 677 
 678 LDLIBS += \
 679         -lsocket \
 680         -lm \
 681         -lc
 682 
 683 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
 684 
 685 SRCDIR =        ../common
 686 
 687 # We use "=" here since using $(CPPFLAGS.master) is very tricky in our
 688 # case - it MUST come as the last element but future changes in -D options
 689 # may then cause silent breakage in the AST sources because the last -D
 690 # option specified overrides previous -D options so we prefer the current
 691 # way to explicitly list each single flag.
 692 # Notes:
 693 #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
 694 #   - Be careful with "-D__OBSOLETE__=xxx". Make sure this is in sync with
 695 #     upstream (see Mamfile) and do not change the |__OBSOLETE__| value
 696 #     without examining the symbols that will be removed, and evaluating
 697 #     whether that breaks compatibility with upstream binaries.
 698 CPPFLAGS = \
 699         $(DTEXTDOM) $(DTS_ERRNO) \
 700         $(ASTPLATFORMCPPFLAGS) \
 701         -Isrc/lib/libast \
 702         -I$(SRCDIR) \
 703         -I$(SRCDIR)/comp \
 704         -I$(SRCDIR)/include \
 705         -I$(SRCDIR)/std \
 706         -I$(SRCDIR)/dir \
 707         -I$(SRCDIR)/port \
 708         -I$(SRCDIR)/sfio \
 709         -I$(SRCDIR)/astsa \
 710         -I$(SRCDIR)/misc \
 711         -I$(SRCDIR)/string \
 712         -Iinclude/ast \
 713         -I$(ROOT)/usr/include \
 714         '-DCONF_LIBSUFFIX=".so"' \
 715         '-DCONF_LIBPREFIX="lib"' \
 716         -DERROR_CATALOG=\""libast"\" \
 717         -D__OBSOLETE__=20100101 \
 718         -D_BLD_ast \
 719         -D_PACKAGE_ast \
 720         -D_BLD_DLL
 721 
 722 CFLAGS += \
 723         $(ASTCFLAGS)
 724 CFLAGS64 += \
 725         $(ASTCFLAGS64)
 726 
 727 CERRWARN += -_gcc=-Wno-parentheses
 728 CERRWARN += -_gcc=-Wno-uninitialized
 729 CERRWARN += -_gcc=-Wno-char-subscripts
 730 CERRWARN += -_gcc=-Wno-clobbered
 731 CERRWARN += -_gcc=-Wno-unused-variable
 732 CERRWARN += -_gcc=-Wno-unused-but-set-variable
 733 CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 734 CERRWARN += -_gcc=-Wno-unused-value
 735 CERRWARN += -_gcc=-Wno-unused-function
 736 CERRWARN += -_gcc=-Wno-unused-label
 737 CERRWARN += -_gcc=-Wno-implicit-function-declaration
 738 CERRWARN += -_gcc=-Wno-empty-body
 739 CERRWARN += -_gcc=-Wno-type-limits
 740 CERRWARN += -_gcc=-Wno-address
 741 
 742 SMATCH=off
 743 
 744 pics/$(MACH)/src/lib/libast/conftab.o \
 745 pics/$(MACH64)/src/lib/libast/conftab.o := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
 746 pics/common/comp/setlocale.o            := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
 747 pics/common/comp/setlocale.o            := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
 748 pics/common/comp/setlocale.o            := CERRWARN += -erroff=E_INIT_SIGN_EXTEND
 749 pics/common/hash/hashlook.o             := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 750 pics/common/hash/memhash.o              := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 751 pics/common/hash/memsum.o               := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 752 pics/common/hash/strhash.o              := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 753 pics/common/hash/strsum.o               := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 754 pics/common/misc/recstr.o               := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
 755 pics/common/misc/translate.o            := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
 756 pics/common/path/pathkey.o              := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 757 pics/common/port/astconf.o              := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
 758 pics/common/stdio/fflush.o              := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
 759 pics/common/stdio/getline.o             := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
 760 pics/common/sfio/sfmove.o               := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
 761 pics/common/sfio/sfrd.o                 := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
 762 pics/common/sfio/sfvscanf.o             := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
 763 pics/common/tm/tmxduration.o            := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
 764 
 765 .KEEP_STATE:
 766 
 767 all: mkpicdirs .WAIT $(LIBS)
 768 
 769 #
 770 # libast is not lint-clean yet; fake up a target.  (You can use
 771 # "make lintcheck" to actually run lint; please send all lint fixes
 772 # upstream (to AT&T) so the next update will pull them into ON.)
 773 #
 774 lint:
 775         @ print "usr/src/lib/libast is not lint-clean: skipping"
 776 
 777 include ../../Makefile.targ