Added dist target to makefile.
This commit is contained in:
parent
35bcc099c5
commit
5b15aad266
13
makefile
13
makefile
|
@ -34,6 +34,8 @@ OBJS += testMission.o textures.o text.o title.o transition.o triggers.o
|
||||||
OBJS += util.o
|
OBJS += util.o
|
||||||
OBJS += waypoints.o widgets.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.
|
# top-level rule to create the program.
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|
||||||
|
@ -45,6 +47,17 @@ all: $(PROG)
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(CC) -o $(PROG) $(OBJS) $(LIBS)
|
$(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".
|
# cleaning everything that can be automatically recreated with "make".
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJS) $(PROG)
|
$(RM) $(OBJS) $(PROG)
|
||||||
|
|
||||||
|
.PHONY: dist
|
||||||
|
|
Loading…
Reference in New Issue