From c0ae22c56f7867e9bbab9aa9721be0252270dd40 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 10 May 2005 11:25:17 +0000 Subject: [PATCH] allow to build EMILE without vmlinux --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c00684f..19fd347 100644 --- a/Makefile +++ b/Makefile @@ -55,8 +55,11 @@ PPC_OBJCOPY=$(PPC_CROSS_COMPILE)objcopy # Kernel architecture -KERNEL=vmlinux +KERNELPATH=vmlinux +KERNEL=$(shell ls $(KERNELPATH) 2> /dev/null) + +ifeq ($(KERNEL),$(KERNELPATH)) FILEARCH=$(shell file -bknL $(KERNEL) | cut -d, -f 2) ifeq ($(findstring PowerPC, $(FILEARCH)), PowerPC) KARCH=ppc @@ -67,12 +70,20 @@ else KARCH=unknown endif endif +else +KARCH=m68k +endif # Target all: libemile tools first/first_floppy second/$(KARCH)-second_floppy \ second/$(KARCH)-second_scsi +# We can build floppy image only if a kernel is provided + +ifeq ($(KERNEL),$(KERNELPATH)) +all_bin: netboot.bin rescue.bin debian-installer.bin boot.bin + floppy.bin: libemile tools first/first_floppy vmlinuz \ second/$(KARCH)-second_floppy tools/emile-install -f first/first_floppy \ @@ -128,6 +139,7 @@ vmlinuz: vmlinux.bin cp vmlinux.bin vmlinuz.out gzip -9 vmlinuz.out mv vmlinuz.out.gz vmlinuz +endif first/first_floppy:: $(MAKE) -C first OBJCOPY=$(M68K_OBJCOPY) LD=$(M68K_LD) CC=$(M68K_CC) AS=$(M68K_AS) SIGNATURE="$(SIGNATURE)"