-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcommon.mk
More file actions
41 lines (28 loc) · 888 Bytes
/
common.mk
File metadata and controls
41 lines (28 loc) · 888 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
38
39
40
41
.PHONY: data
SDP = sdp/sdp
SLC = slc/slc
SSC = ssc/ssc
DATAFILE = datafile.sdf
DATADIR = datadir
LANTXT = $(wildcard language/*.txt)
LANFILES = $(patsubst language/%.txt,$(DATADIR)/%.LAN, $(LANTXT))
SCRIPTSRC = $(wildcard $(DATADIR)/*.SRC)
SCRIPTRUN = $(SCRIPTSRC:.SRC=.RUN)
DATAEXT = DAT DDD JPG MUS OGG PCX SRC SRF TXT
DATADEP = $(foreach ext,$(DATAEXT),$(wildcard $(DATADIR)/*.$(ext))) $(LANFILES) $(SCRIPTRUN)
data: $(DATAFILE)
clean:
rm -rf $(TARGET) $(TARGET).exe $(DATAFILE) $(LANFILES) $(SCRIPTRUN) resource.res
# TBD: ssc should compile only things that changed since last build
$(DATAFILE): $(DATADEP) | $(SDP)
$(SDP) -p -n -i $(DATADIR) -o $(DATAFILE)
$(DATADIR)/%.LAN: language/%.txt | $(SLC)
$(SLC) --to-lan $< -o $@
$(SCRIPTRUN): $(SCRIPTSRC) | $(SSC)
$(SSC) -c -i $(DATADIR)
$(SDP): | sdp
make -C sdp
$(SLC): | slc
make -C slc
$(SSC): | ssc
make -C ssc