• signal makefile备份-signal project


    #
    
    
    SOURCES = $(wildcard ./src/*.cpp)            #指定源文件列表,
    HEADERS = $(wildcard ./inc/*.h)
    OBJS = $(patsubst %.cpp,%.o,$(SOURCES))       #patsubst是把后面文件列表中所有.c结尾的文件替换成.o结尾的文件。
    
    SOURCES_C = $(wildcard ./src/*.c)
    OBJS_C = $(patsubst %.c,%.o,$(SOURCES_C))
    
    OBJS += $(OBJS_C)
    TOOL_PREFIX  =  
    
    COMPILE_TOOLS     = $(TOOL_PREFIX)gcc
    COMPILE_TOOLS_G++ = $(TOOL_PREFIX)g++
    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 -fPIC
    #CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv4
    LDFLAGS = -L./lib -L/opt/chengjiao/fc/ffmpeg-4.2/lib -L/usr/local/lib
    
    TARGET = signal
    TARGET_EXT := .so
    DEMO_TARGET := run
    DEMO :=./demo/main.cpp
    
    #LIBS   += -lopencv_video -lopencv_imgproc -lopencv_highgui -lopencv_core
    LIBS   += -lopencv_calib3d  -lopencv_features2d -lopencv_flann  -lopencv_imgproc
    LIBS   += -lopencv_highgui -lopencv_ml -lopencv_objdetect  -lopencv_legacy -lopencv_gpu
    LIBS   += -lopencv_photo   -lopencv_superres -lopencv_contrib -lopencv_nonfree
    LIBS   += -lopencv_video  -lopencv_videostab -lopencv_ts  -lopencv_stitching -lopencv_core
    
    
    
            
    
    #.PHONY: all 
    
    #all : sfd
        
    default: all
    
    ./src/%.o:./src/%.c 
        $(COMPILE_TOOLS_G++) $(CFLAGS) -std=c++11 -c -g $^ -o $@ -lstdc++
        
    ./src/%.o:./src/%.cpp 
        $(COMPILE_TOOLS_G++) $(CFLAGS) -std=c++11 -c -g $^ -o $@ -lstdc++
        
    all : $(OBJS) 
        $(COMPILE_TOOLS_G++) $(CFLAGS) -shared -o lib$(TARGET)$(TARGET_EXT) $(OBJS) $(LDFLAGS) $(LIBS)
        mv libsignal.so ./lib
        $(COMPILE_TOOLS_G++) $(CFLAGS)  -o $(DEMO_TARGET) $(DEMO) $(LDFLAGS) $(LIBS) -lsignal
        #$@ $(OBJS) $(LDFLAGS) $(LIBS) -g -std=c++11 -fopenmp  -pthread -lm -lstdc++
        
        
    clean:
        rm -f $(OBJS) $(TARGET).* $(RESOURCE)
        @echo $(SOURCES)
        @echo $(SOURCES_C)
        @echo $(OBJS)
    
    
        

    作者:cumtchw
    出处:http://www.cnblogs.com/cumtchw/
    我的博客就是我的学习笔记,学习过程中看到好的博客也会转载过来,若有侵权,与我联系,我会及时删除。

  • 相关阅读:
    移动端通过js来用rem控制字体大小的用法
    移动端字体大小自动缩放css样式控制
    meta
    兔子生兔子问题
    CSS hack
    为对象添加一个新的方法
    js实现菜单切换
    Node.js基础学习(第三幕)
    Node.js基础学习(第二幕)
    C#通用公共类库ZXNetStandardDepot.Common
  • 原文地址:https://www.cnblogs.com/cumtchw/p/13127066.html
Copyright © 2020-2023  润新知