]> Zhao Yanbai Git Server - minix.git/commitdiff
ramdisk:add support for cross building a dso ramdisk. 71/171/3
authorKees Jongenburger <keesj@minix3.org>
Thu, 10 Jan 2013 16:05:12 +0000 (17:05 +0100)
committerKees Jongenburger <keesj@minix3.org>
Sun, 13 Jan 2013 16:00:13 +0000 (17:00 +0100)
Change-Id: Ib2840bceab10cf98cb0abfbdb2393af4d59be102

drivers/ramdisk/Makefile
drivers/ramdisk/proto.common.dynamic

index 40459892111ac698137d7c11eaa95dfc1ab8f7d5..8fc79ae718f3a87b6c8313db084b88386c5466f2 100644 (file)
@@ -29,7 +29,15 @@ PROG_COMMANDS=cdprobe loadramdisk mount fsck.mfs sysenv sh \
        service 
 PROG_SERVERS=mfs procfs
 PROG_USRSBIN=pwd_mkdb
-PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} ${PROG_USRSBIN}
+
+.if ${LDSTATIC} == "-dynamic"
+RAMDISK_DYNAMIC=1
+PROG_LIBEXEC+=ld.elf_so
+PROG_LIBS+=libc libminlib libcompat_minix libterminfo
+.endif
+
+PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} ${PROG_USRSBIN} ${PROG_LIBEXEC}
+
 EXTRA=system.conf master.passwd rs.single 
 PROTO_FILES=proto.common.etc proto.common.dynamic proto.dev
 
@@ -48,6 +56,7 @@ RAMDISK_INC_ACPI=1
 CPPFLAGS+= -I${NETBSDSRCDIR}/servers
 CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${EXTRA} image image.c t proto.gen
 CLEANFILES += ${LIBRARIES}
+CLEANFILES += ${PROG_LIBEXEC}
 CLEANFILES += ${.OBJDIR}/etc/*
 
 image: proto.gen ${EXTRA} mtab rc pwd.db spwd.db passwd
@@ -75,9 +84,28 @@ ${driver}: ${PROGROOT}/drivers/${driver}/${driver}
        ${INSTALL} $> $@
 
 ${PROGROOT}/drivers/${driver}/${driver}:
-       ${MAKE} -C ${NETBSDSRCDIR}/drivers/${driver} ${driver}
+       ${MAKE} -C ${NETBSDSRCDIR}/drivers/${driver} all
 .endfor
 
+.for lib in ${PROG_LIBS}
+PROGRAMS+=${lib}.so.0
+CLEANFILES += ${lib}.so.0
+${lib}.so.0:${PROGROOT}/lib/${lib}/${lib}.so.0
+       ${INSTALL} $> $@
+
+${PROGROOT}/lib/${lib}/${lib}.so.0:
+       ${MAKE} -C ${NETBSDSRCDIR}/lib/${lib} all
+.endfor
+
+.for libexec in ${PROG_LIBEXEC}
+${libexec}:${PROGROOT}/libexec/${libexec}/${libexec}
+       ${INSTALL} $> $@
+
+${PROGROOT}/libexec/${libexec}/${libexec}:
+       ${MAKE} -C ${NETBSDSRCDIR}/libexec/${libexec} all
+.endfor
+
+
 .for cmd in ${PROG_COMMANDS}
 .if ${cmd} == sh
 dir.${cmd}=ash
@@ -88,7 +116,7 @@ ${cmd}: ${PROGROOT}/commands/${dir.${cmd}}/${cmd}
        ${INSTALL} $> $@
 
 ${PROGROOT}/commands/$(dir.${cmd})/${cmd}:
-       ${MAKE} -C ${NETBSDSRCDIR}/commands/${dir.${cmd}} ${cmd}
+       ${MAKE} -C ${NETBSDSRCDIR}/commands/${dir.${cmd}} all
 .endfor
 
 .for etc in ${EXTRA}
@@ -101,7 +129,7 @@ ${cmd}: ${PROGROOT}/usr.sbin/${cmd}/${cmd}
        ${INSTALL} $> $@
 
 ${PROGROOT}/usr.sbin/${cmd}/${cmd}:
-       ${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${cmd} ${cmd}
+       ${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${cmd} all
 .endfor
 
 .for server in ${PROG_SERVERS}
@@ -109,7 +137,7 @@ ${server}: ${PROGROOT}/servers/${server}/${server}
        ${INSTALL} $> $@
 
 ${PROGROOT}/servers/${server}/${server}:
-       ${MAKE} -C ${NETBSDSRCDIR}/servers/${server} ${server}
+       ${MAKE} -C ${NETBSDSRCDIR}/servers/${server} all
 .endfor
 
 etc/master.passwd: ${NETBSDSRCDIR}/etc/master.passwd
index 03b137e0b6c6274dc000076edfb52467dfc6b383..6f1fe737f849e141bfd2f69c82188e7adc8865bc 100644 (file)
@@ -1,11 +1,11 @@
        libexec d--755 0 0
-               ld.elf_so ---755 0 0 /usr/libexec/ld.elf_so
+               ld.elf_so ---755 0 0 ld.elf_so
        $
        usr d--755 0 0
                lib d--755 0 0
-                       libc.so.0 ---755 0 0 /usr/lib/libc.so.0
-                       libminlib.so.0 ---755 0 0 /usr/lib/libminlib.so.0
-                       libcompat_minix.so.0 ---755 0 0 /usr/lib/libcompat_minix.so.0
-                       libterminfo.so.0 ---755 0 0 /usr/lib/libterminfo.so.0
+                       libc.so.0 ---755 0 0 libc.so.0
+                       libminlib.so.0 ---755 0 0 libminlib.so.0
+                       libcompat_minix.so.0 ---755 0 0 libcompat_minix.so.0
+                       libterminfo.so.0 ---755 0 0 libterminfo.so.0
                $
        $