simplify build logic a bit

. always compile acpi, with clang, so never have
	  build/clean inconsistencies; can be enabled (i.e. run
	  at boot time) by setting acpi variable in the boot monitor
	. always strip binaries with the right strip cmd, so never
	  have ack/elf strip inconsistencies
This commit is contained in:
Ben Gras 2011-10-23 23:53:30 +00:00
parent 3f9ef4ac46
commit b1eba81b9d
4 changed files with 10 additions and 24 deletions

View file

@ -10,14 +10,10 @@ SUBDIR= at_wini bios_wini floppy log tty pci .WAIT ramdisk .WAIT memory
.else .else
.if ${COMPILER_TYPE} == "gnu"
SUBDIR = acpi
.endif
# memory driver must be last for ramdisk image # memory driver must be last for ramdisk image
SUBDIR+= ahci amddev atl2 at_wini audio bios_wini dec21140A dp8390 dpeth \ SUBDIR+= ahci amddev atl2 at_wini audio bios_wini dec21140A dp8390 dpeth \
e1000 filter floppy fxp hello lance log orinoco pci printer \ e1000 filter floppy fxp hello lance log orinoco pci printer \
random readclock rtl8139 rtl8169 ti1225 tty \ random readclock rtl8139 rtl8169 ti1225 tty acpi \
.WAIT ramdisk .WAIT memory .WAIT ramdisk .WAIT memory
.endif .endif

View file

@ -1,8 +1,8 @@
.if ${COMPILER_TYPE} == "ack"
all:
echo "Skipping ACPI driver, ACK compiler in use"
.else
# The ACPI driver is compilable only with a "gnu" type compiler # The ACPI driver is compilable only with a "gnu" type compiler
.if ${COMPILER_TYPE} != "gnu"
CC:=clang
COMPILER_TYPE:=gnu
.endif
PROG= acpi PROG= acpi
@ -150,5 +150,3 @@ MAN=
BINDIR?= /usr/sbin BINDIR?= /usr/sbin
.include <minix.service.mk> .include <minix.service.mk>
.endif

View file

@ -10,8 +10,7 @@ SCRIPTS=newroot
PROGRAMS+= ahci ext2 PROGRAMS+= ahci ext2
.endif .endif
# acpi is not compiled with ack .if ${MKACPI} != "no"
.if ${COMPILER_TYPE} == "gnu" && ${MKACPI} != "no"
PROGRAMS+= acpi PROGRAMS+= acpi
.endif .endif
@ -166,15 +165,7 @@ rs.single: ../../etc/rs.single
install ${STRIPFLAG} ../../etc/$@ $@ install ${STRIPFLAG} ../../etc/$@ $@
proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh ${PROTO} proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh ${PROTO}
for p in $(PROGRAMS); do file $$p | grep -q ELF && strip -s $$p; done
sh -e proto.sh ${PROTO} >proto.gen sh -e proto.sh ${PROTO} >proto.gen
.if ${OBJECT_FMT} == "ELF"
proto.gen: elfstrip
.PHONY: elfstrip
elfstrip: $(PROGRAMS)
strip -s $(PROGRAMS)
.endif
.include <minix.service.mk> .include <minix.service.mk>

View file

@ -5,9 +5,10 @@ exec >/dev/log
exec 2>/dev/log exec 2>/dev/log
exec </dev/null exec </dev/null
if [ -e /sbin/acpi ] ACPI=/sbin/acpi
if [ -e $ACPI -a -n "`sysenv acpi`" ]
then then
/bin/service -c up /sbin/acpi /bin/service -c up $ACPI
fi fi
/bin/service -c up /sbin/pci /bin/service -c up /sbin/pci
/bin/service -cn up /sbin/floppy -dev /dev/fd0 /bin/service -cn up /sbin/floppy -dev /dev/fd0