add makefile
[debian6500.git] / Makefile
1 SHELL=/bin/bash
2
3 MASTERFILE = trc6500-master-file
4
5 VERSION = $(shell awk '/^$(MASTERFILE)/ {gsub(/[()]/, ""); print $$2; exit}' $(MASTERFILE)/debian/debian-changelog)
6
7 ISOVER = $(shell echo $(VERSION) | sed 's/-.*$$//')
8
9 ISO = simple-cdd/images/debian-7.8-amd64-CD-1.iso
10
11 TARGET_ISO = debian-trc6500-$(ISOVER).iso
12
13 TARGET_DEB = $(MASTERFILE)_$(VERSION)_all.deb
14
15 all: iso masterfile
16
17 iso: $(TARGET_ISO)
18
19 $(TARGET_ISO): $(ISO)
20 mv $< $@
21
22 $(ISO): $(TARGET_DEB)
23 cd simple-cdd && build-simple-cdd --dist wheezy --conf ./simple-cdd.conf
24
25 masterfile: $(TARGET_DEB)
26
27 $(TARGET_DEB):
28 make -C $(MASTERFILE)
29
30 clean:
31 rm -f $(TARGET_DEB) $(TARGET_ISO)