-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrules-Cygwin.make
More file actions
executable file
·104 lines (80 loc) · 1.68 KB
/
rules-Cygwin.make
File metadata and controls
executable file
·104 lines (80 loc) · 1.68 KB
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
IS_CYGWIN:=1
CC:=gcc
#-
# Test run may need the shared libraries produced by this build. so add them to shared library search path.
#-
ifeq "$(FULL_ROOT_DIR)" ""
PATH:=$(BIN_ROOT_DIR)/lib:$(BIN_ROOT_DIR)/test:$(TOPDIR):$(PATH)
endif
ARFLAGS:=rv
#-
# Always add debugging information.
#-
CFLAGS+=-g
CXXFLAGS+=-g
#-
# Make shared library name
#-
make_shared_lib_name=$(BIN_ROOT_DIR)/$(2)/lib$(1).dll
#-
# Add options for shared libraries
# with CYGWIN: don't add -fPIC to compiler options for shared library.
#-
add-solib-compiler-flags=
add-solib-compiler-flags-cpp=
#-
# Install a file
#-
install-a-file=$(shell install -m 0755 -t $(2) $(1))
#-
# Install a directory
#-
define install-mkdir
$$(if $$(subst $(1),,$$(wildcard $(1))),,$$(shell install -d $(1) -m 775))
endef
# flag for producing preprocessor output
PREPROCESSOR_FLAG=-E
# flag for producing assembly listing
ASM_LISTING_FLAG=-S
#-
# Add optimization
#-
ifeq "$(strip $(MODE))" "release"
CFLAGS+=-O3
CXXFLAGS+=-O3
endif
ifeq "$(strip $(MODE))" "release2"
CFLAGS+=-O2
CXXFLAGS+=-O2
endif
ifeq "$(strip $(MODE))" "releaseBuild"
CFLAGS+=-O3 -Wall
CXXFLAGS+=-O3 -Wall
NOSTRICT:=1
endif
#-
# Compile with draconic error level by default. Skipped if OPT_NOSTRICT environment is set.
#-
ifndef NOSTRICT
CFLAGS+=-Wall -Werror -Wextra
CXXFLAGS+=-Wall -Werror -Wextra
endif
#-
# Add architecture specific options
#-
#-
# Add architecture specific options
#-
ifeq "$(ARCH)" "i686"
CFLAGS+=-m32
CXXFLAGS+=-m32
LDFLAGS+=-m32
else
ifeq "$(ARCH)" "x86_64"
CFLAGS+=-m64
CXXFLAGS+=-m64
LDFLAGS+=-m64
else
$(warning architecture $(ARCH) is not explicitly supported on $(OS_TYPE) )
endif
endif