Makefile.inc revision 1.100
11.100Skre#	$NetBSD: Makefile.inc,v 1.100 2024/07/24 08:55:08 kre Exp $
21.35Sperry#	from: @(#)Makefile.inc	8.3 (Berkeley) 2/4/95
31.1Scgd
41.1Scgd# stdlib sources
51.41Sdrochner.PATH: ${ARCHDIR}/stdlib ${.CURDIR}/stdlib
61.1Scgd
71.75StronSRCS+=	_env.c _rand48.c \
81.95Schristos	a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
91.93Sjoerg	bsearch.c cxa_thread_atexit.c drand48.c exit.c \
101.50Scgd	getenv.c getopt.c getopt_long.c getsubopt.c \
111.69Smatt	hcreate.c heapsort.c imaxdiv.c insque.c jrand48.c l64a.c lldiv.c \
121.72Sjoerg	lcong48.c lrand48.c lsearch.c merge.c mi_vector_hash.c mrand48.c \
131.56Schristos	nrand48.c putenv.c qabs.c qdiv.c qsort.c posix_openpt.c pty.c \
141.79Schristos	quick_exit.c radixsort.c rand.c rand_r.c random.c remque.c \
151.89Sjoerg	reallocarr.c reallocarray.c seed48.c setenv.c srand48.c strsuftoll.c \
161.85Schristos	strtoi.c strtou.c strtonum.c \
171.52Skleink	strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \
181.54Sdrochner	strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \
191.60Schristos	unsetenv.c strfmon.c
201.1Scgd
211.73Sdsl# These are often replaced by MD .S versions
221.73SdslSRCS+=	abs.c labs.c llabs.c imaxabs.c
231.73SdslSRCS+=	div.c ldiv.c imaxdiv.c
241.73Sdsl
251.73Sdsl# This might be replaced by erand48.c
261.73SdslSRCS+= erand48_ieee754.c
271.73Sdsl
281.83Spooka.if ${RUMPRUN} != "yes"
291.95Schristos.   if (${USE_JEMALLOC} != "no")
301.95Schristos.      if ${HAVE_JEMALLOC} > 100
311.95Schristos.         include "${NETBSDSRCDIR}/external/bsd/jemalloc/lib/Makefile.inc"
321.95Schristos.      else
331.95SchristosSRCS+=	jemalloc.c aligned_alloc.c
341.95Schristos.      endif 
351.95Schristos.   else
361.68SchristosSRCS+=	malloc.c
371.95Schristos.   endif
381.83Spooka.endif
391.66Sad
401.71SmrgCPPFLAGS.strtol.c+=	-I${LIBCDIR}/../../common/lib/libc/stdlib
411.71SmrgCPPFLAGS.strtoq.c+=	-I${LIBCDIR}/../../common/lib/libc/stdlib
421.71SmrgCPPFLAGS.strtouq.c+=	-I${LIBCDIR}/../../common/lib/libc/stdlib
431.70Sjoerg
441.41Sdrochner.include "${ARCHDIR}/stdlib/Makefile.inc"
451.1Scgd
461.45SkleinkMAN+=	a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 atoll.3 \
471.79Schristos	at_quick_exit.3 \
481.69Smatt	bsearch.3 \
491.69Smatt	div.3 \
501.69Smatt	exit.3 \
511.69Smatt	getenv.3 getopt.3 getopt_long.3 getsubopt.3 grantpt.3 \
521.69Smatt	hcreate.3 \
531.77Sjruoho	insque.3 \
541.74Sjruoho	jemalloc.3 \
551.77Sjruoho	lsearch.3 \
561.72Sjoerg	malloc.3 memory.3 mi_vector_hash.3 \
571.69Smatt	posix_memalign.3 posix_openpt.3 ptsname.3 \
581.79Schristos	qabs.3 qdiv.3 quick_exit.3 qsort.3 \
591.89Sjoerg	radixsort.3 rand48.3 rand.3 random.3 reallocarr.3 reallocarray.3 \
601.90Schristos	strfmon.3 strsuftoll.3 strtod.3 strtoi.3 strtol.3 strtou.3 strtoul.3 \
611.90Schristos	strtonum.3 system.3 \
621.69Smatt	tsearch.3 \
631.69Smatt	unlockpt.3
641.1Scgd
651.97Schristosstrtou.3: strtoi.3
661.97Schristos	${_MKTARGET_CREATE}
671.97Schristos	${TOOL_SED} -e s/strtoi/strtou/g -e s/STRTOI/STRTOU/g \
681.100Skre	    -e 's/an intmax_t/a unitmax_t/g' -e 's/strtou 3/strtoi 3/g' \
691.97Schristos	    -e s/intmax_t/uintmax_t/g -e s/%jd/%ju/g ${.ALLSRC} > ${.TARGET}
701.97SchristosCLEANFILES += strtou.3
711.97Schristos
721.38SkleinkMLINKS+=a64l.3 l64a.3
731.39SkleinkMLINKS+=a64l.3 l64a_r.3
741.76SjruohoMLINKS+=abs.3 labs.3 \
751.76Sjruoho	abs.3 llabs.3 \
761.76Sjruoho	abs.3 imaxabs.3
771.77SjruohoMLINKS+=div.3 ldiv.3 \
781.77Sjruoho	div.3 lldiv.3 \
791.77Sjruoho	div.3 imaxdiv.3
801.1ScgdMLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
811.61SchristosMLINKS+=getenv.3 getenv_r.3
821.50ScgdMLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3
831.78SchristosMLINKS+=hcreate.3 hcreate_r.3 hcreate.3 hdestroy_r.3 hcreate.3 hsearch_r.3
841.82SchristosMLINKS+=hcreate.3 hdestroy1.3 hcreate.3 hdestroy1_r.3
851.59SdrochnerMLINKS+=insque.3 remque.3
861.92SmsaitohMLINKS+=jemalloc.3 malloc.conf.5
871.59SdrochnerMLINKS+=lsearch.3 lfind.3
881.44SlukemMLINKS+=malloc.3 calloc.3 malloc.3 realloc.3 malloc.3 free.3
891.91SnrosMLINKS+=posix_memalign.3 aligned_alloc.3
901.21SmycroftMLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3
911.81SchristosMLINKS+=ptsname.3 ptsname_r.3
921.33SkleinkMLINKS+=rand.3 rand_r.3
931.1ScgdMLINKS+=rand.3 srand.3
941.10SjtcMLINKS+=rand48.3 drand48.3 rand48.3 erand48.3 rand48.3 lrand48.3
951.10SjtcMLINKS+=rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 jrand48.3
961.10SjtcMLINKS+=rand48.3 srand48.3 rand48.3 seed48.3 rand48.3 lcong48.3
971.35SperryMLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3
981.49SlukemMLINKS+=radixsort.3 sradixsort.3
991.94SsnjMLINKS+=strfmon.3 strfmon_l.3
1001.53SlukemMLINKS+=strsuftoll.3 strsuftollx.3
1011.64SkleinkMLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
1021.100SkreMLINKS+=strtoi.3 strtoi_l.3
1031.52SkleinkMLINKS+=strtol.3 strtoimax.3
1041.45SkleinkMLINKS+=strtol.3 strtoll.3
1051.35SperryMLINKS+=strtol.3 strtoq.3
1061.100SkreMLINKS+=strtou.3 strtou_l.3
1071.45SkleinkMLINKS+=strtoul.3 strtoull.3
1081.52SkleinkMLINKS+=strtoul.3 strtoumax.3
1091.35SperryMLINKS+=strtoul.3 strtouq.3
1101.40SchristosMLINKS+=tsearch.3 tfind.3 tsearch.3 twalk.3 tsearch.3 tdelete.3
1111.96Schristos
1121.99Sriastrad# lint(1) spuriously complains about `*s == CHAR_MAX' even though *s
1131.99Sriastrad# has type char.
1141.99SriastradLINTFLAGS.strfmon.c += -X 230
1151.99Sriastrad
1161.96Schristos# jemalloc
1171.96SchristosLINTFLAGS.arena.c += -X 86,117,161,191,193,207,217,226
1181.96SchristosLINTFLAGS.background_thread.c += -X 86,117,132,161,191,193,207,217,226
1191.96SchristosLINTFLAGS.base.c += -X 86,117,161,191,193,207,217,226
1201.96SchristosLINTFLAGS.bin.c += -X 86,117,161,191,193,207,217,226
1211.96SchristosLINTFLAGS.bitmap.c += -X 86,117,161,191,193,207,217,226
1221.96SchristosLINTFLAGS.chk.c += -X 191,193,217,226,239
1231.96SchristosLINTFLAGS.ckh.c += -X 86,117,161,191,193,207,217,226,239,284
1241.96SchristosLINTFLAGS.ctl.c += -X 86,117,135,161,193,191,207,217,226
1251.96SchristosLINTFLAGS.divide.c += -X 226
1261.96SchristosLINTFLAGS.extent.c += -X 86,161,117,191,193,207,217,226
1271.96SchristosLINTFLAGS.extent_dss.c += -X 86,117,161,191,193,207,217,226
1281.96SchristosLINTFLAGS.extent_mmap.c += -X 86,117,161,191,193,207,217,226
1291.96SchristosLINTFLAGS.jemalloc.c += -X 86,117,161,191,193,207,217,226,236,307
1301.98SchristosLINTFLAGS.jemalloc.c += -X 141 # i386
1311.96SchristosLINTFLAGS.hooks.c += -X 226
1321.96SchristosLINTFLAGS.large.c += -X 86,161,117,191,193,207,217,226
1331.96SchristosLINTFLAGS.log.c += -X 86,117,161,191,193,207,217,226
1341.96SchristosLINTFLAGS.malloc_io.c += -X 86,117,161,191,193,207,217,226,284
1351.98SchristosLINTFLAGS.malloc_io.c += -X 132 # i386
1361.96SchristosLINTFLAGS.mutex.c += -X 86,117,161,191,193,207,217,226
1371.96SchristosLINTFLAGS.mutex_pool.c += -X 86,117,161,191,193,207,217,226
1381.96SchristosLINTFLAGS.nstime.c += -X 86,117,161,191,193,207,217,226
1391.96SchristosLINTFLAGS.pages.c += -X 86,117,161,191,193,207,217,226,298
1401.96SchristosLINTFLAGS.prng.c += -X 86,117,161,191,193,207,217,226
1411.96SchristosLINTFLAGS.prof.c += -X 86,117,161,181,191,193,207,217,226,236
1421.96SchristosLINTFLAGS.rtree.c += -X 86,117,161,191,193,207,217,226,239
1431.96SchristosLINTFLAGS.sz.c += -X 86,226
1441.96SchristosLINTFLAGS.stats.c += -X 42,86,117,135,161,191,193,207,217,226,247,351
1451.96SchristosLINTFLAGS.tcache.c += -X 86,117,161,191,193,207,217,226,239,309
1461.96SchristosLINTFLAGS.ticker.c += -X 86,117,161,191,193,207,217,226
1471.96SchristosLINTFLAGS.tsd.c += -X 86,117,161,191,193,207,217,226,346,351
1481.96SchristosLINTFLAGS.witness.c += -X 86,117,161,191,193,207,217,226
149