summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 643ac51..572cffa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
+OBJ=bootstub.o head.o
+
all: bootstub.bin
bootstub.bin:bootstub.elf
- objcopy -O binary -R .note -R .comment -S bootstub.elf bootstub.bin
+ objcopy -O binary -R .note -R .comment -S $< $@
-bootstub.elf:bootstub.o head.o bootstub.lds
- ld -m elf_i386 -T bootstub.lds head.o bootstub.o -o bootstub.elf
+bootstub.elf:bootstub.lds $(OBJ)
+ ld -m elf_i386 -T bootstub.lds $(OBJ) -o $@
bootstub.o:bootstub.c
gcc -c bootstub.c
@@ -14,3 +16,5 @@ head.o:head.S
clean:
rm -rf *.o *.bin *.elf
+
+.PHONY: all clean