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