forked from cjhannah/collab-vm-server-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
97 lines (66 loc) · 1.54 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
# 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
# Assume Linux or other *nix-likes
$(info Compiling targeting *nix)
MKCONFIG=mk/linux.mkc
BINDIR=bin/
ARCH=$(shell uname -m)
endif
# Set defaults for DEBUG and JPEG builds
ifeq ($(DEBUG),)
DEBUG = 0
endif
ifeq ($(JPEG),)
JPEG = 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
.PHONY: all clean help
all:
@$(MAKE) -f $(MKCONFIG) DEBUG=$(DEBUG) JPEG=$(JPEG)
@./scripts/build_site.sh $(ARCH)
-@ if [ -d "$(BINDIR)/http" ]; then rm -rf $(BINDIR)/http; fi;
-@mv -f http/ $(BINDIR)
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)"