########################################################################### # Automatically generated by comake (1.0.0) # ########################################################################### #################设计系统参数####################################### WORKROOT ?= ../../ IDLCC := $(WORKROOT)/public/idlcompiler/output/bin/mcy RPCCC := $(WORKROOT)/public/ubrpc/servlet/ubrpcgen CC := g++ CXX := g++ LEX := flex YACC := yacc CFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC CXXFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC LEXFLAGS := YACCFLAGS := IDLFLAGS := LINKFLAGS := -rdynamic LINK := g++ AR := ar cqs RANLIB := COMAKE := comake ###############baidu lib 的32位 64位支持################# HARDWARE_PLATFORM := $(shell uname -m) ifeq ($(HARDWARE_PLATFORM),x86_64) lib2=lib2-64 third=third-64 else lib2=lib2-arm32 third=third-arm32 endif ########################################## # 编译参数 DEP_INCPATH = -I$(WORKROOT)/public/spreg/output//include/ -I$(WORKROOT)/$(lib2)/ullib//include/ -I$(WORKROOT)/$(third)/pcre//include/ -I$(WORKROOT)/$(lib2)/bsl//include/ DEP_LDFLAGS = -L$(WORKROOT)/$(lib2)/bsl//lib/ -L$(WORKROOT)/$(third)/pcre//lib/ -L$(WORKROOT)/$(lib2)/ullib//lib/ -L$(WORKROOT)/public/spreg/output//lib/ DEP_LDLIBS = -lspreg -lpcre -lpcrecpp -lpcreposix -lbsl -lullib INCPATH = -I. -Icompiler/src MAKDEP = Makefile.dep #start target first : all ############# 默认推到公式 .SUFFIXES: .c .cpp .cc .cxx .C .idl .des .PRECIOUS: %.cpp .cpp.o: $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) .cc.o: $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) .cxx.o: $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) .C.o: $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) $(INCPATH) .c.o: $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) $(INCPATH) .idl.cpp: $(IDLCC) --ns=$(*F) -o $* $< $(CPPFLAGS) $(INCPATH) $(IDLFLAGS) ############# ###cpp 支持 %info : % ccp $< ############# #__$MAKEFILE_RULES$__ ###############编译目标 all : target output .PHONY : all clean test output comake src conf target : libconfig.a #target : rpcidl libconfig.a #target : #__$target_CMDLINE$__ rpcidl : clean_rpcidl : test : comake : -make clean -comake #-include $(MAKDEP) -include $(MAKDEP) #----------------build target : libconfig.a-------------------- libconfig.a : CC := g++ libconfig.a : CXX := g++ libconfig.a : CXXFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC -Woverloaded-virtual libconfig.a : CPPFLAGS := libconfig.a : IDLFLAGS := libconfig.a : CFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC libconfig.a : INCPATH := -I. -Icompiler/src $(DEP_INCPATH) libconfig.a : LDLIBS := -lm -lpthread $(DEP_LDLIBS) libconfig.a : LDFLAGS := $(DEP_LDFLAGS) libconfig.a : LINKFLAGS := -rdynamic libconfig_a_SOURCES := $(wildcard comake_autogen.cpp FileReloader.cpp ConfigReloader.cpp CmdOption.cpp ConfigError.cpp ConfigGroup.cpp ConfigUnit.cpp Configure.cpp constraint/Constraint.cpp constraint/ConstraintFunction.cpp constraint/cc_default.cpp reader/RawData.cpp reader/Reader.cpp utils/init.cpp utils/trans.cpp cfgext.cpp cfgflag.cpp compiler/src/idl.c compiler/src/idl_lex.c compiler/src/idl_gram.c) #libconfig_a_HEADERS := $(wildcard *.h) libconfig_a_HEADERS := *.h libconfig_a_IDLSRC := $(wildcard __$IDLSRC_VALUE$__) libconfig_a_IDLSRCCPP := $(patsubst %.idl,%.cpp, $(libconfig_a_IDLSRC)) libconfig_a_IDLSRCH := $(patsubst %.idl,%.h, $(libconfig_a_IDLSRC)) libconfig_a_CONFDES := $(wildcard __$CONFDES$_VALUE$__ libconfig.a.des) libconfig_a_CONFRANGE := $(patsubst %.des,%.range, $(libconfig_a_CONFDES)) libconfig_a_OBJS := $(libconfig_a_IDLSRC:.idl=.o) libconfig_a_OBJS += $(libconfig_a_SOURCES:.c=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.cc=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.cpp=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.cxx=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.C=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.idl=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.yacc=.o) libconfig_a_OBJS := $(libconfig_a_OBJS:.lex=.o) libconfig.a : $(libconfig_a_OBJS) rm -f $@ || echo ar cr $@ $^ define libconfig_a_output mkdir -p output output/lib output/include output/include/utils output/include/constraint cp -rf *.h output/include/ cp -rf utils/*.h output/include/utils/ cp -rf constraint/*.h output/include/constraint/ cp -rf compiler/src/idl_conf_if.h output/include/ cp libconfig.a output/lib endef define libconfig_a_clean -rm -rf $(libconfig_a_OBJS) $(libconfig_a_IDLSRCCPP) $(libconfig_a_IDLSRCH) libconfig.a.range conf/libconfig.a.range -rm -rf libconfig.a -rm -rf output -rm -rf ccp_output.error ccp_output_scm.xml ccp_output.xml ccp_output.pclint ccp_output.txt endef define libconfig_a_ccpc ccp $(libconfig_a_SOURCES) --formatter vim endef define libconfig_a_cov endef #---------------------end build target : libconfig.a------------------ define _output $(libconfig_a_output) endef define _clean $(libconfig_a_clean) endef ccpc : $(libconfig_a_ccpc) cov : cov01 -1 make clean make cov01 -0 output : libconfig.a $(_output) rm -rf $(MAKDEP) $(MAKDEP) : $(wildcard comake_autogen.cpp FileReloader.cpp ConfigReloader.cpp CmdOption.cpp ConfigError.cpp ConfigGroup.cpp ConfigUnit.cpp Configure.cpp constraint/Constraint.cpp constraint/ConstraintFunction.cpp constraint/cc_default.cpp reader/RawData.cpp reader/Reader.cpp utils/init.cpp utils/trans.cpp cfgext.cpp cfgflag.cpp compiler/src/idl.c compiler/src/idl_lex.c compiler/src/idl_gram.c) -$(CC) -MG -MM $(CPPFLAGS) $(INCPATH) $(DEP_INCPATH) $^ > $@ clean: $(_clean) rm -rf $(MAKDEP)