forked from phardy/KSPSerialIO
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
36 lines (28 loc) · 1.13 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
35
export PATH := /usr/local/bin:$(PATH)
XBUILD=xbuild
CONFIG=Release
KSPDIR=/Users/hugo/Local\ Files/KSP/MyMOD/
INSTALLDIR=$(KSPDIR)/GameData/KSPSerialIO
CONFIGDIR=$(INSTALLDIR)/PluginData/KSPSerialIO
PLUGINVERSION=$(shell egrep "^\[.*AssemblyVersion" KSPSerialIO/Properties/AssemblyInfo.cs|cut -d\" -f2)
PACKAGEDIR=package/KSPSerialIO
PACKAGECONFIGDIR=$(PACKAGEDIR)/PluginData/KSPSerialIO
all: KSPSerial.dll
KSPSerial.dll:
$(XBUILD) /p:Configuration=$(CONFIG)
install:
cp KSPSerialIO/bin/$(CONFIG)/KSPSerialIO.dll $(INSTALLDIR)
cp KSPSerialIO/bin/$(CONFIG)/PsimaxSerial.dll $(INSTALLDIR)
#cp ../PsiMaxSerial/PsiMaxSerial/Release/Mono.Posix.dll $(INSTALLDIR)
cp config.xml $(CONFIGDIR)
clean:
$(XBUILD) /p:Configuration=$(CONFIG) /t:Clean
package: all
mkdir -p $(PACKAGECONFIGDIR)
cp KSPSerialIO/bin/$(CONFIG)/KSPSerialIO.dll $(PACKAGEDIR)
cp KSPSerialIO/bin/$(CONFIG)/PsimaxSerial.dll $(PACKAGEDIR)
#cp ../PsimaxSerial/PsimaxSerial/bin/Release/Mono.Posix.dll $(PACKAGEDIR)
cp config.xml $(PACKAGECONFIGDIR)
cd package; zip -r -9 ../KSPSerialIO-cross-$(PLUGINVERSION).zip KSPSerialIO
rm -r package
echo $(PLUGINVERSION) > KSPSerialIO.version