########################################################################### # Automatically generated by comake (1.0.0) # ########################################################################### #################设计系统参数####################################### WORKROOT ?= ../../../../ IDLCC ?= $(WORKROOT)/public/idlcompiler/output/bin/mcy CC ?= gcc CXX ?= g++ LEX ?= flex YACC ?= yacc CFLAGS ?= -pipe -fsigned-char -Wall -W -g -fPIC CXXFLAGS ?= -pipe -fsigned-char -Wall -W -g -fPIC LEXFLAGS ?= YACCFLAGS ?= LINKFLAGS ?= -rdynamic LINK ?= g++ AR ?= ar cqs RANLIB ?= COMAKE ?= comake ###############baidu lib 的32位 64位支持################# ifeq ($(MAC), 64) lib2=lib2-64 third=third-64 else lib2=lib2 third=third endif ifeq ($(MAC),ARM32) lib2=lib2-arm32 third=third-arm32 endif ########################################## # 编译参数 DEP_INCPATH = -I$(WORKROOT)/$(lib2)/bsl//include/ DEP_LDFLAGS = -L$(WORKROOT)/$(lib2)/bsl//lib/ DEP_LDLIBS = -lbsl_archive -lbsl_exception -lbsl_pool -lbsl_utils -lbsl -lbsl_ResourcePool -lbsl_check_cast -lbsl_var -lbsl_var_implement MAKDEP = Makefile.dep #start target first : all ############# 默认推到公式 .SUFFIXES: .c .cpp .cc .cxx .C .idl .des .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) ############# ###cpp 支持 %info : % ccp $< ############# #__$MAKEFILE_RULES$__ ###############编译目标 all : target output .PHONY : all clean main target : main test : `for x in ;do ./$$x;done` comake : -make clean -comake #-include $(MAKDEP) #----------------build target : main-------------------- main : CC := gcc main : CXX := g++ main : CXXFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC main : CPPFLAGS := main : CFLAGS := -pipe -fsigned-char -Wall -W -g -fPIC main : INCPATH := -I. -I../output/include $(DEP_INCPATH) main : LDLIBS := -lidlcompiler $(DEP_LDLIBS) main : LDFLAGS := -L../output/lib $(DEP_LDFLAGS) main : LINKFLAGS := -rdynamic main_SOURCES := $(wildcard comake_autogen.cpp main.cpp) #main_HEADERS := $(wildcard *.h) main_HEADERS := *.h main_IDLSRC := $(wildcard __$IDLSRC_VALUE$__) main_IDLSRCCPP := $(patsubst %.idl,%.cpp, $(main_IDLSRC)) main_IDLSRCH := $(patsubst %.idl,%.h, $(main_IDLSRC)) main_CONFDES := $(wildcard __$CONFDES$_VALUE$__ main.des) main_CONFRANGE := $(patsubst %.des,%.range, $(main_CONFDES)) main_OBJS := $(main_IDLSRC:.idl=.o) main_OBJS += $(main_SOURCES:.c=.o) main_OBJS := $(main_OBJS:.cc=.o) main_OBJS := $(main_OBJS:.cpp=.o) main_OBJS := $(main_OBJS:.cxx=.o) main_OBJS := $(main_OBJS:.C=.o) main_OBJS := $(main_OBJS:.idl=.o) main_OBJS := $(main_OBJS:.yacc=.o) main_OBJS := $(main_OBJS:.lex=.o) main : $(main_OBJS) `for x in $(main_CONFDES);do cpp -C -o main.range $$x $(CPPFLAGS) $(INCPATH);mkdir -p conf;cp main.range conf/; done` $(LINK) $^ -o $@ -Xlinker "-(" $(LDFLAGS) $(LDLIBS) $(LINKFLAGS) -Xlinker "-)" define main_output mkdir -p output cp -rf main output `if [ -e "conf" ];then cp -rf conf output/ ;fi` endef define main_clean -rm -rf $(main_OBJS) $(main_IDLSRCCPP) $(main_IDLSRCH) main.range conf/main.range -rm -rf main -rm -rf output -rm -rf ccp_output.error ccp_output_scm.xml ccp_output.xml ccp_output.pclint ccp_output.txt endef define main_ccpc ccp $(main_SOURCES) --formatter vim endef define main_cov endef #---------------------end build target : main------------------ define _output $(main_output) endef define _clean $(main_clean) endef ccpc : $(main_ccpc) cov : cov01 -1 make clean make cov01 -0 output : main $(_output) $(MAKDEP) : comake_autogen.cpp main.cpp -$(CC) -MG -MM $(CPPFLAGS) $(INCPATH) $(DEP_INCPATH) $^ > $@ clean: $(_clean) rm -rf $(MAKDEP)