forked from yellows111/collab-vm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
146 lines (102 loc) · 2.49 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Master makefile of CollabVM Server
ifeq ($(OS), Windows_NT)
# Allow selection of w64 or w32 target
# Is it Cygwin?
ifeq ($(shell uname -s|cut -d _ -f 1), CYGWIN)
$(info Compiling targeting Cygwin)
MKCONFIG=mk/cygwin.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
CYGWIN=1
else
CYGWIN=0
ifneq ($(WARCH), win32)
$(info Compiling targeting Win64)
MKCONFIG=mk/win64.mkc
ARCH=amd64
BINDIR=bin/win64/
else
$(info Compiling targeting x86 Windows)
MKCONFIG=mk/win32.mkc
BINDIR=bin/win32/
ARCH=x86
endif
endif
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
$(info Compiling targeting Darwin)
MKCONFIG=mk/bsd.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
else ifeq ($(UNAME_S),FreeBSD)
$(info Compiling targeting FreeBSD)
MKCONFIG=mk/bsd.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
else ifeq ($(UNAME_S),DragonFly)
$(info Compiling targeting DragonFlyBSD)
MKCONFIG=mk/bsd.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
else
# Assume Linux or other *nix-likes
$(info Compiling targeting *nix)
MKCONFIG=mk/linux.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
endif
endif
# Set defaults for DEBUG and JPEG builds
ifeq ($(DEBUG),)
DEBUG = 0
endif
ifeq ($(JPEG),)
JPEG = 0
endif
ifeq ($(EXECINFO),)
EXECINFO = 0
endif
ifeq ($(UPNP),)
EXECINFO = 0
endif
ifeq ($(DEBUG),1)
$(info Building in debug mode)
else
$(info Building in release mode)
endif
ifeq ($(JPEG),1)
$(info Building JPEG support)
endif
ifeq ($(EXECINFO),1)
$(info Using libexecinfo for backtrace symbols)
endif
ifeq ($(UPNP),1)
$(info Building Universal Plug-and-Play support)
endif
.PHONY: all clean help
all:
@$(MAKE) -f $(MKCONFIG) DEBUG=$(DEBUG) JPEG=$(JPEG) EXECINFO=$(EXECINFO)
@./scripts/build_site.sh $(ARCH)
-@ if [ -d "$(BINDIR)http" ]; then rm -rf $(BINDIR)http; fi;
-@mv -f http/ $(BINDIR)
@echo "Writing manpage for collab-vm-server..."
@gzip doc/collab-vm-server.1 -kf
@mv doc/collab-vm-server.1.gz $(BINDIR)
@echo "Done."
ifeq ($(OS), Windows_NT)
ifeq ($(CYGWIN), 1)
@./scripts/copy_dlls_cyg.sh $(ARCH) $(BINDIR)
else
@./scripts/copy_dlls_mw.sh $(ARCH) $(BINDIR)
endif
endif
clean:
@$(MAKE) -f $(MKCONFIG) clean
help:
@echo -e "CollabVM Server 1.2.11 Makefile help:\n"
@echo "make - Build release"
@echo "make DEBUG=1 - Build a debug build (Adds extra trace information and debug symbols)"
@echo "make JPEG=1 - Build with JPEG support (Useful for slower internet connections)"
@echo "make EXECINFO=1 - Use libexecinfo for backtrace symbols (Required on some *nix)"
@echo "make UPNP=1 - Build with UPnP support (Useful for some internet connections)"