summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2008-05-13 16:44:03 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 20:22:35 -0700
commitdc23a4f0cf1e7b186d453e27c79558f943f21a12 (patch)
treef7ccfa30f17022bf45d69577f5942976ccbd1480 /Makefile
parent4c7afd0214e3e5926551d35ab9b7e5eab00b9540 (diff)
downloadbootstub-dc23a4f0cf1e7b186d453e27c79558f943f21a12.tar.gz
* fix Makefile
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