From 5b15aad2662f6a2f1ce60638e723bc4d22271f18 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 1 Nov 2015 13:51:28 +0000 Subject: [PATCH] Added dist target to makefile. --- makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/makefile b/makefile index 8242fc9..57d167f 100644 --- a/makefile +++ b/makefile @@ -34,6 +34,8 @@ OBJS += testMission.o textures.o text.o title.o transition.o triggers.o OBJS += util.o OBJS += waypoints.o widgets.o +DIST_FILES = data gfx manual music sound src LICENSE makefile README.md + # top-level rule to create the program. all: $(PROG) @@ -44,7 +46,18 @@ all: $(PROG) # linking the program. $(PROG): $(OBJS) $(CC) -o $(PROG) $(OBJS) $(LIBS) + +# prepare an archive for the program +dist: + $(RM) -rf $(PROG)-$(VERSION) + mkdir $(PROG)-$(VERSION) + cp -r $(DIST_FILES) $(PROG)-$(VERSION) + git log --oneline master..v$(VERSION) >$(PROG)-$(VERSION)/CHANGELOG + tar czf $(PROG)-$(VERSION).tar.gz $(PROG)-$(VERSION) + $(RM) -rf $(PROG)-$(VERSION) # cleaning everything that can be automatically recreated with "make". clean: $(RM) $(OBJS) $(PROG) + +.PHONY: dist