-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_cxx
83 lines (62 loc) · 1.36 KB
/
Makefile_cxx
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
CPLUSPLUS = cxx
CC = cc
# Location of Xerces XML parser library:
XERCES_INC = -Ixerces_include -I/util/include
XERCES_LIB = xerces-cxx1_5_1
# Additional defines:
SYS_DEFS += \
-D__USE_STD_IOSTREAM
# From user-defined options in Makefile:
ifeq ($(QUIET),yes)
SYS_WARN += -w2
else
SYS_WARN += -w0
endif
ifeq ($(DEBUG),yes)
# Force -O optimization and debugging:
OPTIM = -O -g3
endif
ifeq ($(FAST),yes)
# Force minor optimizations:
OPTIM = -O
endif
ifeq ($(OPTIM),none)
SYS_OPT =
else
ifeq ($(OPTIM),)
SYS_OPT += -fast -O4
else
SYS_OPT += $(OPTIM)
endif
endif
ifeq ($(PROFILE),yes)
SYS_OPT += -pg
endif
ifeq ($(FORCE_DEBUG),yes)
SYS_DEFS += -DFORCE_DEBUG
endif
ifeq ($(ASSERT),FAST)
SYS_DEFS += -DFAST_ASSERT
endif
ifeq ($(OPEN_MP),yes)
OMP_FLAGS += -omp -check_omp
OMP_LINK += $(OMP_FLAGS)
else
# CXX defines this even when -omp isn't set:
OMP_DEFS = -U_OPENMP
endif
ifeq ($(PTHREADS),yes)
PTHREAD_FLAGS += -pthread
PTHREAD_LIBS += -lpthread
endif
# CXX-specific options:
# Require manual template instantiations:
SYS_LANG += -no_implicit_include
SYS_INCS +=
# Require manual template instantiations:
SYS_LINK += $(SYS_OPT) -no_implicit_include
SYS_LIBS +=
# CXX requires our procbuf:
PROCBUF_OBJ = procbuf_local.o
# For executables which require less agressive optimizations:
CPPC_SAFE = $(CPP_OPTIONS) -noansi_alias -c