代码拉取完成,页面将自动刷新
#============================================================================
# Copyright (C) 2016, han_gangbiao. All rights reserved.
# Use of this source code is governed by a GPL-v2 license that can be found in the License file.
#
#// CreateDate : [2014-1-26 13:43:52]
#// Creator : han_gangbiao [jackhen] [http://my.oschina.net/jackhen]
#
#// FileInfo : Makefile for smartrpc
#============================================================================
A_TARGET = libsmartrpc$(FN_D).a
SRCS += \
$(wildcard *.cpp) \
$(wildcard base/*.cpp) \
$(wildcard net/*.cpp) \
$(wildcard net/net_inside/*.cpp) \
$(wildcard protocol/*.cpp) \
$(wildcard rpc/*.cpp) \
CFLAGS += -g -pipe -Wall
CFLAGS += \
-I./ \
D?=0
OBJS += $(patsubst %.cpp, %.o, $(filter %.cpp, $(SRCS)))
OBJS += $(patsubst %.cc, %.o, $(filter %.cc, $(SRCS)))
OBJS += $(patsubst %.c, %.o, $(filter %.c, $(SRCS)))
DEPS += $(patsubst %.o, %.d~, $(OBJS))
GCC=gcc
GXX=g++
AR=ar
ifeq ($(D), 0)
CFLAGS += -O2 -fno-strict-aliasing
else
FN_D=_d
endif
ifdef SO_TARGET
LFLAGS += -DPIC -fPIC
endif
.PHONY : all clean
all : $(A_TARGET) $(SO_TARGET) $(EXE_TARGET)
clean:
rm -f $(A_TARGET) $(SO_TARGET) $(EXE_TARGET) $(OBJS) $(DEPS)
ifdef A_TARGET
$(A_TARGET) : $(OBJS)
$(AR) crvs $(A_TARGET) $(OBJS)
endif
ifdef SO_TARGET
$(SO_TARGET) : $(OBJS)
$(GXX) -shared -rdynamic $(CFLAGS) -o $(SO_TARGET) $(OBJS) $(LFLAGS)
endif
ifdef EXE_TARGET
$(EXE_TARGET) : $(OBJS)
$(GXX) $(CFLAGS) -o $(EXE_TARGET) $(OBJS) $(LFLAGS)
endif
.SUFFIXES : .cpp .c .cc
.cpp.o :
$(GXX) $(CFLAGS) -MMD -MF $*.d~ -c -o $@ $<
.c.o :
$(GCC) $(CFLAGS) -MMD -MF $*.d~ -c -o $@ $<
.cc.o :
$(GXX) $(CFLAGS) -MMD -MF $*.d~ -c -o $@ $<
-include $(DEPS)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。