2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright (c) 2012 by Delphix. All rights reserved.
14 # Copyright 2015 Garrett D'Amore <garrett@damore.org>
15 # Copyright 2019 Joyent, Inc.
16 # Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
17 # Copyright 2023 Bill Sommerfeld <sommerfeld@alum.mit.edu>
18 # Copyright 2024 Oxide Computer Company
61 set_constraint_handler_s \
62 strcoll-strxfrm-6907 \
76 CPPFLAGS
+= -D_REENTRANT
78 PROGS32
= $(PROGS
:%=%.32)
83 aligned_alloc
.32 := LDLIBS
+= -lproc
84 aligned_alloc
.64 := LDLIBS64
+= -lproc
85 posix_memalign
.32 := LDLIBS
+= -lproc
86 posix_memalign
.64 := LDLIBS64
+= -lproc
88 asprintf-14933.32
:= CSTD
=$(GNU_C99
)
89 asprintf-14933.64
:= CSTD
=$(GNU_C99
)
91 memset_s
.32 := CPPFLAGS
+= -D__STDC_WANT_LIB_EXT1__
=1
92 memset_s
.64 := CPPFLAGS
+= -D__STDC_WANT_LIB_EXT1__
=1
93 set_constraint_handler_s
.32 := CPPFLAGS
+= -D__STDC_WANT_LIB_EXT1__
=1
94 set_constraint_handler_s
.64 := CPPFLAGS
+= -D__STDC_WANT_LIB_EXT1__
=1
96 isatty
.32 := CSTD
=$(GNU_C99
)
97 isatty
.64 := CSTD
=$(GNU_C99
)
99 mutex-16200.32
:= LDLIBS
+= -lproc
100 mutex-16200.64
:= LDLIBS64
+= -lproc
101 mutex-16200.32
:= CSTD
=$(GNU_C99
)
102 mutex-16200.64
:= CSTD
=$(GNU_C99
)
104 strtonum
.32 := CSTD
=$(GNU_C99
)
105 strtonum
.64 := CSTD
=$(GNU_C99
)
107 ROOTOPTDIR
= $(ROOT
)/opt
/libc-tests
/tests
108 ROOTOPTPROGS
= $(PROGS32
:%=$(ROOTOPTDIR
)/%) \
109 $(PROGS64
:%=$(ROOTOPTDIR
)/%) \
110 $(SCRIPTS
:%=$(ROOTOPTDIR
)/%)
112 include $(SRC
)/cmd
/Makefile.cmd
115 install := TARGET
= install
116 clean := TARGET
= clean
117 clobber := TARGET
= clobber
118 lint
:= TARGET
= lint
122 install: $(SUBDIRS
) $(ROOTOPTPROGS
)
124 all: $(SUBDIRS
) $(PROGS32
) $(PROGS64
)
126 clean lint
: $(SUBDIRS
)
128 $(ROOTOPTPROGS
): $(PROGS32
) $(PROGS64
) $(ROOTOPTDIR
)
136 $(ROOTOPTDIR
)/%: %.ksh
140 $(LINK64.c
) -o
$@
$< $(LDLIBS64
)
144 $(LINK.c
) -o
$@
$< $(LDLIBS
)
148 $(RM
) $(PROGS32
) $(PROGS64
)
151 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)