-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 1.07 KB
/
Makefile
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
export PATH := /usr/local/bin:$(PATH)
XBUILD=msbuild
CONFIG=Release
KSPDIR=/Users/gwdp/Library/Application\ Support/Steam/steamapps/common/Kerbal\ Space\ Program
INSTALLDIR=$(KSPDIR)/GameData/KSPC-Driver
CONFIGDIR=$(INSTALLDIR)/PluginData/KSPC-Driver
PLUGINVERSION=$(shell egrep "^\[.*AssemblyVersion" KSPC-Driver/Properties/AssemblyInfo.cs|cut -d\" -f2)
PACKAGEDIR=package/KSPC-Driver
PACKAGECONFIGDIR=$(PACKAGEDIR)/PluginData/KSPC-Driver
all: dll
dll:
$(XBUILD) /p:Configuration=$(CONFIG)
install:
[ -d $(CONFIGDIR) ] || mkdir -p $(CONFIGDIR)
cp KSPC-Driver/bin/$(CONFIG)/KSPC-Driver.dll $(INSTALLDIR)
cp KSPC-Driver/bin/$(CONFIG)/PsimaxSerial.dll $(INSTALLDIR)
cp config.xml $(CONFIGDIR)
clean:
$(XBUILD) /p:Configuration=$(CONFIG) /t:Clean
package: all
mkdir -p $(PACKAGECONFIGDIR)
cp KSPC-Driver/bin/$(CONFIG)/KSPC-Driver.dll $(PACKAGEDIR)
cp KSPC-Driver/bin/$(CONFIG)/PsimaxSerial.dll $(PACKAGEDIR)
cp config.xml $(PACKAGECONFIGDIR)
cd package; zip -r -9 ../KSPC-Driver-cross-$(PLUGINVERSION).zip KSPC-Driver
rm -r package
echo $(PLUGINVERSION) > KSPC-Driver.version