-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 1.6 KB
/
Makefile
File metadata and controls
63 lines (49 loc) · 1.6 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
# Makefile for building SolarSailNavigator
KSPDIR := ${HOME}/.steam/steam/steamapps/common/Kerbal Space Program
MANAGED := ${KSPDIR}/KSP_Data/Managed/
PT := ${KSPDIR}/GameData/PersistentThrust/Plugins/
MM := ${KSPDIR}/GameData/
SSFILES := src/Default.cs \
src/Utils.cs \
src/Navigator.cs \
src/Controls.cs \
src/Preview.cs \
src/Frames.cs
MCS := mcs
TAR := tar
ZIP := zip
all: build
info:
@echo "== SolarSailNavigator Build Information =="
@echo " mcs: ${MCS}"
@echo " tar: ${TAR}"
@echo " zip: ${ZIP}"
@echo " KSP Data: ${KSPDIR}"
@echo " PT: ${PT}"
@echo "================================"
build: build/SolarSailNavigator.dll
build/%.dll: ${SSFILES}
mkdir -p build
${MCS} -t:library -lib:"${MANAGED}" -lib:"${PT}" -lib:"${MM}" \
-r:Assembly-CSharp,Assembly-CSharp-firstpass,UnityEngine,PersistentThrust,UnityEngine.UI \
-out:$@ \
${SSFILES}
package: build ${SSFILES}
mkdir -p package/SolarSailNavigator/Plugins
cp build/SolarSailNavigator.dll package/SolarSailNavigator/Plugins/
cp LICENSE.txt README.org TODO.org CHANGELOG.org ISSUES.org package/SolarSailNavigator/
cp -r Patches package/SolarSailNavigator/
%.tgz:
cd package; ${TAR} zcf ../$@ GameData
tgz: package SolarSailNavigator.tgz
%.zip:
cd package; ${ZIP} -9 -r ../$@ SolarSailNavigator
zip: package SolarSailNavigator.zip
clean:
@echo "Cleaning up build and package directories..."
rm -rf build/ package/
install: package
cp -r package/SolarSailNavigator "${KSPDIR}"/GameData/
uninstall: info
rm -rf "${KSPDIR}"/GameData/SolarSailNavigator/
.PHONY : all info build package tar.gz zip clean install uninstall