-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
49 lines (39 loc) · 2.48 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
48
49
MCS=mcs
EXENAME=ServUO
CURPATH=`pwd`
CFGPATH=${CURPATH}/Settings
SCRPATH=${CURPATH}/Scripts
SRVPATH=${CURPATH}/Server
APPPATH=${CURPATH}/Application
ICOPATH=${CURPATH}/Application
REFS=System.Drawing.dll,System.Web.dll,System.Data.dll,System.IO.Compression.FileSystem.dll
DEFS=-d:MONO -d:ServUO -d:ServUO58 -d:NEWTIMERS -d:NEWPARENT
NOWARNS=0618,0219,0414,1635
PHONY : default build clean run
default: run
debug:
${MCS} -target:library -out:"${CURPATH}/Settings.dll" -r:${REFS} -nowarn:${NOWARNS} -d:DEBUG ${DEFS} -nologo -debug -unsafe -recurse:"${CFGPATH}/*.cs"
${MCS} -target:library -out:"${CURPATH}/Server.dll" -r:"${CURPATH}/Settings.dll",${REFS} -nowarn:${NOWARNS} -d:DEBUG ${DEFS} -nologo -debug -unsafe -recurse:"${SRVPATH}/*.cs"
${MCS} -target:library -out:"${CURPATH}/Scripts.dll" -r:"${CURPATH}/Settings.dll","${CURPATH}/Server.dll",${REFS} -nowarn:${NOWARNS} -d:DEBUG ${DEFS} -nologo -debug -unsafe -recurse:"${SCRPATH}/*.cs"
${MCS} -target:exe -out:"${CURPATH}/${EXENAME}.exe" -win32icon:"${ICOPATH}/servuo.ico" -r:"${CURPATH}/Settings.dll","${CURPATH}/Server.dll","${CURPATH}/Scripts.dll",${REFS} -nowarn:${NOWARNS} -d:DEBUG ${DEFS} -nologo -debug -unsafe -recurse:"${APPPATH}/*.cs"
"${CURPATH}/${EXENAME}.sh"
run: build
"${CURPATH}/${EXENAME}.sh"
build: ${EXENAME}.sh
clean:
rm -f ${EXENAME}.sh
rm -f ${EXENAME}.exe
rm -f ${EXENAME}.exe.mdb
rm -f *.bin
Settings.dll: ${CFGPATH}/*.cs
${MCS} -target:library -out:"${CURPATH}/Settings.dll" -r:${REFS} -nowarn:${NOWARNS} ${DEFS} -nologo -optimize -unsafe -recurse:"${CFGPATH}/*.cs"
Server.dll: Settings.dll ${SRVPATH}/*.cs
${MCS} -target:library -out:"${CURPATH}/Server.dll" -r:"${CURPATH}/Settings.dll",${REFS} -nowarn:${NOWARNS} ${DEFS} -nologo -optimize -unsafe -recurse:"${SRVPATH}/*.cs"
Scripts.dll: Settings.dll Server.dll ${SCRPATH}/*.cs
${MCS} -target:library -out:"${CURPATH}/Scripts.dll" -r:"${CURPATH}/Settings.dll","${CURPATH}/Server.dll",${REFS} -nowarn:${NOWARNS} ${DEFS} -nologo -optimize -unsafe -recurse:"${SCRPATH}/*.cs"
${EXENAME}.exe: Settings.dll Server.dll Scripts.dll ${APPPATH}/*.cs
${MCS} -target:exe -out:"${CURPATH}/${EXENAME}.exe" -win32icon:"${ICOPATH}/servuo.ico" -r:"${CURPATH}/Settings.dll","${CURPATH}/Server.dll","${CURPATH}/Scripts.dll",${REFS} -nowarn:${NOWARNS} ${DEFS} -nologo -optimize -unsafe -recurse:"${APPPATH}/*.cs"
${EXENAME}.sh: ${EXENAME}.exe
echo "#!/bin/sh" > "${CURPATH}/${EXENAME}.sh"
echo "mono \"${CURPATH}/${EXENAME}.exe\"" >> "${CURPATH}/${EXENAME}.sh"
chmod a+x "${CURPATH}/${EXENAME}.sh"