summaryrefslogtreecommitdiff
path: root/sample
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 /sample
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 'sample')
-rw-r--r--sample/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/sample/Makefile b/sample/Makefile
index e4c4a6d6..e6bf5def 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -33,12 +33,6 @@ all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \
fd.c32 $(LIB)
.PRECIOUS: %.o
-%.o: %.S
- $(CC) $(SFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.o
-%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
.PRECIOUS: %.elf
%.elf: c32entry.o %.o $(LIB)
@@ -48,6 +42,7 @@ all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \
$(OBJCOPY) -O binary $< $@
%.com: %.asm
+ ( $(NASM) -DDEPEND -o $@ $< ; echo '' ) >> .$@.d ; true
$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
$(LIB): $(LIBOBJS)
@@ -64,10 +59,12 @@ $(LIB): $(LIBOBJS)
$(PNGTOPNM) $< | gzip -9 > $@
tidy dist:
- rm -f *.o *.a *.lst *.elf
+ rm -f *.o *.a *.lst *.elf .*.d
# Don't specify *.com since mdiskchk.com can't be built using Linux tools
clean: tidy
rm -f *.lss *.o *.c32 comecho.com
spotless: clean
+
+-include .*.d