forked from ServUO/ServUO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 2.06 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
MCS=mcs
EXENAME=ServUO
CURPATH=`pwd`
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
NOWARNS=0618,0219,0414,1635
PHONY : default build clean run
default: run
debug:
${MCS} -target:library -out:"${CURPATH}/Server.dll" -r:${REFS} -nowarn:${NOWARNS} -d:DEBUG -d:MONO -d:ServUO -d:NEWTIMERS -nologo -debug -unsafe -recurse:"${SRVPATH}/*.cs"
${MCS} -target:library -out:"${CURPATH}/Scripts.dll" -r:$"{CURPATH}/Server.dll",${REFS} -nowarn:${NOWARNS} -d:MONO -d:DEBUG -d:ServUO -d:NEWTIMERS -nologo -debug -unsafe -recurse:"${SCRPATH}/*.cs"
${MCS} -win32icon:"${ICOPATH}/servuo.ico" -r:"${CURPATH}/Server.dll","${CURPATH}/Scripts.dll",${REFS} -nowarn:${NOWARNS} -target:exe -out:"${CURPATH}/${EXENAME}.exe" -d:DEBUG -d:MONO -d:ServUO -d:NEWTIMERS -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 Ultima.dll
rm -f Ultima.dll.mdb
rm -f Scripts.dll
rm -f *.bin
Server.dll: Server/*.cs
${MCS} -target:library -out:"${CURPATH}/Server.dll" -r:${REFS} -nowarn:${NOWARNS} -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:"${SRVPATH}/*.cs"
Scripts.dll: Server.dll Scripts/
${MCS} -target:library -out:"${CURPATH}/Scripts.dll" -r:"${CURPATH}/Server.dll",${REFS} -nowarn:${NOWARNS} -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:"${SCRPATH}/*.cs"
${EXENAME}.exe: Server.dll Scripts.dll Application/*.cs
${MCS} -win32icon:"${ICOPATH}/servuo.ico" -r:"${CURPATH}/Server.dll","${CURPATH}/Scripts.dll",${REFS} -nowarn:${NOWARNS} -target:exe -out:"${CURPATH}/${EXENAME}.exe" -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:"./Application/*.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"