]> git.ipfire.org Git - oddments/ipfire-netboot.git/blob - Makefile
Use our own versioning field to make upgrades easier
[oddments/ipfire-netboot.git] / Makefile
1
2 VERSION = 2.0
3
4 SCRIPTS = $(CURDIR)/ipfireboot.ipxe
5 MACHINE = $(shell uname -m)
6
7 TARGETS = bin/ipxe.iso bin/ipxe.kpxe bin/undionly.kpxe bin/ipxe.dsk \
8 bin/ipxe.usb bin/ipxe.lkrn
9
10 ifeq "$(MACHINE)" "x86_64"
11 TARGETS += bin-x86_64-efi/ipxe.efi
12 endif
13
14 .PHONY: all
15 all: $(TARGETS)
16
17 clean:
18 rm -rfv $(SCRIPTS) $(TARGETS)
19 make -C ipxe/src clean veryclean
20
21 %: %.in
22 sed -e "s/@VERSION@/$(VERSION)/g" \
23 < $< > $@
24
25 $(TARGETS): $(SCRIPTS) config/branding.h config/general.h
26 # Copy our configuration to the gPXE submodule
27 cp -vf config/* ipxe/src/config/local/
28
29 # Build the image
30 make -C ipxe/src EMBED=$(SCRIPTS) NO_WERROR=1 \
31 ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin $@
32
33 # Copy the image to bin/
34 -mkdir -pv $$(dirname $@)
35 cp -vf ipxe/src/$@ $@