summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-07-27 12:16:14 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-07-27 12:16:14 -0700
commit069ba5471f082ad2ac515c9d102903a820db57a2 (patch)
tree358f5c1ffe5a29fa9c457083c52b699381b816bf
parentfb6550575caa07558827c1bb8735974b6b131b2a (diff)
downloadsamples-069ba5471f082ad2ac515c9d102903a820db57a2.tar.gz
samples-069ba5471f082ad2ac515c9d102903a820db57a2.tar.xz
samples-069ba5471f082ad2ac515c9d102903a820db57a2.zip
Makefile: don't delete files; no implict rules; fix .s -> .o rule
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c0107bf..dec2e65 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+# Drop implicit rules
+MAKEFLAGS += -r -R
+
CROSS ?= ../i386-linux/bin/
AS = $(CROSS)as
@@ -9,12 +12,15 @@ LDFLAGS = -m elf_i386 -q -z max-page-size=16
OBJS = testme.o
ALL = exe.elf com.elf
+# Don't erase intermediate files
+.SECONDARY:
+
all: $(ALL)
%.elf: %.ld $(OBJS)
$(LD) $(LDFLAGS) -Map=$*.map -T $*.ld -o $@ $(OBJS)
-%.s: %.o
+%.o: %.s
$(AS) $(ASFLAGS) -aghlms=$*.lst -o $@ $<
clean: