From 1e5b612846943b32152cd4b639cef894b6f81e22 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Sun, 8 Mar 2009 23:54:43 -0400 Subject: memdisk varieties: Allow for multiple memdisk installable hooks This patch "sets the stage" for the memdisk kernel to include different "installables": versions of the memdisk hooks. This patch splits the case of the EDD-compiled hook from the non-EDD-compiled hook. Both are available inside the kernel, and the kernel chooses which one to install based on the command-line. It's possible that other, slightly modified versions of the memdisk hook could be useful to have... --- memdisk/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'memdisk/Makefile') diff --git a/memdisk/Makefile b/memdisk/Makefile index 37767310..54b08ba3 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -20,7 +20,7 @@ LDFLAGS = $(GCCOPT) -g INCLUDE = -I$(topdir)/com32/include NASM = nasm NASMOPT = -O9999 -NFLAGS = -dDATE='"$(DATE)"' -dWITH_EDD +NFLAGS = -dDATE='"$(DATE)"' NINCLUDE = SRCS = $(wildcard *.asm *.c *.h) @@ -38,11 +38,11 @@ endif # Important: init.o16 must be first!! OBJS16 = init.o16 init32.o OBJS32 = start32.o setup.o msetup.o e820func.o conio.o memcpy.o memset.o \ - unzip.o memdisk.o + unzip.o memdisk_chs.o memdisk_edd.o CSRC = setup.c msetup.c e820func.c conio.c unzip.c SSRC = start32.S memcpy.S memset.S -NASMSRC = memdisk.asm memdisk16.asm +NASMSRC = memdisk_chs.asm memdisk_edd.asm memdisk16.asm all: memdisk # e820test @@ -56,7 +56,7 @@ clean: tidy spotless: clean rm -f memdisk .depend -%.o: %.asm +memdisk16.o: memdisk16.asm $(NASM) $(NASMOPT) $(NFLAGS) $(NINCLUDE) -f elf -l $*.lst -o $@ $< %.o: %.s @@ -92,6 +92,9 @@ spotless: clean %.bin: %.asm $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< +memdisk_%.o: memdisk_%.bin + $(LD) -r -b binary -o $@ $< + memdisk16.elf: $(OBJS16) $(LD) -Ttext 0 -o $@ $^ @@ -107,9 +110,6 @@ memdisk: memdisk16.bin memdisk32.bin postprocess.pl e820test: e820test.c e820func.c msetup.c $(CC) -m32 -g -W -Wall -DTEST -o $@ $^ -memdisk.o: memdisk.bin - $(LD) -r -b binary -o $@ $< - .depend: rm -f .depend for csrc in *.c ; do $(CC) $(INCLUDE) $(CFLAGS) -MM $$csrc >> .depend ; done -- cgit v1.2.1