diff --git a/lib/libarch/Makefile b/lib/libarch/Makefile index e8737d840f00..dc3d4665d06d 100644 --- a/lib/libarch/Makefile +++ b/lib/libarch/Makefile @@ -1,9 +1,22 @@ -# $NetBSD: Makefile,v 1.11 1999/03/05 12:19:17 drochner Exp $ +# $NetBSD: Makefile,v 1.12 1999/06/10 00:49:51 simonb Exp $ -ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/} +ARCHDIRS= arm32 i386 m68k -.if exists(${ARCHSUBDIR}) -SUBDIR+= ${ARCHSUBDIR} +.for arch in ${ARCHDIRS} +.include "${.CURDIR}/${arch:C/mipse[bl]/mips/}/Makefile.inc" +.PATH: ${.CURDIR}/${arch:C/mipse[bl]/mips/} +.endfor + +OBJS+= ${ASM} +POBJS+= ${ASM:.o=.po} +CLEANFILES+= ${ASM} ${POBJS} + +# Build the library if SRCS is now defined ... +.if defined(SRCS) +LIB= ${MACHINE_ARCH:C/mipse[bl]/mips/} + +.include +.else +# ... otherwise just build the manpages +.include .endif - -.include diff --git a/lib/libarch/Makefile.inc b/lib/libarch/Makefile.inc deleted file mode 100644 index abd94809b532..000000000000 --- a/lib/libarch/Makefile.inc +++ /dev/null @@ -1,9 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 1999/03/05 12:19:17 drochner Exp $ -# -# This Makefile includes boiler-plate stuff included by each subdir's Makefile. - -OBJS+= ${ASM} -POBJS+= ${ASM:.o=.po} -CLEANFILES+= ${ASM} ${POBJS} - -LIB= ${MACHINE_ARCH:C/mipse[bl]/mips/} diff --git a/lib/libarch/arm32/Makefile b/lib/libarch/arm32/Makefile deleted file mode 100644 index f8d8a6fc9a42..000000000000 --- a/lib/libarch/arm32/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $NetBSD: Makefile,v 1.2 1997/10/05 23:48:40 mark Exp $ - -.PATH: ${LIBC}/arm32 - -SRCS+= arm32_sync_icache.c arm32_drain_writebuf.c - -MAN+= arm32_sync_icache.2 arm32_drain_writebuf.2 - -.include - diff --git a/lib/libarch/arm32/Makefile.inc b/lib/libarch/arm32/Makefile.inc index 5521858b5be2..85bca6826442 100644 --- a/lib/libarch/arm32/Makefile.inc +++ b/lib/libarch/arm32/Makefile.inc @@ -1,10 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.3 1999/06/09 05:43:10 simonb Exp $ +# $NetBSD: Makefile.inc,v 1.4 1999/06/10 00:49:51 simonb Exp $ +.if (${MACHINE_ARCH} == "arm32") .PATH: ${LIBC}/arm32 SRCS+= arm32_sync_icache.c arm32_drain_writebuf.c +.endif MAN+= arm32_sync_icache.2 arm32_drain_writebuf.2 - -.include - diff --git a/lib/libarch/i386/Makefile b/lib/libarch/i386/Makefile.inc similarity index 64% rename from lib/libarch/i386/Makefile rename to lib/libarch/i386/Makefile.inc index 0cfad98e5049..4b5c59b2be24 100644 --- a/lib/libarch/i386/Makefile +++ b/lib/libarch/i386/Makefile.inc @@ -1,17 +1,18 @@ -# $NetBSD: Makefile,v 1.1 1996/02/21 02:45:47 jtk Exp $ +# $NetBSD: Makefile.inc,v 1.7 1999/06/10 00:49:52 simonb Exp $ +.if (${MACHINE_ARCH} == "i386") .PATH: ${LIBC}/i386 SRCS+= i386_get_ldt.c i386_set_ldt.c \ i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c \ i386_vm86.c +SHLIB_VERSION_FILE= ${.CURDIR}/i386/shlib_version +.endif + MAN+= i386_get_ldt.2 \ i386_iopl.2 i386_get_ioperm.2 \ i386_vm86.2 MLINKS+=i386_get_ldt.2 i386_set_ldt.2 \ i386_get_ioperm.2 i386_set_ioperm.2 - -.include - diff --git a/lib/libarch/m68k/Makefile b/lib/libarch/m68k/Makefile deleted file mode 100644 index 71aad7ca0cdc..000000000000 --- a/lib/libarch/m68k/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $NetBSD: Makefile,v 1.3 1999/02/17 08:24:53 itohy Exp $ - -SRCS= m68k_sync_icache.S -MAN= m68k_sync_icache.2 -MKLINT=no - -.include diff --git a/lib/libarch/m68k/Makefile.inc b/lib/libarch/m68k/Makefile.inc index 6973d54ca98b..53d71a6a20f6 100644 --- a/lib/libarch/m68k/Makefile.inc +++ b/lib/libarch/m68k/Makefile.inc @@ -1,7 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.4 1999/06/09 05:43:48 simonb Exp $ +# $NetBSD: Makefile.inc,v 1.5 1999/06/10 00:49:52 simonb Exp $ +.if (${MACHINE_ARCH} == "m68k") SRCS= m68k_sync_icache.S -MAN= m68k_sync_icache.2 MKLINT=no +.endif -.include +MAN+= m68k_sync_icache.2