add makefile
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 15 Sep 2015 08:18:55 +0000 (10:18 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 15 Sep 2015 08:18:55 +0000 (10:18 +0200)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..2c2a28a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+SHELL=/bin/bash
+
+MASTERFILE = trc6500-master-file
+
+VERSION = $(shell awk '/^$(MASTERFILE)/ {gsub(/[()]/, ""); print $$2; exit}' $(MASTERFILE)/debian/debian-changelog)
+
+ISOVER = $(shell echo $(VERSION) | sed 's/-.*$$//')
+
+ISO = simple-cdd/images/debian-7.8-amd64-CD-1.iso
+
+TARGET_ISO = debian-trc6500-$(ISOVER).iso
+
+TARGET_DEB = $(MASTERFILE)_$(VERSION)_all.deb
+
+all: iso masterfile
+
+iso: $(TARGET_ISO) 
+
+$(TARGET_ISO): $(ISO)
+       mv $< $@
+
+$(ISO): $(TARGET_DEB)
+       cd simple-cdd && build-simple-cdd --dist wheezy --conf ./simple-cdd.conf
+
+masterfile: $(TARGET_DEB)
+
+$(TARGET_DEB):
+       make -C $(MASTERFILE)
+
+clean:
+       rm -f $(TARGET_DEB) $(TARGET_ISO)