1# $OpenBSD: Makefile,v 1.29 2010/02/03 20:49:00 miod Exp $ 2# 3# The NLS (message catalog) functions are always in libc. To choose that 4# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS 5# functions, put -DNLS on the CFLAGS line below. 6# 7# The YP functions are always in libc. To choose that getpwent() and friends 8# actually call the YP functions, put -DYP on the CFLAGS line below. 9 10.include <bsd.own.mk> 11 12LIB=c 13WANTLINT= 14LINTFLAGS=-z 15CLEANFILES+=tags 16#CFLAGS+=-Werror 17 18LIBCSRCDIR=${.CURDIR} 19.include "${LIBCSRCDIR}/Makefile.inc" 20 21NLS= C.msg Pig.msg da.msg de.msg es.msg fi.msg fr.msg nl.msg no.msg ru.msg sv.msg it.msg 22 23copy-to-libkern: copy-to-libkern-machind copy-to-libkern-machdep 24 25.if make(copy-to-libkern) 26copy-to-libkern-machind: ${KSRCS} 27 cp -p ${.ALLSRC} ${LIBKERN} 28.if defined(KINCLUDES) && !empty(KINCLUDES) 29 (cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN}) 30.endif 31 32copy-to-libkern-machdep: ${KMSRCS} 33.if defined(KMSRCS) && !empty(KMSRCS) 34 cp -p ${.ALLSRC} ${LIBKERN}/arch/${MACHINE_CPU} 35.endif 36.if defined(KMINCLUDES) && !empty(KMINCLUDES) 37 (cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${MACHINE_CPU}) 38.endif 39 40rm-from-libkern: 41 for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done 42.if defined(KMSRCS) && !empty(KMSRCS) 43 for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${MACHINE_CPU}/$$i; done 44.endif 45.endif 46 47all: tags 48tags: ${SRCS} 49 ctags -w ${.ALLSRC:M*.c} 50 egrep "^SYSENTRY(.*)|^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" \ 51 /dev/null ${.ALLSRC:M*.S} | \ 52 sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \ 53 >> tags; sort -o tags tags 54 55beforeinstall: 56 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 tags \ 57 ${DESTDIR}/var/db/lib${LIB}.tags 58 59.include <bsd.lib.mk> 60