Skip to content

Commit

Permalink
modify acl Makefiles to renaming lib names.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Mar 25, 2017
1 parent d2128e6 commit 57f8afc
Show file tree
Hide file tree
Showing 61 changed files with 627 additions and 300 deletions.
20 changes: 13 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.0)
project(acl)
message(${CMAKE_SYSTEM_NAME})
#message(${CMAKE_SYSTEM_NAME})

#set(CMAKE_BUILD_TYPE Release)
#set(CMAKE_BUILD_TYPE Release CACHE STRING "set build type to release")
Expand All @@ -9,12 +9,18 @@ if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
message(FATAL_ERROR "Please into another dir to build!")
endif()

add_subdirectory(lib_acl lib_acl)
add_subdirectory(lib_protocol lib_protocol)
add_subdirectory(lib_acl_cpp lib_acl_cpp)
#The below line was built error on Android Studio
#string(TOUPPER ${CMAKE_SYSTEM_NAME} OS_NAME)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH build)
endif()

add_subdirectory(lib_acl acl)
add_subdirectory(lib_protocol protocol)
add_subdirectory(lib_acl_cpp acl_cpp)

#if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_subdirectory(lib_fiber/c lib_fiber)
add_subdirectory(lib_fiber/cpp lib_fiber_cpp)
add_subdirectory(lib_fiber/c fiber)
add_subdirectory(lib_fiber/cpp fiber_cpp)
endif()
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,19 @@ clean:
@(cd unit_test; make clean)
@(cd lib_acl/samples; make clean)
@(cd lib_protocol/samples; make clean)
@(rm -f lib_acl.a lib_acl.so)
@(rm -f libacl.a libacl.so)
# @(cd lib_dict; make clean)
# @(cd lib_tls; make clean)

