-
Notifications
You must be signed in to change notification settings - Fork 107
/
Makefile
47 lines (36 loc) · 1.11 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
36
37
38
39
40
41
42
43
44
45
46
47
SOLUTION_FILE=src/1Script_Mono.sln
PLATFORM="Any CPU"
CONFIGURATION=Release
SOURCEBINDIR=src/oscript/bin/${CONFIGURATION}
BIN_OUTPUTDIR=dist/bin
LIB_OUTPUTDIR=dist/lib
OSCRIPTEXE=${BIN_OUTPUTDIR}/oscript.exe
OPMOS=${LIB_OUTPUTDIR}/opm/opm.os
OPM="${OSCRIPTEXE} ${OPMOS}"
PREFIX=/usr
all: dist
dist: ${OSCRIPTEXE}
NUGET:
nuget restore ${SOLUTION_FILE}
${OSCRIPTEXE}: NUGET
msbuild /p:Platform=${PLATFORM} /p:Configuration=${CONFIGURATION} ${SOLUTION_FILE}
test -d ${BIN_OUTPUTDIR} || mkdir -p ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.dll ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.exe ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.cfg ${BIN_OUTPUTDIR}
clean:
rm -rf ${BIN_OUTPUTDIR}
rm -rf ${LIB_OUTPUTDIR}
${OPMOS}:
install: install_bin
install_bin:
mkdir -p ${PREFIX}/share/oscript/bin
cp ${BIN_OUTPUTDIR}/* ${PREFIX}/share/oscript/bin
cp install/builders/deb/oscript ${PREFIX}/bin/oscript
cp install/builders/deb/oscript-cgi ${PREFIX}/bin/oscript-cgi
uninstall: uninstall_bin
uninstall_bin:
rm -rf ${PREFIX}/share/oscript/bin
rm ${PREFIX}/bin/oscript
rm ${PREFIX}/bin/oscript-cgi
.PHONY: all install uninstall dist clean