This repository has been archived by the owner on Jun 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (61 loc) · 1.8 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
CP ?= cp
CHMOD ?= chmod
INSTALL ?= install
MKDIR ?= mkdir
MODE ?= Debug
PREFIX ?= /usr/local
SED ?= sed
XBUILD ?= xbuild
XBUILD_FLAGS += /nologo /property:Configuration=$(MODE) /verbosity:quiet
ifeq ($(MODE), Debug)
override mono_opt = --debug
else
override mono_opt =
endif
.PHONY: all clean check install uninstall
all:
$(XBUILD) $(XBUILD_FLAGS)
$(MKDIR) -p bin
$(MKDIR) -p lib/satori
$(CP) Lycus.Satori/bin/$(MODE)/Lycus.Satori.dll lib/satori
ifeq ($(MODE), Debug)
$(CP) Lycus.Satori/bin/$(MODE)/Lycus.Satori.dll.mdb lib/satori
endif
$(CP) Lycus.Satori.EExec/bin/$(MODE)/e-exec.exe lib/satori
ifeq ($(MODE), Debug)
$(CP) Lycus.Satori.EExec/bin/$(MODE)/e-exec.exe.mdb lib/satori
endif
$(CP) Lycus.Satori.EExec/bin/$(MODE)/e-exec.exe.config lib/satori
$(SED) s/__MONO_OPTIONS__/$(mono_opt)/ e-exec.in > bin/e-exec
$(CHMOD) +x bin/e-exec
clean:
$(XBUILD) $(XBUILD_FLAGS) /target:Clean
$(RM) -r bin
$(RM) -r lib
check: all
install:
$(INSTALL) -m755 -d $(PREFIX)
$(INSTALL) -m755 -d $(PREFIX)/bin
$(INSTALL) -m755 -d $(PREFIX)/lib
$(INSTALL) -m755 -d $(PREFIX)/lib/satori
$(INSTALL) -m755 lib/satori/Lycus.Satori.dll $(PREFIX)/lib/satori
ifeq ($(MODE), Debug)
$(INSTALL) -m755 lib/satori/Lycus.Satori.dll.mdb $(PREFIX)/lib/satori
endif
$(INSTALL) -m755 lib/satori/e-exec.exe $(PREFIX)/lib/satori
ifeq ($(MODE), Debug)
$(INSTALL) -m755 lib/satori/e-exec.exe.mdb $(PREFIX)/lib/satori
endif
$(INSTALL) -m755 lib/satori/e-exec.exe.config $(PREFIX)/lib/satori
$(INSTALL) -m755 bin/e-exec $(PREFIX)/bin
uninstall:
$(RM) $(PREFIX)/lib/satori/Lycus.Satori.dll
ifeq ($(MODE), Debug)
$(RM) $(PREFIX)/lib/satori/Lycus.Satori.dll.mdb
endif
$(RM) $(PREFIX)/lib/satori/e-exec.exe
ifeq ($(MODE), Debug)
$(RM) $(PREFIX)/lib/satori/e-exec.exe.mdb
endif
$(RM) $(PREFIX)/lib/satori/e-exec.config
$(RM) $(PREFIX)/bin/e-exec