• Makefile模板


    ---------------------------------------------------------------------
    #
    # Project: vpurun
    #
    # ----------------------------------------------------------------------
    
    PLATFORM=unix
    BUILD_CONFIGURATION=Coda_Object
    
    ifeq ("$(BUILD_CONFIGURATION)","Coda_Object")
    CC= arm-linux-gcc
    CXX= arm-linux-g++
    AR= arm-linux-ar
    #CC= gcc
    #CXX= g++
    #AR= ar
    CFLAGS= -g  -I./vpuapi -I./include  -I./vdi -I../PCIE -Wall -lpthread
    CXXFLAGS= -g  -I./vpuapi -I./include -I../PCIE	-Wall -lpthread
    ARFLAGS= cru
    LDFLAGS=-lpthread  -lm -Wall
    RESULT=vpurun
    INTERMEDIATE_DIR=Coda_Object/obj
    DESTINATION_DIR=.
    RM= rm -f
    MKDIR= cmd /c md
    INTERMEDIATE_DIR_MK=Coda_Object/obj
    DESTINATION_DIR_MK=.
    VPATH= $(INTERMEDIATE_DIR):mvpuapi:src:vdi:vdi/linux:vpuapi:../PCIE
    endif
    
    
    SOURCES= dmapi.c cdb.c  main.c mm.c vdi.c vdi_osal.c vpuapi.c vpuapifunc.c vpuhelper.c vpuio.c  pcieapi.c
    
    SOURCEPATHS= src/dmapi.c src/cdb.c src/main.c  src/vpuhelper.c src/vpuio.c vdi/linux/vdi.c vdi/linux/vdi_osal.c vdi/mm.c vpuapi/vpuapi.c vpuapi/vpuapifunc.c ../PCIE/pcieapi.c
    
    HEADERS= api.h dmapi.h cdb.h config.h hpi.h  cpen.h mm.h regdefine.h vdi.h vdi_osal.h vpuapi.h vpuapifunc.h vpuconfig.h vpuhelper.h vpuio.h vpurun.h vputypes.h pcieapi.h 
    
    
    OBJECTNAMES=$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCES)))
    OBJECTPATHS=$(addprefix $(INTERMEDIATE_DIR)/,$(OBJECTNAMES))
    
    $(DESTINATION_DIR)/$(RESULT): $(OBJECTNAMES)
    ifeq ("$(wildcard $(DESTINATION_DIR) )","")
    	-$(MKDIR) $(DESTINATION_DIR_MK)
    endif
    	$(CC) $(CFLAGS) $(SYSROOTFLAGS) $(OBJECTPATHS) -o $@ $(LDFLAGS)
    
    $(INTERMEDIATE_DIR)/vpurun.d: $(SOURCES) $(HEADERS)
    ifeq ("$(wildcard $(DESTINATION_DIR) )","")
    	-$(MKDIR) $(DESTINATION_DIR_MK)
    endif
    ifeq ("$(wildcard $(INTERMEDIATE_DIR) )","")
    	-$(MKDIR) $(INTERMEDIATE_DIR_MK)
    endif
    	$(CXX) $(CXXFLAGS) -MM $(SOURCEPATHS) > $@
    
    -include $(INTERMEDIATE_DIR)/vpurun.d
    
    clean:
    	$(RM) $(DESTINATION_DIR)/$(RESULT)
    	$(RM) $(INTERMEDIATE_DIR)/*
    	$(RM) $(OBJECTPATHS)
    
    %.o: %.cpp
    	$(CXX) $(CXXFLAGS) -c -o $(INTERMEDIATE_DIR)/$@ $<
    
    %.o: %.c
    	$(CC) $(CFLAGS) -c -o $(INTERMEDIATE_DIR)/$@ $<
    

    每天早上叫醒你的不是闹钟,而是心中的梦~
  • 相关阅读:
    基于连通性状态压缩的动态规划问题
    2005年IT行业趋势Top10
    企业应用之性能实时度量系统演变
    云计算参考架构几例
    在CentOS上构建.net自动化编译环境
    Asp.net SignalR 实现服务端消息推送到Web端
    餐饮行业解决方案之客户分析流程
    餐饮行业解决方案之采购战略制定与实施流程
    餐饮行业解决方案之业务设计流程
    零售连锁专卖信息化解决方案简介之三
  • 原文地址:https://www.cnblogs.com/vintion/p/4116892.html
Copyright © 2020-2023  润新知