2013-08-18 17:42:25 +08:00
|
|
|
SHELL = /bin/sh
|
2015-01-04 22:51:01 +08:00
|
|
|
#CC = g++
|
2016-01-17 13:35:12 +08:00
|
|
|
CC = ${ENV_CPP}
|
|
|
|
AR = ${ENV_AR}
|
2013-08-18 17:42:25 +08:00
|
|
|
ARFL = rv
|
|
|
|
#ARFL = cru
|
2016-01-17 13:35:12 +08:00
|
|
|
RANLIB = ${ENV_RANLIB}
|
2013-08-18 17:42:25 +08:00
|
|
|
|
2015-11-13 16:26:30 +08:00
|
|
|
FLAGS = ${ENV_FLAGS}
|
|
|
|
|
2015-01-06 23:24:02 +08:00
|
|
|
CFLAGS = -c -g -W \
|
|
|
|
-O3 \
|
|
|
|
-Wall \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wshadow \
|
|
|
|
-D_REENTRANT \
|
|
|
|
-D_POSIX_PTHREAD_SEMANTICS \
|
2013-08-18 17:42:25 +08:00
|
|
|
-Wno-long-long \
|
2015-07-02 10:35:12 +08:00
|
|
|
-Wformat \
|
2016-02-25 19:57:02 +08:00
|
|
|
-DHAS_MYSQL_DLL \
|
2016-12-03 20:09:21 +08:00
|
|
|
-DHAS_SQLITE_DLL \
|
2016-02-25 19:57:02 +08:00
|
|
|
-Winvalid-pch \
|
|
|
|
-DACL_PREPARE_COMPILE
|
2015-11-16 20:00:44 +08:00
|
|
|
#-DHAS_POLARSSL
|
2013-08-18 17:42:25 +08:00
|
|
|
#-DUSE_DYNAMIC
|
2015-01-04 22:51:01 +08:00
|
|
|
# -Wcast-align
|
2015-01-05 17:25:09 +08:00
|
|
|
#-Wcast-qual
|
2014-08-01 00:51:32 +08:00
|
|
|
#just for freebsd's iconv.h
|
|
|
|
CFLAGS += -I/usr/local/include
|
|
|
|
|
2015-11-09 22:11:21 +08:00
|
|
|
shared_ldflags = -l_protocol -l_acl -lz -lpthread
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
###########################################################
|
|
|
|
#Check system:
|
|
|
|
# Linux, SunOS, Solaris, BSD variants, AIX, HP-UX
|
|
|
|
SYSLIB =
|
|
|
|
CHECKSYSRES = @echo "Unknow system type!";exit 1
|
|
|
|
UNIXNAME = $(shell uname -sm)
|
2013-12-07 20:31:59 +08:00
|
|
|
UNIXTYPE = LINUX
|
2016-08-14 20:48:30 +08:00
|
|
|
polarssl =
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
ifeq ($(CC),)
|
|
|
|
CC = g++
|
|
|
|
endif
|
|
|
|
|
2016-01-17 13:35:12 +08:00
|
|
|
ifeq ($(AR),)
|
|
|
|
AR = ar
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(RANLIB),)
|
|
|
|
RANLIB = ranlib
|
|
|
|
endif
|
|
|
|
|
2015-11-13 16:26:30 +08:00
|
|
|
ifeq ($(findstring HAS_POLARSSL, $(FLAGS)), HAS_POLARSSL)
|
|
|
|
CFLAGS += -DHAS_POLARSSL
|
2016-08-14 20:48:30 +08:00
|
|
|
polarssl = on
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(findstring on, $(polarssl)), on)
|
|
|
|
CFLAGS += -DHAS_POLARSSL
|
2015-11-13 16:26:30 +08:00
|
|
|
endif
|
|
|
|
|
2015-02-10 17:23:24 +08:00
|
|
|
ifeq ($(findstring clang++, $(CC)), clang++)
|
|
|
|
CFLAGS += -Wno-invalid-source-encoding \
|
|
|
|
-Wno-extended-offsetof
|
|
|
|
endif
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
# For FreeBSD
|
|
|
|
ifeq ($(findstring FreeBSD, $(UNIXNAME)), FreeBSD)
|
2015-05-21 21:49:35 +08:00
|
|
|
CFLAGS += -DFREEBSD -fPIC -Werror
|
2013-12-07 20:31:59 +08:00
|
|
|
UNIXTYPE = FREEBSD
|
2015-11-09 22:11:21 +08:00
|
|
|
shared_ldflags = -l_protocol -l_acl -L/usr/local/lib -liconv -lz -lpthread
|
2013-08-18 17:42:25 +08:00
|
|
|
endif
|
|
|
|
|
2015-01-05 17:25:09 +08:00
|
|
|
# For Darwin
|
|
|
|
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
|
2015-02-10 17:23:24 +08:00
|
|
|
CFLAGS += -DMACOSX -Wno-invalid-source-encoding \
|
2015-06-14 02:47:59 +08:00
|
|
|
-Wno-extended-offsetof -fPIC -Werror \
|
|
|
|
-Wno-unused-private-field
|
2015-01-05 17:25:09 +08:00
|
|
|
UNIXTYPE = MACOSX
|
2015-11-09 22:11:21 +08:00
|
|
|
shared_ldflags = -l_protocol -l_acl -L/usr/lib -liconv -lz -lpthread
|
2015-01-05 17:25:09 +08:00
|
|
|
endif
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
# For Linux
|
|
|
|
ifeq ($(findstring Linux, $(UNIXNAME)), Linux)
|
2017-02-12 21:39:38 +08:00
|
|
|
# CFLAGS += -DLINUX2 -fPIC -Werror
|
|
|
|
CFLAGS += -fPIC -Werror
|
2015-05-21 21:49:35 +08:00
|
|
|
UNIXTYPE = LINUX
|
2015-11-09 22:11:21 +08:00
|
|
|
shared_ldflags = -l_protocol -l_acl -lrt -lpthread -lz -ldl
|
2015-05-21 21:49:35 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
# For MINGW
|
|
|
|
ifeq ($(findstring MINGW, $(UNIXNAME)), MINGW)
|
|
|
|
CFLAGS += -DLINUX2 -DMINGW
|
2013-12-07 20:31:59 +08:00
|
|
|
UNIXTYPE = LINUX
|
2013-08-18 17:42:25 +08:00
|
|
|
endif
|
|
|
|
|
2017-02-21 22:35:31 +08:00
|
|
|
# For MSYS
|
|
|
|
ifeq ($(findstring MSYS, $(UNIXNAME)), MSYS)
|
|
|
|
CFLAGS += -DLINUX2 -DMINGW
|
|
|
|
UNIXTYPE = LINUX
|
|
|
|
endif
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
# For SunOS
|
|
|
|
ifeq ($(findstring SunOS, $(UNIXNAME)), SunOS)
|
|
|
|
ifeq ($(findstring 86, $(UNIXNAME)), 86)
|
|
|
|
SYSLIB = -lsocket -lnsl -lrt
|
|
|
|
endif
|
|
|
|
ifeq ($(findstring sun4u, $(UNIXNAME)), sun4u)
|
|
|
|
SYSLIB = -lsocket -lnsl -lrt
|
|
|
|
endif
|
2015-05-21 21:49:35 +08:00
|
|
|
CFLAGS += -DSUNOS5 -fPIC -Werror
|
2013-12-07 20:31:59 +08:00
|
|
|
UNIXTYPE = SUNOS5
|
2013-08-18 17:42:25 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
# For HP-UX
|
|
|
|
ifeq ($(findstring HP-UX, $(UNIXNAME)), HP-UX)
|
2015-05-21 21:49:35 +08:00
|
|
|
CFLAGS += -DHP_UX -DHPUX11 -fPIC -Werror
|
2013-12-07 20:31:59 +08:00
|
|
|
UNIXTYPE = HPUX
|
2013-08-18 17:42:25 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
#Find system type.
|
|
|
|
ifneq ($(SYSPATH),)
|
|
|
|
CHECKSYSRES = @echo "System is $(shell uname -sm)"
|
|
|
|
endif
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
OBJ_PATH_DST = ./Debug
|
|
|
|
LIB_PATH_DST = ./lib
|
|
|
|
DEF_PATH_DST = ./Debug
|
|
|
|
|
|
|
|
CFLAGS += -I./src -I./include -I../lib_acl/include -I../lib_protocol/include \
|
|
|
|
-I../include/sqlite -I../include/mysql -I../include/zlib -I../include
|
|
|
|
|
|
|
|
#Project's objs
|
|
|
|
OBJS_DST = $(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/stdlib/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/stream/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/master/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/ipc/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/db/*.cpp))) \
|
2013-12-07 20:31:59 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/event/*.cpp))) \
|
2013-08-18 17:42:25 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/queue/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/http/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/hsocket/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/beanstalk/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/memcache/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/session/*.cpp))) \
|
2015-09-08 17:21:04 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/smtp/*.cpp))) \
|
2013-08-18 17:42:25 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/mime/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/mime/internal/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/connpool/*.cpp))) \
|
2015-05-06 17:16:10 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/redis/*.cpp))) \
|
2016-10-12 22:00:14 +08:00
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/disque/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(OBJ_PATH_DST)/%.o, $(notdir $(wildcard src/serialize/*.cpp)))
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
OBJS_DEF = $(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/stdlib/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/stream/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/master/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/ipc/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/db/*.cpp))) \
|
2013-12-07 20:31:59 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/event/*.cpp))) \
|
2013-08-18 17:42:25 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/queue/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/http/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/hsocket/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/beanstalk/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/memcache/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/session/*.cpp))) \
|
2015-09-08 17:21:04 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/smtp/*.cpp))) \
|
2013-08-18 17:42:25 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/mime/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/mime/internal/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/connpool/*.cpp))) \
|
2015-05-06 17:16:10 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/redis/*.cpp))) \
|
2016-10-12 22:00:14 +08:00
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/disque/*.cpp))) \
|
|
|
|
$(patsubst %.cpp, $(DEF_PATH_DST)/%.inc, $(notdir $(wildcard src/serialize/*.cpp)))
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
###########################################################
|
|
|
|
.PHONY = static shared clean
|
|
|
|
VERSION = 1.1.1.2
|
|
|
|
DATE_NOW = 20`date +%y`.`date +%m`.`date +%d`
|
|
|
|
|
2013-12-07 20:31:59 +08:00
|
|
|
STATIC_LIBNAME = lib_acl_cpp.a
|
|
|
|
SHARED_LIBNAME = lib_acl_cpp.so
|
2016-02-25 19:57:02 +08:00
|
|
|
PCH = src/acl_stdafx.hpp.gch
|
2013-12-07 20:31:59 +08:00
|
|
|
|
2015-02-07 23:44:41 +08:00
|
|
|
lib: static
|
2013-09-28 09:00:07 +08:00
|
|
|
all: static shared sample
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
$(shell mkdir -p $(DEF_PATH_DST))
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
|
|
-include $(OBJS_DEF)
|
|
|
|
endif
|
|
|
|
|
|
|
|
COMPILE = $(CC) $(CFLAGS)
|
|
|
|
COMPILE_OBJ = @(echo 'building $<'; $(COMPILE) $< -o $@)
|
|
|
|
CREATE_DEF = @(echo 'creating $@'; rm -f $@; \
|
|
|
|
$(COMPILE) -MM $< > $@.$$$$; \
|
|
|
|
sed 's,.*.o\( \)*:,$(patsubst %.inc,%.o,$@) $@ :,g' < $@.$$$$ > $@; \
|
|
|
|
rm -f $@.$$$$)
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
|
2013-09-28 09:00:07 +08:00
|
|
|
sample: static
|
|
|
|
@(cd samples; make)
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
static: depends $(OBJS_DST)
|
2013-12-07 20:31:59 +08:00
|
|
|
@echo 'creating $(LIB_PATH_DST)/$(STATIC_LIBNAME)'
|
|
|
|
@$(AR) $(ARFL) $(LIB_PATH_DST)/$(STATIC_LIBNAME) $(OBJS_DST)
|
|
|
|
@$(RANLIB) $(LIB_PATH_DST)/$(STATIC_LIBNAME)
|
|
|
|
@echo 'create $(LIB_PATH_DST)/$(STATIC_LIBNAME) ok!'
|
2013-08-18 17:42:25 +08:00
|
|
|
|
2016-02-25 19:57:02 +08:00
|
|
|
shared: depends pch $(OBJS_DST)
|
2013-12-07 20:31:59 +08:00
|
|
|
@echo 'creating $(SHARED_LIBNAME)'
|
|
|
|
@if test -n "$(rpath)" && test "$(UNIXTYPE)" = "LINUX"; then \
|
|
|
|
echo "building for linux"; \
|
|
|
|
$(CC) -shared -o $(rpath)/$(SHARED_LIBNAME) $(OBJS_DST) \
|
2013-08-18 17:42:25 +08:00
|
|
|
-L$(rpath) $(shared_ldflags) -Wl,-rpath,$(rpath); \
|
2013-12-07 20:31:59 +08:00
|
|
|
echo 'build $(rpath)/$(SHARED_LIBNAME) ok!'; \
|
|
|
|
elif test -n "$(rpath)" && test "$(UNIXTYPE)" = "SUNOS5"; then \
|
|
|
|
echo "building for sunos5"; \
|
|
|
|
$(CC) -shared -o $(rpath)/$(SHARED_LIBNAME) $(OBJS_DST) \
|
|
|
|
-R$(rpath) -L$(rpath) $(shared_ldflags); \
|
|
|
|
echo 'build $(rpath)/$(SHARED_LIBNAME) ok!'; \
|
2015-11-09 22:11:21 +08:00
|
|
|
elif test -n "$(rpath)" && test "$(UNIXTYPE)" = "MACOSX"; then \
|
|
|
|
echo "building for Darwin"; \
|
|
|
|
$(CC) -shared -o $(rpath)/$(SHARED_LIBNAME) $(OBJS_DST) \
|
|
|
|
-R$(rpath) -L$(rpath) $(shared_ldflags); \
|
|
|
|
echo 'build $(rpath)/$(SHARED_LIBNAME) ok!'; \
|
|
|
|
elif test -n "$(rpath)" && test "$(UNIXTYPE)" = "FREEBSD"; then \
|
|
|
|
echo "building for Darwin"; \
|
|
|
|
$(CC) -shared -o $(rpath)/$(SHARED_LIBNAME) $(OBJS_DST) \
|
|
|
|
-R$(rpath) -L$(rpath) $(shared_ldflags); \
|
|
|
|
echo 'build $(rpath)/$(SHARED_LIBNAME) ok!'; \
|
2013-08-18 17:42:25 +08:00
|
|
|
else \
|
2015-10-25 14:15:07 +08:00
|
|
|
echo 'skip build $(SHARED_LIBNAME); usage: make shared rpath=xxx'; \
|
2013-08-18 17:42:25 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
depends: $(OBJS_DEF)
|
2016-08-14 20:48:30 +08:00
|
|
|
check:
|
|
|
|
@if test -n $(polarssl) && test "$(polarssl)" = "on"; then \
|
|
|
|
rm -f Debug/polarssl_io.o; \
|
|
|
|
rm -f Debug/polarssl_conf.o; \
|
|
|
|
rm -f Debug/polarssl_io.inc; \
|
|
|
|
rm -f Debug/polarssl_conf.inc; \
|
|
|
|
fi
|
|
|
|
|
2016-02-25 19:57:02 +08:00
|
|
|
pch: src/acl_stdafx.hpp
|
2016-04-01 09:36:18 +08:00
|
|
|
rm -f $(PCH)
|
2016-04-13 20:59:50 +08:00
|
|
|
@if test "$(UNIXTYPE)" = "LINUX" || test "$(UNIXTYPE)" = "FREEBSD" \
|
|
|
|
|| test "$(UNIXTYPE)" = "MACOSX"; then \
|
2016-04-13 20:32:17 +08:00
|
|
|
$(CC) -o $(PCH) -x c++-header $(CFLAGS) src/acl_stdafx.hpp; \
|
|
|
|
fi
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
# src
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/stdlib/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/stream/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/master/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/ipc/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/db/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2013-12-07 20:31:59 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/event/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2013-08-18 17:42:25 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/queue/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/http/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/hsocket/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/beanstalk/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/memcache/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/session/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/connpool/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2015-09-08 17:21:04 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/smtp/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2013-08-18 17:42:25 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/mime/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2015-01-14 23:35:23 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/mime/internal/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/redis/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2015-05-06 17:16:10 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/disque/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2016-10-12 22:00:14 +08:00
|
|
|
$(OBJ_PATH_DST)/%.o: ./src/serialize/%.cpp
|
|
|
|
$(COMPILE_OBJ)
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/stdlib/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/stream/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/master/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/ipc/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/db/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2013-12-07 20:31:59 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/event/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2013-08-18 17:42:25 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/queue/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/http/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/hsocket/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/beanstalk/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/memcache/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/session/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/connpool/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2015-09-08 17:21:04 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/smtp/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2013-08-18 17:42:25 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/mime/%.cpp
|
|
|
|
$(CREATE_DEF)
|
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/mime/internal/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2015-01-14 23:35:23 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/redis/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2015-05-06 17:16:10 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/disque/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2016-10-12 22:00:14 +08:00
|
|
|
$(DEF_PATH_DST)/%.inc: ./src/serialize/%.cpp
|
|
|
|
$(CREATE_DEF)
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(LIB_PATH_DST)/lib_acl_cpp.a
|
2013-09-28 09:00:07 +08:00
|
|
|
rm -f $(LIB_PATH_DST)/lib_acl_cpp.so
|
2013-08-18 17:42:25 +08:00
|
|
|
rm -f $(OBJS_DST)
|
|
|
|
rm -f $(OBJS_DEF)
|
2016-02-25 19:57:02 +08:00
|
|
|
rm -f $(PCH)
|
2013-08-18 17:42:25 +08:00
|
|
|
@(cd samples; make clean)
|
|
|
|
|
2014-06-23 20:19:05 +08:00
|
|
|
rebuild rb: clean static
|
|
|
|
|
2013-08-18 17:42:25 +08:00
|
|
|
build_src: clean
|
|
|
|
@(echo "begin building src release...")
|
|
|
|
@(rm -rf acl_cpp)
|
|
|
|
@(echo "copy files ...")
|
|
|
|
@(mkdir acl_cpp)
|
|
|
|
@(cp -R src acl_cpp/)
|
|
|
|
@(cp -R mime acl_cpp/)
|
|
|
|
@(cp -R lib acl_cpp/)
|
|
|
|
@(cp -R include acl_cpp/)
|
|
|
|
@(cp -R samples acl_cpp/)
|
|
|
|
@(cp -R Debug acl_cpp/)
|
|
|
|
@(cp -R DebugDll acl_cpp/)
|
|
|
|
@(cp -R Release acl_cpp/)
|
|
|
|
@(cp -R ReleaseDll acl_cpp/)
|
|
|
|
@(cp -R bin acl_cpp/)
|
|
|
|
@(cp -R doc acl_cpp/)
|
|
|
|
@(cp lib_acl_cpp_vc2003.vcproj acl_cpp/)
|
|
|
|
@(cp acl_wrap_vc2003.sln acl_cpp/)
|
|
|
|
@(cp lib_acl_cpp_vc2010.vcxproj acl_cpp/)
|
|
|
|
@(cp acl_wrap_vc2010.sln acl_cpp/)
|
|
|
|
@(cp Makefile acl_cpp/)
|
|
|
|
@(cp changes.txt acl_cpp/)
|
|
|
|
@(cp ReadMe.txt acl_cpp/)
|
|
|
|
@(cp Doxyfile acl_cpp/)
|
|
|
|
@(echo "make tar package ...")
|
|
|
|
@(tar -cf acl_cpp.src.tar acl_cpp)
|
|
|
|
@(echo "make gzip package ...")
|
|
|
|
@(gzip -c acl_cpp.src.tar > acl_cpp.src.tgz)
|
|
|
|
@(rm acl_cpp.src.tar)
|
|
|
|
@(rm -rf acl_cpp)
|
|
|
|
@(echo "move acl_cpp.src.tgz to ../acl_cpp$(VERSION).src.$(DATE_NOW).tgz")
|
|
|
|
(mv acl_cpp.src.tgz ../acl_cpp$(VERSION).src.$(DATE_NOW).tgz)
|