-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (22 loc) · 771 Bytes
/
Makefile
File metadata and controls
37 lines (22 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CORE_FILES:=modinfo.lua $(wildcard modmain.lua) $(wildcard modworldgenmain.lua)
LIB_FILES:=memspikefix.lua
UTILITY_FILES:=
MISC_FILES:=
ICON_STEM:=$(shell lua -e 'io.write(dofile("modinfo.lua") or "")')
ICON_FILES:=$(if $(ICON_STEM),$(foreach suf,.tex .xml,$(ICON_STEM)$(suf)),)
FILES:=$(CORE_FILES) $(LIB_FILES) $(UTILITY_FILES) $(MISC_FILES) $(ICON_FILES)
STAGE_DIR:=workshop
.PHONY: dist clean stage
ZIPNAME:=$(notdir $(CURDIR)).zip
dist: $(ZIPNAME)
stage: $(FILES) | $(STAGE_DIR)
for f in $^; do \
mkdir -p "`dirname "$(STAGE_DIR)/$$f"`"; \
cp -a "$$f" "$(STAGE_DIR)/$$f"; \
done
$(STAGE_DIR):
mkdir -p $@
clean:
rm -rf $(ZIPNAME) $(STAGE_DIR)
$(ZIPNAME): $(FILES)
( cd ..; zip -FS -8 "$(CURDIR)/$@" $(foreach f,$^,$(notdir $(CURDIR))/$(f)) )