hisi536_makefile(备份)

SOURCES = $(wildcard ../src/*.cpp)            #指定源文件列表,
HEADERS = $(wildcard ../inc/*.h)
OBJS = $(patsubst %.cpp,%.o,$(SOURCES))       #patsubst是把后面文件列表中所有.c结尾的文件替换成.o结尾的文件。
 

TOOL_PREFIX     =  arm-hisiv300-linux-

COMPILE_TOOLS = $(TOOL_PREFIX)gcc
AR            = $(TOOL_PREFIX)ar
RANLIB        = $(TOOL_PREFIX)ranlib
#TARGET_MAP    = libhisdk_hi3536_single_dbg.map


IFLAG         =  -I../inc/  -I../inc/opencv2/core -I../inc/opencv2  -I../   
       
CFLAGS  = $(IFLAG) -O0 -Wall -D __linux 
#CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv4
LDFLAGS = -L../lib 

#TARGET = mtcnn_3536_tester


LIBS   +=  -lFaceDetlib -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann  
LIBS   += -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect 
LIBS   += -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres 
LIBS   += -lopencv_video -lopencv_videoio -lopencv_videostab
        


#all : $(TARGET)
    

libfacecmp.a : $(OBJS) 
    #$(AR) -x libncnn.a
    #$(AR) -x libFaceDetlib.a
    cp -r $(OBJS) ./
    $(AR) -r $@  ./*.o 
#$(COMPILE_TOOLS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) -lstdc++ -fopenmp -pthread
    
%.o:%.cpp
    #$(COMPILE_TOOLS) $(CFLAGS) -fPIC -lstdc++ -std=c++11 -c -g $^ -o $@ 
    $(COMPILE_TOOLS) $(CFLAGS) -fPIC -std=c++11 -c -g $^ -o $@ 
    
    
clean:
    rm -f ../src/*.o ./*.o libfacecmp.a 
    @echo $(OBJS) 




    


    

 

posted @ 2019-11-28 10:51  cumtchw  阅读(137)  评论(0编辑  收藏  举报