diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-10-13 23:30:13 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-10-13 23:30:13 +0000 |
commit | ef81203d7dbea514733b1e2161cf229b4b08d1e5 (patch) | |
tree | 48699b99bc28b0184a4be4260d44ee5fcd2fcef6 /lib/libc/sys | |
parent | c38194a066a56fb77ef5bcaa5855a3c427a40ed4 (diff) |
Make it possible to build to reduced version of a library, including
just specific objects that are compiled with additional options to
reduce their size. For use by distrib/ and crunchgen.
style and naming assistance from espie@
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 50726c177be..417bb4e9b9b 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.115 2013/10/07 01:50:26 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.116 2013/10/13 23:30:12 guenther Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -70,16 +70,19 @@ ASM:= ${ASM:N${i:R}.o} GASM= ${ASM:.o=.go} PASM= ${ASM:.o=.po} SASM= ${ASM:.o=.so} +DASM= ${ASM:.o=.do} PSEUDO= _getlogin.o _setlogin.o _ptrace.o GPSEUDO=${PSEUDO:.o=.go} PPSEUDO=${PSEUDO:.o=.po} SPSEUDO=${PSEUDO:.o=.so} +DPSEUDO=${PSEUDO:.o=.do} PSEUDO_NOERR= _exit.o GPSEUDO_NOERR=${PSEUDO_NOERR:.o=.go} PPSEUDO_NOERR=${PSEUDO_NOERR:.o=.po} SPSEUDO_NOERR=${PSEUDO_NOERR:.o=.so} +DPSEUDO_NOERR=${PSEUDO_NOERR:.o=.do} OBJS+= ${ASM} ${PSEUDO} ${PSEUDO_NOERR} @@ -105,6 +108,14 @@ ${SASM}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h ${COMPILE.S} ${PICFLAG} ${CFLAGS:M-[ID]*} ${AINC} \ -x assembler-with-cpp - -o ${.TARGET} +${DASM}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h + @echo creating ${.TARGET} + @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ + ${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} -x assembler-with-cpp - \ + ${DIST_CFLAGS} -o ${.TARGET}.o + @${LD} -x -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + ${ASM}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ @@ -135,6 +146,14 @@ ${SPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h ${COMPILE.S} ${PICFLAG} ${CFLAGS:M-[ID]*} ${AINC} \ -x assembler-with-cpp - -o ${.TARGET} +${DPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h + @echo creating ${.TARGET} + @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ + ${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} -x assembler-with-cpp - \ + ${DIST_CFLAGS} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + ${PSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ @@ -165,6 +184,14 @@ ${SPSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/sysca ${COMPILE.S} ${PICFLAG} ${CFLAGS:M-[ID]*} ${AINC} \ -x assembler-with-cpp - -o ${.TARGET} +${DPSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h + @echo creating ${.TARGET} + @printf '#include "SYS.h"\nPSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \ + ${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} -x assembler-with-cpp - \ + ${DIST_CFLAGS} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + ${PSEUDO_NOERR}: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/SYS.h /usr/include/sys/syscall.h @echo creating ${.TARGET} @printf '#include "SYS.h"\nPSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \ |