1# $OpenBSD: Makefile.inc,v 1.17 2012/04/26 01:22:31 matthew Exp $ 2# 3# This file contains make rules used to build libc 4# 5 6.ifndef LIBCSRCDIR 7all: 8 @echo "need to define LIBCSRCDIR" >&2; exit 1 9.endif 10 11CFLAGS+= -I${LIBCSRCDIR}/include 12 13# Include link-time warnings about unsafe API uses (ie. strcpy) 14CFLAGS+=-DAPIWARN 15 16.if (${YP:L} == "yes") 17CFLAGS+=-DYP -I${LIBCSRCDIR}/yp 18.endif 19 20LLIBS= 21AINC= -I${LIBCSRCDIR}/arch/${MACHINE_CPU} 22.if defined(DESTDIR) 23AINC+= -nostdinc -idirafter ${DESTDIR}/usr/include 24.endif 25 26.if exists (${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc) 27.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU} 28.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc" 29.endif 30 31.include "${LIBCSRCDIR}/db/Makefile.inc" 32.include "${LIBCSRCDIR}/dlfcn/Makefile.inc" 33.include "${LIBCSRCDIR}/citrus/Makefile.inc" 34.include "${LIBCSRCDIR}/compat-43/Makefile.inc" 35.include "${LIBCSRCDIR}/gen/Makefile.inc" 36.include "${LIBCSRCDIR}/crypt/Makefile.inc" 37.include "${LIBCSRCDIR}/gdtoa/Makefile.inc" 38.include "${LIBCSRCDIR}/gmon/Makefile.inc" 39.include "${LIBCSRCDIR}/hash/Makefile.inc" 40.include "${LIBCSRCDIR}/locale/Makefile.inc" 41.include "${LIBCSRCDIR}/net/Makefile.inc" 42.include "${LIBCSRCDIR}/nls/Makefile.inc" 43.include "${LIBCSRCDIR}/ohash/Makefile.inc" 44.if (${MACHINE_CPU} != "alpha") 45.include "${LIBCSRCDIR}/quad/Makefile.inc" 46.endif 47.include "${LIBCSRCDIR}/regex/Makefile.inc" 48.include "${LIBCSRCDIR}/rpc/Makefile.inc" 49.include "${LIBCSRCDIR}/stdio/Makefile.inc" 50.include "${LIBCSRCDIR}/stdlib/Makefile.inc" 51.include "${LIBCSRCDIR}/string/Makefile.inc" 52.include "${LIBCSRCDIR}/termios/Makefile.inc" 53.include "${LIBCSRCDIR}/thread/Makefile.inc" 54.include "${LIBCSRCDIR}/time/Makefile.inc" 55.include "${LIBCSRCDIR}/sys/Makefile.inc" 56.if (${YP:L} == "yes") 57.include "${LIBCSRCDIR}/yp/Makefile.inc" 58.endif 59 60CFLAGS+=-DNLS 61 62LIBKERN= ${LIBCSRCDIR}/../../sys/lib/libkern 63 64KSRCS= bcmp.c bzero.c ffs.c strcat.c strcmp.c strcpy.c strlen.c strncmp.c \ 65 strncpy.c strnlen.c htonl.c htons.c ntohl.c ntohs.c timingsafe_bcmp.c 66.if (${MACHINE_CPU} != "alpha") 67KSRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 68 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 69 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 70KINCLUDES+= quad/quad.h 71.endif 72 73