warzone2100/data/mods/global/makefile.win32

50 lines
1.9 KiB
Plaintext
Raw Normal View History

include $(top_srcdir)/makerules/common.mk
AIVOLUTIONLIST=multiplay commands.txt
GRIMLIST=components structs texpages wrf COPYING
NEWST_TILESLIST=texpages COPYING readme.txt
NTWLIST=addon.lev audio components COPYING doc effects images messages multiplay stats structs texpages wrf
AIVOLUTIONARCHIVE=aivolution.wz
GRIMARCHIVE=grim.wz
NEWST_TILESARCHIVE=newst_tiles.wz
NTWARCHIVE=ntw.wz
CLEANFILES=$(AIVOLUTIONARCHIVE) $(GRIMARCHIVE) $(NEWST_TILESARCHIVE) $(NTWARCHIVE)
.PHONY: all clean $(AIVOLUTIONARCHIVE) $(GRIMARCHIVE) $(NEWST_TILESARCHIVE) $(NTWARCHIVE)
all:
ifdef INSTALLER
all: $(AIVOLUTIONARCHIVE) $(GRIMARCHIVE) $(NEWST_TILESARCHIVE) $(NTWARCHIVE)
endif
stamp:
touch stamp
$(AIVOLUTIONARCHIVE): $(basename $(AIVOLUTIONARCHIVE)) stamp $(patsubst %,$(basename $(AIVOLUTIONARCHIVE))/%,$(AIVOLUTIONLIST))
(cd $< && zip -ru0 $@ $(filter-out stamp,$(filter-out $<,$(^:$</%=%))) -x '*svn*' || [ $$? -eq 12 ] && true) # zip returns 12 on "nothing to do"
zip -T $@
$(RM_F) stamp
$(GRIMARCHIVE): $(basename $(GRIMARCHIVE)) stamp $(patsubst %,$(basename $(GRIMARCHIVE))/%,$(GRIMLIST))
(cd $< && zip -ru0 $@ $(filter-out stamp,$(filter-out $<,$(^:$</%=%))) -x '*svn*' || [ $$? -eq 12 ] && true) # zip returns 12 on "nothing to do"
zip -T $@
$(RM_F) stamp
$(NEWST_TILESARCHIVE): $(basename $(NEWST_TILESARCHIVE)) stamp $(patsubst %,$(basename $(NEWST_TILESARCHIVE))/%,$(NEWST_TILESLIST))
(cd $< && zip -ru0 $@ $(filter-out stamp,$(filter-out $<,$(^:$</%=%))) -x '*svn*' || [ $$? -eq 12 ] && true) # zip returns 12 on "nothing to do"
zip -T $@
$(RM_F) stamp
$(NTWARCHIVE): $(basename $(NTWARCHIVE)) stamp $(patsubst %,$(basename $(NTWARCHIVE))/%,$(NTWLIST))
(cd $< && zip -ru0 $@ $(filter-out stamp,$(filter-out $<,$(^:$</%=%))) -x '*svn*' || [ $$? -eq 12 ] && true) # zip returns 12 on "nothing to do"
zip -T $@
$(RM_F) stamp
clean:
$(RM_F) $(GRIMARCHIVE)
$(RM_F) $(AIVOLUTIONARCHIVE)
$(RM_F) $(NEWST_TILESARCHIVE)
$(RM_F) $(NTWARCHIVE)