summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2011-07-09 00:49:29 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2011-07-09 00:49:29 +0000
commitf984863a2cc0825432ba8b9536a0eb91e4b339b0 (patch)
treea8f7200822a694b397128c964af3849a94610bdf /distrib
parent0db3d0d8af1c885cf082f4cbc484006aadf0baf1 (diff)
conditionally include extra source files on elf archs.
'will work for now' deraadt@
Diffstat (limited to 'distrib')
-rw-r--r--distrib/ramdisk/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/distrib/ramdisk/Makefile b/distrib/ramdisk/Makefile
index 0b68dc86c6d..42de937b64c 100644
--- a/distrib/ramdisk/Makefile
+++ b/distrib/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.38 2011/04/18 16:52:10 thib Exp $
+# $OpenBSD: Makefile,v 1.39 2011/07/09 00:49:28 drahn Exp $
REV= ${OSrev}
@@ -23,10 +23,12 @@ IMAGESIZE?= 8192 # 4MB in 512 byte blocks
NEWFS_WILL_FAIL?=false
.if ${ELF_TOOLCHAIN:L} == "yes"
RDSETROOT?= elfrdsetroot
+RDSETROOT_EXT_SRC=${.CURDIR}/../common/elf32.c ${.CURDIR}/../common/elf64.c
CRUNCHGENOPTS?=-E
.else
RDSETROOT?= rdsetroot
CRUNCHGENOPTS?=
+RDSETROOT_EXT_SRC=
.endif
KERNEL?= RAMDISK
UTILS?= ${.CURDIR}/../miniroot
@@ -97,7 +99,8 @@ bsd.gz: bsd.rd
${GZIPCMD} ${GZIPFLAGS} < bsd.rd > bsd.gz
${RDSETROOT}: ${.CURDIR}/../common/${RDSETROOT}.c
- ${HOSTCC} ${HOSTCCFLAGS} -o ${RDSETROOT} ${.CURDIR}/../common/${RDSETROOT}.c
+ ${HOSTCC} ${HOSTCCFLAGS} -o ${RDSETROOT} ${RDSETROOT_EXT_SRC} \
+ ${.CURDIR}/../common/${RDSETROOT}.c
${IMAGE}: ${CBIN}
dd if=/dev/zero of=${REALIMAGE} count=${IMAGESIZE}