install:
@(echo "")
@(echo "begin copy file...")
cp -f lib_acl/master/acl_master ./dist/master/libexec/$(RPATH)/
cp -f lib_acl/lib/lib_acl.a $(ACL_LIB)/$(RPATH)/
cp -f lib_acl/lib/libacl.a $(ACL_LIB)/$(RPATH)/
cp -Rf lib_acl/include/* $(ACL_INC)/
cp -f lib_protocol/lib/lib_protocol.a $(PROTO_LIB)/$(RPATH)/
cp -Rf lib_protocol/include/* $(PROTO_INC)/
cp -f lib_acl_cpp/lib/lib_acl_cpp.a $(ACL_LIB)/$(RPATH)/
cp -f lib_acl_cpp/lib/libacl_cpp.a $(ACL_LIB)/$(RPATH)/
cp -Rf lib_acl_cpp/include/acl_cpp/* $(INC_PATH)/acl_cpp/
# cp -f lib_dict/lib/lib_dict.a $(DICT_LIB)/$(RPATH)/
# cp -Rf lib_dict/include/* $(DICT_INC)/
Expand All @@ -136,11 +136,11 @@ uninstall:
@(echo "")
@(echo "begin remove file...")
rm -f ./dist/master/libexec/$(RPATH)/*
rm -f $(ACL_LIB)/$(RPATH)/lib_acl.a
rm -f $(ACL_LIB)/$(RPATH)/libacl.a
rm -Rf $(ACL_INC)/*
rm -f $(PROTO_LIB)/$(RPATH)/lib_protocol.a
rm -Rf $(PROTO_INC)/*
rm -f $(ACL_LIB)/$(RPATH)/lib_acl_cpp.a
rm -f $(ACL_LIB)/$(RPATH)/libacl_cpp.a
rm -Rf $(INC_PATH)/acl_cpp/*
rm -f $(DICT_LIB)/$(RPATH)/lib_dict.a
rm -Rf $(DICT_INC)/*
Expand Down Expand Up @@ -258,21 +258,21 @@ build_one: all_lib
@(mkdir -p $(RELEASE_PATH); mkdir -p $(RELEASE_PATH)/acl; \
mkdir -p $(RELEASE_PATH)/protocol; \
mkdir -p $(RELEASE_PATH)/acl_cpp)
@(cp lib_acl/lib/lib_acl.a $(RELEASE_PATH)/acl/)
@(cp lib_acl/lib/libacl.a $(RELEASE_PATH)/acl/)
@(cp lib_protocol/lib/lib_protocol.a $(RELEASE_PATH)/protocol/)
@(cp lib_acl_cpp/lib/lib_acl_cpp.a $(RELEASE_PATH)/acl_cpp/)
@(cd $(RELEASE_PATH)/acl; ar -x lib_acl.a)
@(cp lib_acl_cpp/lib/libacl_cpp.a $(RELEASE_PATH)/acl_cpp/)
@(cd $(RELEASE_PATH)/acl; ar -x libacl.a)
@(cd $(RELEASE_PATH)/protocol; ar -x lib_protocol.a)
@(cd $(RELEASE_PATH)/acl_cpp; ar -x lib_acl_cpp.a)
$(AR) $(ARFL) ./lib_acl.a $(RELEASE_PATH)/acl/*.o \
@(cd $(RELEASE_PATH)/acl_cpp; ar -x libacl_cpp.a)
$(AR) $(ARFL) ./libacl.a $(RELEASE_PATH)/acl/*.o \
$(RELEASE_PATH)/protocol/*.o $(RELEASE_PATH)/acl_cpp/*.o
$(RANLIB) ./lib_acl.a
$(CC) $(LDFLAGS) -o ./lib_acl.so $(RELEASE_PATH)/acl_cpp/*.o \
$(RANLIB) ./libacl.a
$(CC) $(LDFLAGS) -o ./libacl.so $(RELEASE_PATH)/acl_cpp/*.o \
$(RELEASE_PATH)/protocol/*.o $(RELEASE_PATH)/acl/*.o \
$(SYSLIB)
@(rm -rf $(RELEASE_PATH))
@echo ""
@echo "Over, lib_acl.a and lib_acl.so were built ok!"
@echo "Over, libacl.a and libacl.so were built ok!"
@echo ""

check:
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif

CFLAGS += -I../../lib_acl/include -I../../lib_protocol/include -I../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../lib_acl_cpp/lib -l_acl_cpp -L../../lib_protocol/lib -l_protocol -L../../lib_acl/lib -l_acl \
LDFLAGS = -L../../lib_acl_cpp/lib -lacl_cpp -L../../lib_protocol/lib -lprotocol -L../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/gson/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif

CFLAGS += -I./include -I../../lib_acl/include -I../../lib_protocol/include -I../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../lib_acl_cpp/lib -l_acl_cpp -L../../lib_protocol/lib -l_protocol -L../../lib_acl/lib -l_acl \
LDFLAGS = -L../../lib_acl_cpp/lib -lacl_cpp -L../../lib_protocol/lib -lprotocol -L../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/gson/demo/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif

CFLAGS += -I../../../lib_acl/include -I../../../lib_protocol/include -I../../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../../lib_acl_cpp/lib -l_acl_cpp -L../../../lib_protocol/lib -l_protocol -L../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../lib_acl_cpp/lib -lacl_cpp -L../../../lib_protocol/lib -lprotocol -L../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/gson/demo/gson.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "stdafx.h"
#include ".\struct.h"
#include "struct.h"
#include "gson.h"
#include "acl_cpp/serialize/gson_helper.ipp"
namespace acl
Expand Down
7 changes: 7 additions & 0 deletions app/gson/test/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

all:
@(cd benchmark; make)
@(cd test; make)
@(cd test0; make)
@(cd test1; make)
@(cd test2; make)
@(cd test3; make)
clean:
@(cd benchmark; make clean)
@(cd test; make clean)
Expand Down
6 changes: 3 additions & 3 deletions app/gson/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ CFLAGS += -I../../../../lib_acl/include \
-I../../../../lib_protocol/include \
-I../../../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../../../lib_acl_cpp/lib -l_acl_cpp \
-L../../../../lib_protocol/lib -l_protocol \
-L../../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../../lib_acl_cpp/lib -lacl_cpp \
-L../../../../lib_protocol/lib -lprotocol \
-L../../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
6 changes: 3 additions & 3 deletions app/master_dispatch/manager/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ endif
CFLAGS += -I../../../lib_acl/include -I../../../lib_protocol/include \
-I../../../lib_acl_cpp/include -I.
EXTLIBS =
LDFLAGS = -L../../../lib_acl_cpp/lib -l_acl_cpp \
-L../../../lib_protocol/lib -l_protocol \
-L../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../lib_acl_cpp/lib -lacl_cpp \
-L../../../lib_protocol/lib -lprotocol \
-L../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB) -rdynamic

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/master_dispatch/server/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif

CFLAGS += -I. -I../../../lib_acl/include -I../../../lib_protocol/include -I../../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../../lib_acl_cpp/lib -l_acl_cpp -L../../../lib_protocol/lib -l_protocol -L../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../lib_acl_cpp/lib -lacl_cpp -L../../../lib_protocol/lib -lprotocol -L../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB) -rdynamic

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/master_dispatch/test/server/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif

CFLAGS += -I../../../../lib_acl/include -I../../../../lib_protocol/include -I../../../../lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L../../../../lib_acl_cpp/lib -l_acl_cpp -L../../../../lib_protocol/lib -l_protocol -L../../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../../lib_acl_cpp/lib -lacl_cpp -L../../../../lib_protocol/lib -lprotocol -L../../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
8 changes: 4 additions & 4 deletions app/master_dispatch/www/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ CFLAGS += -I../../../lib_acl/include \
-I../../../lib_fiber/c/include \
-I../../../lib_fiber/cpp/include
EXTLIBS =
LDFLAGS = -L../../../lib_fiber/lib -l_fiber_cpp -l_fiber \
-L../../../lib_acl_cpp/lib -l_acl_cpp \
-L../../../lib_protocol/lib -l_protocol \
-L../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../lib_fiber/lib -lfiber_cpp -lfiber \
-L../../../lib_acl_cpp/lib -lacl_cpp \
-L../../../lib_protocol/lib -lprotocol \
-L../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion app/master_dispatch/www/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main(int argc, char *argv[])
addr = argv[3];
printf("listen: %s\r\n", addr);

ms.run_alone(addr, argc >= 3 ? argv[2] : NULL, 0);
ms.run_alone(addr, argc >= 3 ? argv[2] : NULL);
}
else
ms.run_daemon(argc, argv);
Expand Down
6 changes: 3 additions & 3 deletions app/redis_tools/redis_builder/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ endif
CFLAGS += -I../../../lib_acl/include -I../../../lib_protocol/include \
-I../../../lib_acl_cpp/include -I.
EXTLIBS =
LDFLAGS = -L../../../lib_acl_cpp/lib -l_acl_cpp \
-L../../../lib_protocol/lib -l_protocol \
-L../../../lib_acl/lib -l_acl \
LDFLAGS = -L../../../lib_acl_cpp/lib -lacl_cpp \
-L../../../lib_protocol/lib -lprotocol \
-L../../../lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB) -rdynamic

COMPILE = $(CC) $(CFLAGS)
Expand Down
6 changes: 3 additions & 3 deletions app/wizard/tmpl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ CFLAGS += -I$(ACL_PATH)/lib_acl/include \
-I$(ACL_PATH)/lib_protocol/include \
-I$(ACL_PATH)/lib_acl_cpp/include
EXTLIBS =
LDFLAGS = -L$(ACL_PATH)/lib_acl_cpp/lib -l_acl_cpp \
-L$(ACL_PATH)/lib_protocol/lib -l_protocol \
-L$(ACL_PATH)/lib_acl/lib -l_acl \
LDFLAGS = -L$(ACL_PATH)/lib_acl_cpp/lib -lacl_cpp \
-L$(ACL_PATH)/lib_protocol/lib -lprotocol \
-L$(ACL_PATH)/lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
8 changes: 4 additions & 4 deletions app/wizard/tmpl/Makefile_fiber.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ CFLAGS += -I$(ACL_PATH)/lib_acl/include \
-I$(ACL_PATH)/lib_fiber/c/include \
-I$(ACL_PATH)/lib_fiber/cpp/include
EXTLIBS =
LDFLAGS = -L$(ACL_PATH)/lib_fiber/lib -l_fiber_cpp -l_fiber \
-L$(ACL_PATH)/lib_acl_cpp/lib -l_acl_cpp \
-L$(ACL_PATH)/lib_protocol/lib -l_protocol \
-L$(ACL_PATH)/lib_acl/lib -l_acl \
LDFLAGS = -L$(ACL_PATH)/lib_fiber/lib -lfiber_cpp -lfiber \
-L$(ACL_PATH)/lib_acl_cpp/lib -lacl_cpp \
-L$(ACL_PATH)/lib_protocol/lib -lprotocol \
-L$(ACL_PATH)/lib_acl/lib -lacl \
$(EXTLIBS) $(SYSLIB)

COMPILE = $(CC) $(CFLAGS)
Expand Down
Loading

0 comments on commit 57f8afc

Please sign in to comment.