summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..922e9e2
--- /dev/null
+++ b/makefile
@@ -0,0 +1,28 @@
+VERSION = $(shell cat version.txt)
+TARGET_APPLICATION = hello
+BUILD_DIR = $(TARGET_APPLICATION)-$(VERSION)
+TARGET_FILE_LIST = file-list.txt
+SUB_DIRS = src
+SCRIPT_DIR = scripts
+TARBALL = $(BUILD_DIR).tgz
+
+all: $(TARBALL)
+
+clean:
+ $(MAKE) -C src $@
+ rm -rf $(BUILD_DIR) $(TARBALL) $(TARBALL).checksum
+
+$(TARBALL): $(BUILD_DIR) $(TARGET_FILE_LIST) $(TARGET_APPLICATION)
+ $(SCRIPT_DIR)/copy.sh $(BUILD_DIR) $(TARGET_FILE_LIST)
+ tar cvfz $(TARBALL) $(BUILD_DIR)/*
+ sha256sum $(TARBALL) > $(TARBALL).checksum
+
+$(TARGET_APPLICATION): src
+ $(MAKE) -C $^ $@
+
+
+$(BUILD_DIR):
+ mkdir $@
+
+.PHONY: all
+