summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-27 21:42:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-27 21:42:45 -0700
commite6d94cc986897ac80a13a5eedd8ab38d581b0453 (patch)
treee6a9bab1f51a0eb4274e9dc77465f9cf3941e160 /modules
parent593236b4086e21f9552bb0281f6093b7cce875e9 (diff)
downloadsyslinux-e6d94cc986897ac80a13a5eedd8ab38d581b0453.tar.gz
Unify dependency generation: MCONFIG.embedded
Unify dependency generation and move common rules into MCONFIG.embedded. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/Makefile b/modules/Makefile
index a3af7b70..3f82eeeb 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -24,12 +24,6 @@ BINS = pxechain.com gfxboot.com
all: $(BINS)
.PRECIOUS: %.o
-%.o: %.S
- $(CC) $(SFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.o
-%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
.PRECIOUS: %.elf
%.elf: c32entry.o %.o $(LIB)
@@ -39,6 +33,7 @@ all: $(BINS)
$(OBJCOPY) -O binary $< $@
%.com: %.asm
+ ( $(NASM) -DDEPEND -o $@ $< ; echo '' ) >> .$@.d ; true
$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
$(LIB): $(LIBOBJS)
@@ -55,9 +50,11 @@ $(LIB): $(LIBOBJS)
$(PNGTOPNM) $< | gzip -9 > $@
tidy dist:
- rm -f *.o *.a *.lst *.elf
+ rm -f *.o *.a *.lst *.elf .*.d
clean: tidy
spotless: clean
rm -f $(BINS)
+
+-include .*.d