Commit 74310245 authored by jamesge's avatar jamesge

make by config_brpc.sh shows commands by default, add -s to hide

parent fd5058c7
...@@ -227,107 +227,107 @@ debug: test/libbrpc.dbg.$(SOEXT) test/libbvar.dbg.a ...@@ -227,107 +227,107 @@ debug: test/libbrpc.dbg.$(SOEXT) test/libbvar.dbg.a
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf src/mcpack2pb/generator.o protoc-gen-mcpack libbrpc.a libbrpc.$(SOEXT) $(OBJS) output/include output/lib output/bin $(PROTOS:.proto=.pb.h) $(PROTOS:.proto=.pb.cc) rm -rf src/mcpack2pb/generator.o protoc-gen-mcpack libbrpc.a libbrpc.$(SOEXT) $(OBJS) output/include output/lib output/bin $(PROTOS:.proto=.pb.h) $(PROTOS:.proto=.pb.cc)
.PHONY:clean_debug .PHONY:clean_debug
clean_debug: clean_debug:
@rm -rf test/libbrpc.dbg.$(SOEXT) test/libbvar.dbg.a $(DEBUG_OBJS) rm -rf test/libbrpc.dbg.$(SOEXT) test/libbvar.dbg.a $(DEBUG_OBJS)
.PRECIOUS: %.o .PRECIOUS: %.o
protoc-gen-mcpack: src/idl_options.pb.cc src/mcpack2pb/generator.o libbrpc.a protoc-gen-mcpack: src/idl_options.pb.cc src/mcpack2pb/generator.o libbrpc.a
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -o $@ $(HDRPATHS) $(LIBPATHS) -std=c++0x -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) $(CXX) -o $@ $(HDRPATHS) $(LIBPATHS) -std=c++0x -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -o $@ $(HDRPATHS) $(LIBPATHS) -std=c++0x $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -o $@ $(HDRPATHS) $(LIBPATHS) -std=c++0x $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
endif endif
# force generation of pb headers before compiling to avoid fail-to-import issues in compiling pb.cc # force generation of pb headers before compiling to avoid fail-to-import issues in compiling pb.cc
libbrpc.a:$(BRPC_PROTOS:.proto=.pb.h) $(OBJS) libbrpc.a:$(BRPC_PROTOS:.proto=.pb.h) $(OBJS)
@echo "Packing $@" @echo "> Packing $@"
@ar crs $@ $(filter %.o,$^) ar crs $@ $(filter %.o,$^)
libbrpc.$(SOEXT):$(BRPC_PROTOS:.proto=.pb.h) $(OBJS) libbrpc.$(SOEXT):$(BRPC_PROTOS:.proto=.pb.h) $(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -shared -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $(filter %.o,$^) -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -shared -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $(filter %.o,$^) -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -dynamiclib -Wl,-headerpad_max_install_names -o $@ -install_name @rpath/$@ $(LIBPATHS) $(SOPATHS) $(filter %.o,$^) $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -dynamiclib -Wl,-headerpad_max_install_names -o $@ -install_name @rpath/$@ $(LIBPATHS) $(SOPATHS) $(filter %.o,$^) $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
endif endif
test/libbvar.dbg.a:$(BVAR_DEBUG_OBJS) test/libbvar.dbg.a:$(BVAR_DEBUG_OBJS)
@echo "Packing $@" @echo "> Packing $@"
@ar crs $@ $^ @ar crs $@ $^
test/libbrpc.dbg.$(SOEXT):$(BRPC_PROTOS:.proto=.pb.h) $(DEBUG_OBJS) test/libbrpc.dbg.$(SOEXT):$(BRPC_PROTOS:.proto=.pb.h) $(DEBUG_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -shared -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $(filter %.o,$^) -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -shared -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $(filter %.o,$^) -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -dynamiclib -Wl,-headerpad_max_install_names -o $@ -install_name @rpath/libbrpc.dbg.$(SOEXT) $(LIBPATHS) $(SOPATHS) $(filter %.o,$^) $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -dynamiclib -Wl,-headerpad_max_install_names -o $@ -install_name @rpath/libbrpc.dbg.$(SOEXT) $(LIBPATHS) $(SOPATHS) $(filter %.o,$^) $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
endif endif
.PHONY:output/include .PHONY:output/include
output/include: output/include:
@echo "Copying to $@" @echo "> Copying to $@"
@for dir in `find src -type f -name "*.h" -exec dirname {} \\; | sed -e 's/^src\///g' -e '/^src$$/d' | sort | uniq`; do mkdir -p $@/$$dir && cp src/$$dir/*.h $@/$$dir/; done @for dir in `find src -type f -name "*.h" -exec dirname {} \\; | sed -e 's/^src\///g' -e '/^src$$/d' | sort | uniq`; do mkdir -p $@/$$dir && cp src/$$dir/*.h $@/$$dir/; done
@for dir in `find src -type f -name "*.hpp" -exec dirname {} \\; | sed -e 's/^src\///g' -e '/^src$$/d' | sort | uniq`; do mkdir -p $@/$$dir && cp src/$$dir/*.hpp $@/$$dir/; done @for dir in `find src -type f -name "*.hpp" -exec dirname {} \\; | sed -e 's/^src\///g' -e '/^src$$/d' | sort | uniq`; do mkdir -p $@/$$dir && cp src/$$dir/*.hpp $@/$$dir/; done
@cp src/idl_options.proto src/idl_options.pb.h $@ @cp src/idl_options.proto src/idl_options.pb.h $@
.PHONY:output/lib .PHONY:output/lib
output/lib:libbrpc.a libbrpc.$(SOEXT) output/lib:libbrpc.a libbrpc.$(SOEXT)
@echo "Copying to $@" @echo "> Copying to $@"
@mkdir -p $@ @mkdir -p $@
@cp $^ $@ @cp $^ $@
.PHONY:output/bin .PHONY:output/bin
output/bin:protoc-gen-mcpack output/bin:protoc-gen-mcpack
@echo "Copying to $@" @echo "> Copying to $@"
@mkdir -p $@ @mkdir -p $@
@cp $^ $@ @cp $^ $@
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=./src --proto_path=./src --proto_path=$(PROTOBUF_HDR) $< $(PROTOC) --cpp_out=./src --proto_path=./src --proto_path=$(PROTOBUF_HDR) $<
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%http2_rpc_protocol.dbg.o:%http2_rpc_protocol.cpp %http2_rpc_protocol.dbg.o:%http2_rpc_protocol.cpp
@echo "Compiling $@ with O2" @echo "> Compiling $@ with O2"
@$(CXX) -c $(HDRPATHS) -O2 $(DEBUG_CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) -O2 $(DEBUG_CXXFLAGS) $< -o $@
%hpack.dbg.o:%hpack.cpp %hpack.dbg.o:%hpack.cpp
@echo "Compiling $@ with O2" @echo "> Compiling $@ with O2"
@$(CXX) -c $(HDRPATHS) -O2 $(DEBUG_CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) -O2 $(DEBUG_CXXFLAGS) $< -o $@
%.dbg.o:%.cpp %.dbg.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.dbg.o:%.cc %.dbg.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@
%.o:%.mm %.o:%.mm
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.dbg.o:%.mm %.dbg.o:%.mm
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(DEBUG_CXXFLAGS) $< -o $@
%.o:%.c %.o:%.c
@echo "Compiling $@" @echo "> Compiling $@"
@$(CC) -c $(HDRPATHS) $(CFLAGS) $< -o $@ $(CC) -c $(HDRPATHS) $(CFLAGS) $< -o $@
%.dbg.o:%.c %.dbg.o:%.c
@echo "Compiling $@" @echo "> Compiling $@"
@$(CC) -c $(HDRPATHS) $(DEBUG_CFLAGS) $< -o $@ $(CC) -c $(HDRPATHS) $(DEBUG_CFLAGS) $< -o $@
...@@ -62,33 +62,33 @@ all: echo_client echo_server ...@@ -62,33 +62,33 @@ all: echo_client echo_server
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf echo_client echo_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(SERVER_OBJS) rm -rf echo_client echo_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(SERVER_OBJS)
echo_client:$(PROTO_OBJS) $(CLIENT_OBJS) echo_client:$(PROTO_OBJS) $(CLIENT_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
echo_server:$(PROTO_OBJS) $(SERVER_OBJS) echo_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $< $(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $<
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -63,41 +63,41 @@ all: http_client benchmark_http http_server ...@@ -63,41 +63,41 @@ all: http_client benchmark_http http_server
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf http_client benchmark_http http_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(BENCHMARK_OBJS) $(SERVER_OBJS) rm -rf http_client benchmark_http http_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(BENCHMARK_OBJS) $(SERVER_OBJS)
http_client:$(CLIENT_OBJS) http_client:$(CLIENT_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
benchmark_http:$(BENCHMARK_OBJS) benchmark_http:$(BENCHMARK_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
http_server:$(PROTO_OBJS) $(SERVER_OBJS) http_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $< $(PROTOC) --cpp_out=. --proto_path=. $<
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -48,21 +48,21 @@ all: memcache_client ...@@ -48,21 +48,21 @@ all: memcache_client
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf memcache_client $(OBJS) rm -rf memcache_client $(OBJS)
memcache_client:$(OBJS) memcache_client:$(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -62,33 +62,33 @@ all: echo_client echo_server ...@@ -62,33 +62,33 @@ all: echo_client echo_server
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf echo_client echo_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(SERVER_OBJS) rm -rf echo_client echo_server $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(SERVER_OBJS)
echo_client:$(PROTO_OBJS) $(CLIENT_OBJS) echo_client:$(PROTO_OBJS) $(CLIENT_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
echo_server:$(PROTO_OBJS) $(SERVER_OBJS) echo_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $< $(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $<
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -54,37 +54,37 @@ all: redis_press redis_cli redis_server ...@@ -54,37 +54,37 @@ all: redis_press redis_cli redis_server
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf redis_press redis_cli $(PRESS_OBJS) $(CLI_OBJS) $(SERVER_OBJS) rm -rf redis_press redis_cli $(PRESS_OBJS) $(CLI_OBJS) $(SERVER_OBJS)
redis_press:$(PRESS_OBJS) redis_press:$(PRESS_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
redis_cli:$(CLI_OBJS) redis_cli:$(CLI_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
redis_server:$(SERVER_OBJS) redis_server:$(SERVER_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifneq ("$(LINK_SO)", "") ifneq ("$(LINK_SO)", "")
@$(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) $(LINK_OPTIONS_SO) -o $@
else else
@$(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@ $(CXX) $(LIBPATHS) $(LINK_OPTIONS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -53,43 +53,43 @@ all: echo_client echo_client2 echo_server echo_server2 native_server native_clie ...@@ -53,43 +53,43 @@ all: echo_client echo_client2 echo_server echo_server2 native_server native_clie
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf echo_client echo_client2 echo_server echo_server2 $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(CLIENT2_OBJS) $(SERVER_OBJS) $(SERVER2_OBJS) native_server native_client EchoService.o echo_types.o libechothrift.a gen-cpp gen-py rm -rf echo_client echo_client2 echo_server echo_server2 $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) $(CLIENT2_OBJS) $(SERVER_OBJS) $(SERVER2_OBJS) native_server native_client EchoService.o echo_types.o libechothrift.a gen-cpp gen-py
echo_client:$(PROTO_OBJS) $(CLIENT_OBJS) libechothrift.a echo_client:$(PROTO_OBJS) $(CLIENT_OBJS) libechothrift.a
@echo "Linking $@" @echo "> Linking $@"
@$(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
echo_client2:$(PROTO_OBJS) $(CLIENT2_OBJS) libechothrift.a echo_client2:$(PROTO_OBJS) $(CLIENT2_OBJS) libechothrift.a
@echo "Linking $@" @echo "> Linking $@"
@$(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
echo_server:$(PROTO_OBJS) $(SERVER_OBJS) libechothrift.a echo_server:$(PROTO_OBJS) $(SERVER_OBJS) libechothrift.a
@echo "Linking $@" @echo "> Linking $@"
@$(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ libechothrift.a -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ libechothrift.a -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
echo_server2:$(PROTO_OBJS) $(SERVER2_OBJS) libechothrift.a echo_server2:$(PROTO_OBJS) $(SERVER2_OBJS) libechothrift.a
@echo "Linking $@" @echo "> Linking $@"
@$(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ libechothrift.a -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ libechothrift.a -Xlinker "-)" $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
%.o:%.cpp libechothrift.a %.o:%.cpp libechothrift.a
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc libechothrift.a %.o:%.cc libechothrift.a
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
libechothrift.a: libechothrift.a:
@echo "Generating thrift files" @echo "> Generating thrift files"
@thrift --gen cpp echo.thrift thrift --gen cpp echo.thrift
@thrift --gen py echo.thrift thrift --gen py echo.thrift
@$(CXX) -c gen-cpp/echo_types.cpp -o echo_types.o $(CXX) -c gen-cpp/echo_types.cpp -o echo_types.o
@$(CXX) -c gen-cpp/EchoService.cpp -o EchoService.o $(CXX) -c gen-cpp/EchoService.cpp -o EchoService.o
@ar -crv libechothrift.a EchoService.o echo_types.o ar -crv libechothrift.a EchoService.o echo_types.o
native_server: libechothrift.a native_server: libechothrift.a
@$(CXX) native_server.cpp gen-cpp/echo_types.cpp gen-cpp/EchoService.cpp $(HDRPATHS) $(LIBPATHS) $(SOPATHS) $(CXXFLAGS) -lthriftnb -lthrift -levent -lpthread -lgflags -lbrpc -o native_server $(CXX) native_server.cpp gen-cpp/echo_types.cpp gen-cpp/EchoService.cpp $(HDRPATHS) $(LIBPATHS) $(SOPATHS) $(CXXFLAGS) -lthriftnb -lthrift -levent -lpthread -lgflags -lbrpc -o native_server
native_client: libechothrift.a native_client: libechothrift.a
@$(CXX) native_client.cpp gen-cpp/echo_types.cpp gen-cpp/EchoService.cpp $(HDRPATHS) $(LIBPATHS) $(SOPATHS) $(CXXFLAGS) -lthriftnb -lthrift -levent -lpthread -lgflags -lbrpc -o native_client $(CXX) native_client.cpp gen-cpp/echo_types.cpp gen-cpp/EchoService.cpp $(HDRPATHS) $(LIBPATHS) $(SOPATHS) $(CXXFLAGS) -lthriftnb -lthrift -levent -lpthread -lgflags -lbrpc -o native_client
...@@ -178,73 +178,73 @@ all: $(TEST_BINS) ...@@ -178,73 +178,73 @@ all: $(TEST_BINS)
.PHONY:clean .PHONY:clean
clean:clean_bins clean:clean_bins
@echo "Cleaning" @echo "> Cleaning"
@rm -rf $(TEST_BUTIL_OBJS) $(TEST_BVAR_OBJS) $(TEST_BTHREAD_OBJS) $(TEST_BRPC_OBJS) $(TEST_PROTO_OBJS) $(TEST_PROTO_SOURCES:.proto=.pb.h) $(TEST_PROTO_SOURCES:.proto=.pb.cc) rm -rf $(TEST_BUTIL_OBJS) $(TEST_BVAR_OBJS) $(TEST_BTHREAD_OBJS) $(TEST_BRPC_OBJS) $(TEST_PROTO_OBJS) $(TEST_PROTO_SOURCES:.proto=.pb.h) $(TEST_PROTO_SOURCES:.proto=.pb.cc)
@$(MAKE) -C.. clean_debug $(MAKE) -C.. clean_debug
.PHONY:clean_bins .PHONY:clean_bins
clean_bins: clean_bins:
@rm -rf $(TEST_BINS) rm -rf $(TEST_BINS)
libbrpc.dbg.$(SOEXT):FORCE libbrpc.dbg.$(SOEXT):FORCE
@$(MAKE) -C.. test/libbrpc.dbg.$(SOEXT) $(MAKE) -C.. test/libbrpc.dbg.$(SOEXT)
libbvar.dbg.a:FORCE libbvar.dbg.a:FORCE
@$(MAKE) -C.. test/libbvar.dbg.a $(MAKE) -C.. test/libbvar.dbg.a
FORCE: FORCE:
.PRECIOUS: %.o .PRECIOUS: %.o
test_butil:$(TEST_BUTIL_OBJS) | libbrpc.dbg.$(SOEXT) test_butil:$(TEST_BUTIL_OBJS) | libbrpc.dbg.$(SOEXT)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
endif endif
test_bvar:libbvar.dbg.a $(TEST_BVAR_OBJS) test_bvar:libbvar.dbg.a $(TEST_BVAR_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS)
endif endif
bthread%unittest:bthread%unittest.o | libbrpc.dbg.$(SOEXT) bthread%unittest:bthread%unittest.o | libbrpc.dbg.$(SOEXT)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
endif endif
brpc_%_unittest:$(TEST_PROTO_OBJS) brpc_%_unittest.o | libbrpc.dbg.$(SOEXT) brpc_%_unittest:$(TEST_PROTO_OBJS) brpc_%_unittest.o | libbrpc.dbg.$(SOEXT)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) -Xlinker "-(" $^ -Xlinker "-)" $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS) $(CXX) -o $@ $(LIBPATHS) $(SOPATHS) $^ $(STATIC_LINKINGS) $(UT_DYNAMIC_LINKINGS)
endif endif
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. --proto_path=../src --proto_path=$(PROTOBUF_HDR) $< $(PROTOC) --cpp_out=. --proto_path=. --proto_path=../src --proto_path=$(PROTOBUF_HDR) $<
baidu_time_unittest.o:baidu_time_unittest.cpp | libbrpc.dbg.$(SOEXT) baidu_time_unittest.o:baidu_time_unittest.cpp | libbrpc.dbg.$(SOEXT)
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) -O2 $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) -O2 $(CXXFLAGS) $< -o $@
brpc_h2_unsent_message_unittest.o:brpc_h2_unsent_message_unittest.cpp | libbrpc.dbg.$(SOEXT) brpc_h2_unsent_message_unittest.o:brpc_h2_unsent_message_unittest.cpp | libbrpc.dbg.$(SOEXT)
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) -O2 $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) -O2 $(CXXFLAGS) $< -o $@
%.o:%.cpp | libbrpc.dbg.$(SOEXT) %.o:%.cpp | libbrpc.dbg.$(SOEXT)
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc | libbrpc.dbg.$(SOEXT) %.o:%.cc | libbrpc.dbg.$(SOEXT)
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -30,21 +30,21 @@ all: parallel_http ...@@ -30,21 +30,21 @@ all: parallel_http
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf parallel_http $(OBJS) rm -rf parallel_http $(OBJS)
parallel_http:$(OBJS) parallel_http:$(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -30,21 +30,21 @@ all: rpc_press ...@@ -30,21 +30,21 @@ all: rpc_press
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf rpc_press $(OBJS) rm -rf rpc_press $(OBJS)
rpc_press:$(OBJS) rpc_press:$(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -30,21 +30,21 @@ all: rpc_replay ...@@ -30,21 +30,21 @@ all: rpc_replay
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf rpc_replay $(OBJS) rm -rf rpc_replay $(OBJS)
rpc_replay:$(OBJS) rpc_replay:$(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -37,25 +37,25 @@ all: rpc_view ...@@ -37,25 +37,25 @@ all: rpc_view
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf rpc_view $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS) rm -rf rpc_view $(PROTO_GENS) $(PROTO_OBJS) $(CLIENT_OBJS)
rpc_view:$(PROTO_OBJS) $(CLIENT_OBJS) rpc_view:$(PROTO_OBJS) $(CLIENT_OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
endif endif
%.pb.cc %.pb.h:%.proto %.pb.cc %.pb.h:%.proto
@echo "Generating $@" @echo "> Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $< $(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $<
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
...@@ -30,21 +30,21 @@ all: trackme_server ...@@ -30,21 +30,21 @@ all: trackme_server
.PHONY:clean .PHONY:clean
clean: clean:
@echo "Cleaning" @echo "> Cleaning"
@rm -rf trackme_server $(OBJS) rm -rf trackme_server $(OBJS)
trackme_server:$(OBJS) trackme_server:$(OBJS)
@echo "Linking $@" @echo "> Linking $@"
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
else ifeq ($(SYSTEM),Darwin) else ifeq ($(SYSTEM),Darwin)
@$(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@ $(CXX) $(LIBPATHS) $^ $(STATIC_LINKINGS) $(DYNAMIC_LINKINGS) -o $@
endif endif
%.o:%.cpp %.o:%.cpp
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
%.o:%.cc %.o:%.cc
@echo "Compiling $@" @echo "> Compiling $@"
@$(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@ $(CXX) -c $(HDRPATHS) $(CXXFLAGS) $< -o $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment