forked from bigmaliang/cmoon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Make.env
149 lines (112 loc) · 2.55 KB
/
Make.env
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
147
148
149
########################
# CONFIG
# **NO SPACE END LINE**
########################
RLS = 0
DYN = 0
PROFILE = 0
NPG = 0
NMYSQL = 1
NSQLITE = 1
# fcgi_stdio.h will suppress printf, fprintf(stderr,...
# so, don't include it on develop enviorment through FCGI MACRO
FCGI = 0
NCGI = 0
DEBUG_HDF = 0
DEBUG_MSG = 0
########################
# TOOLS
########################
CC = gcc
AR = ar
TAR = tar
MAKE = make
RANLIB = ranlib
ifeq ($(RLS), 1)
STRIP = strip
JSGLUE = $(BASEDIR)maketool/jsglue.sh -p $(BASEDIR)maketool/jsmin
CSSGLUE = cat
else
STRIP = touch
JSGLUE = cat
CSSGLUE = cat
endif
MULTIMAKE = $(BASEDIR)maketool/multimake.sh
BACKUPDIR = $(BASEDIR)maketool/backupdir.sh
PEREXEC = $(BASEDIR)/maketool/execute.sh
CPWITHDIR = $(BASEDIR)/maketool/cpwithdir.sh
########################
# DEPEND LIBRARY
########################
# mnl used other's function, so, mnl first
LIBBASE = $(BASEDIR)lib/
INC_MOON = -I$(LIBBASE)
INC_MOON += -I$(LIBBASE)mnl
LIB_MOON = -L$(LIBBASE)mnl -l mnl
INC_MOON += -I$(LIBBASE)mevent -I$(BASEDIR)event/plugin
LIB_MOON += -L$(LIBBASE)mevent -l mevent
INC_MOON += -I$(LIBBASE)eii
LIB_MOON += -L$(LIBBASE)eii -l eii
INC_MOON += -I ./ -I /usr/local/include/ClearSilver
LIB_MOON += -lneo_cgi -lneo_cs -lneo_utl -lstreamhtmlparser -lz
LIB_MOON += -ldl -lpthread
INC_MOON += `pkg-config --cflags libmemcached`
LIB_MOON += `pkg-config --libs libmemcached` -lm
INC_MOON += `pkg-config --cflags json`
LIB_MOON += `pkg-config --libs json`
LIB_MOON += -lgd
LIB_MOON += -lfcgi
LIB_MOON += -lmarkdown
ifneq ($(NPG), 1)
INC_MOON += -I/usr/include/postgresql
LIB_MOON += -lpq
endif
ifneq ($(NMYSQL), 1)
INC_MOON += -I/usr/include/mysql
LIB_MOON += -lmysqlclient
endif
ifneq ($(NSQLITE), 1)
INC_MOON += `pkg-config --cflags sqlite3`
LIB_MOON += `pkg-config --libs sqlite3`
endif
########################
# CFLAGS
########################
CFLAGS = -std=c99 -D_XOPEN_SOURCE=600 -fno-strict-aliasing -D_GNU_SOURCE
ifeq ($(RLS), 1)
#CFLAGS += -g -Wall -O2 -DRELEASE
CFLAGS += -g -Wall -DRELEASE
else
#CFLAGS += -g -Wall
CFLAGS += -g -Wall
endif
ifeq ($(PROFILE), 1)
CFLAGS += -pg -fprofile-arcs -ftest-coverage
endif
ifeq ($(DYN), 1)
CFLAGS += -fPIC -shared
endif
ifeq ($(FCGI), 1)
CFLAGS += -DUSE_FASTCGI
endif
ifeq ($(NPG), 1)
CFLAGS += -DDROP_PG
endif
ifeq ($(NMYSQL), 1)
CFLAGS += -DDROP_MYSQL
endif
ifeq ($(NSQLITE), 1)
CFLAGS += -DDROP_SQLITE
endif
########################
# RUNTIME CONFIG
########################
ifeq ($(DEBUG_HDF), 1)
CFLAGS += -DDEBUG_HDF
endif
ifeq ($(DEBUG_MSG), 1)
CFLAGS += -DDEBUG_MSG
endif
ifeq ($(NCGI), 1)
CFLAGS += -DNCGI_MODE
endif