From fb68a737b7f25322da156794fbbe61debf97131c Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 12 Aug 2008 09:24:22 +0000 Subject: [PATCH] Generate an EMILE Apple_Driver --- Makefile | 6 +++++- second/Makefile | 25 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 229ff49..1c97ff2 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ all: tools.mk docs libemile libblock libiso9660 libiso9660-m68k libgzip-m68k \ second/$(KARCH)-linux-floppy/second \ second/$(KARCH)-linux-scsi/second second/m68k-netbsd-floppy/second \ libconfig libconfig-m68k \ - second/$(KARCH)-linux-all/second + second/$(KARCH)-linux-all/second second/m68k-linux-scsi-driver/apple_driver tools.mk: scripts/tools.sh sh scripts/tools.sh > $@ @@ -185,6 +185,10 @@ second/$(KARCH)-linux-all/second:: libmacos libunix libiso9660-m68k libext2-m68k second/m68k-netbsd-floppy/second:: libmacos libunix libiso9660-m68k libext2-m68k libgzip-m68k libfloppy libstream libblock libcontainer libui libconfig-m68k libmap-m68k $(MAKE) -C second TARGET=m68k-netbsd MEDIA=floppy +second/m68k-linux-scsi-driver/apple_driver:: libmacos libunix libiso9660-m68k libgzip-m68k libstream libui libconfig-m68k libmap-m68k + $(MAKE) -C second MEDIA=scsi TARGET=m68k-linux \ + m68k-linux-scsi-driver/apple_driver + first-install:: $(MAKE) -C first install diff --git a/second/Makefile b/second/Makefile index e182f61..eb91556 100644 --- a/second/Makefile +++ b/second/Makefile @@ -129,6 +129,20 @@ $(TARGET)-$(MEDIA)/second:: OPTOBJS="$(OBJS_TARGET) $(OBJS_MEDIA)" \ OPT_LIBS="$(LIBS_MEDIA)" +$(TARGET)-$(MEDIA)-driver/apple_driver:: + test -d $(TARGET)-$(MEDIA)-driver || mkdir $(TARGET)-$(MEDIA)-driver + cd $(TARGET)-$(MEDIA)-driver && make -f $(TOP)/Makefile apple_driver \ + VERSION=$(VERSION) \ + TOP=$(TOP) \ + OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) \ + AS=$(AS) PPC_OBJCOPY=$(PPC_OBJCOPY) \ + PPC_CC=$(PPC_CC) \ + SIGNATURE="$(SIGNATURE)" \ + OPT_CPPFLAGS="-DAPPLE_DRIVER $(CPPFLAGS_TARGET) $(CPPFLAGS_MEDIA)" \ + OPT_CFLAGS="$(CFLAGS_TARGET)" \ + OPTOBJS="$(OBJS_TARGET) $(OBJS_MEDIA)" \ + OPT_LIBS="$(LIBS_MEDIA)" + ifeq ("$(TARGET)", "ppc-linux") bootstrapPPC.o: bootstrapPPC.S $(PPC_CC) $(CPPFLAGS) -c $(TOP)/bootstrapPPC.S -o bootstrapPPC.o @@ -153,6 +167,14 @@ second: second.o second.o: $(OBJS) $(TOP)/ld.script $(LD) -T $(TOP)/ld.script -o second.o $(OBJS) $(LIBS) + +apple_driver: apple_driver.o + $(OBJCOPY) -j .text -j .data -j .rodata -j .got \ + -O binary apple_driver.o apple_driver + +apple_driver.o: $(OBJS) $(TOP)/ld.script + $(LD) -T $(TOP)/ld.script -o apple_driver.o $(OBJS) $(LIBS) + endif .c.o: @@ -183,6 +205,7 @@ clean: ppc-linux-floppy ppc-linux-scsi ppc-linux-ata \ mixed-linux-floppy mixed-linux-scsi mixed-linux-ata \ m68k-netbsd-floppy classic-linux-floppy m68k-linux-full \ - ppc-linux-full mixed-linux-full m68k-netbsd-full + ppc-linux-full mixed-linux-full m68k-netbsd-full \ + m68k-linux-scsi-driver include $(TOP)/../tools.mk