-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (46 loc) · 1.9 KB
/
Makefile
File metadata and controls
72 lines (46 loc) · 1.9 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Configuration area
# Full path to Python. For Windows this is typically
# C:\Python27\python.exe; if it is in your path you don't need to change it.
PYTHON=python3
# Full path to main.py in the optimizer. Depends on where it was unpacked.
OPTIMIZER=/opt/pyoptimizer/main.py
# Which preprocessor to use. Use 'gcpp' for GNU cpp (typical on Linux/OSX);
# use 'mcpp' for mcpp.
PREPROC_KIND=gcpp
# Full path to the preprocessor. Depends on where you have downloaded it.
# If the preprocessor is GNU cpp and it is in your path, leave it as cpp.
PREPROC_PATH=cpp
# Full path to the zip program (zip.exe for Windows). Depends on where you
# have downloaded it. If it is in your path you don't need to change it.
ZIP=zip
# Name of the zipped file to generate for SL
SLZIP=CorradeControlPanel.zip
# Name of the zipped file to generate for OpenSim
OSZIP=CorradeControlPanel-oss.zip
# End of configuration area
# Version being compiled (LSL string)
VERSION="1.0.0"
# Note some of these scripts don't strictly need to be optimized for memory.
OPTIMIZED=CorradeControlPanel.lslo
UNOPTIMIZED=
OPENSIM=
all: $(SLZIP)
clean:
$(PYTHON) build-aux.py rm $(SLZIP) $(OSZIP) $(OPTIMIZED) $(OPENSIM)
optimized: $(OPTIMIZED)
opensim: $(OPENSIM)
$(SLZIP): $(OPTIMIZED) $(UNOPTIMIZED)
$(PYTHON) build-aux.py rm $@
$(ZIP) $@ $(OPTIMIZED) $(UNOPTIMIZED)
%.lslo %.lslt: %.lsl
$(PYTHON) $(OPTIMIZER) -H -O addstrings,shrinknames,-extendedglobalexpr -p $(PREPROC_KIND) --precmd=$(PREPROC_PATH) $(OFLAGS) $< -o $@
$(OSZIP): $(OPENSIM)
$(PYTHON) build-aux.py rm $@
$(ZIP) $@ $(OPENSIM)
%.oss: %.lsl
$(PYTHON) build-aux.py oss-process $< > $@
# Bash only, probably GNU make only
setvars:
for name in $(addprefix ',$(addsuffix ',$(OPTIMIZED:.lslo=.lsl))) $(addprefix ',$(addsuffix ',$(UNOPTIMIZED))); do $(PYTHON) build-aux.py setvars "$$name" version='$(VERSION)' ; done
release: setvars all
.PHONY : all clean optimized opensim setvars release