]> git.ipfire.org Git - oddments/ipfire-netboot.git/blobdiff - Makefile
Use our own versioning field to make upgrades easier
[oddments/ipfire-netboot.git] / Makefile
index 3d75cdd6498edbc153cf1a149aae9000363a5c49..cfc3d1849fbf1e04bd00842cfbde23d1e32e487c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,28 @@
 
+VERSION = 2.0
+
 SCRIPTS = $(CURDIR)/ipfireboot.ipxe
+MACHINE = $(shell uname -m)
 
 TARGETS = bin/ipxe.iso bin/ipxe.kpxe bin/undionly.kpxe bin/ipxe.dsk \
        bin/ipxe.usb bin/ipxe.lkrn
 
+ifeq "$(MACHINE)" "x86_64"
+       TARGETS += bin-x86_64-efi/ipxe.efi
+endif
+
+.PHONY: all
 all: $(TARGETS)
 
 clean:
-       rm -rfv $(TARGETS)
+       rm -rfv $(SCRIPTS) $(TARGETS)
        make -C ipxe/src clean veryclean
 
-$(TARGETS):
+%: %.in
+       sed -e "s/@VERSION@/$(VERSION)/g" \
+               < $< > $@
+
+$(TARGETS): $(SCRIPTS) config/branding.h config/general.h
        # Copy our configuration to the gPXE submodule
        cp -vf config/* ipxe/src/config/local/