zoukankan      html  css  js  c++  java
  • make file


    CPPUTEST_USE_EXTENSIONS = Y
    如果没有这一句定义,
    CppUTestExt/MockSupport.h和CppUTestExt/MockSupport_c.h文件中的定义就不能用,编译后提示未定义
    #include "CppUTest/TestHarness.h"
    #include "CppUTestExt/MockSupport.h"
    extern"C"
    {
    #include "CppUTestExt/MockSupport_c.h"
    #include "Flash.h"
    #include "m28w160ect.h"
    #include "FakeMicroTime.h"
    }
     $(CPPUTEST_HOME)/include/
    定义很简单,CPPUTEST_HOME = E:cpputest
    windows中地址用的是反斜杠,Linux中用的是斜杠
    #include "CppUTestExt/MockSupport_c.h"
    它的原地址是“E:cpputestincludeCppUTest”
    Set this to @ to keep the makefile quiet
    SILENCE = @
    CPPUTEST_HOME = E:cpputest
    #---- Outputs ----#
    COMPONENT_NAME = t1
    TARGET_LIB = 
        lib/lib$(COMPONENT_NAME).a
        
    TEST_TARGET = 
        $(COMPONENT_NAME)_tests
    
    #--- Inputs ----#
    PROJECT_HOME_DIR = .
    CPP_PLATFORM = Gcc
    
    CPPUTEST_USE_EXTENSIONS = Y
    CPPUTEST_WARNINGFLAGS += -Wall 
    CPPUTEST_WARNINGFLAGS += -Werror 
    CPPUTEST_WARNINGFLAGS += -Wswitch-default 
    CPPUTEST_WARNINGFLAGS += -Wswitch-enum  
    CPPUTEST_WARNINGFLAGS += -Wno-self-assign
    //CPPUTEST_CFLAGS += -std=c89
    CPPUTEST_CFLAGS += -Wextra 
    CPPUTEST_CFLAGS += -pedantic 
    CPPUTEST_CFLAGS += -Wstrict-prototypes
    
    SRC_DIRS = 
        src/*
        src/MyOS/Acme
    
    TEST_SRC_DIRS = 
        tests 
        tests/IO 
        mocks/IO 
        mocks
        
    INCLUDE_DIRS =
      .
      $(CPPUTEST_HOME)/include/
      include/*
      mocks/IO 
      mocks
    
      
    ifeq ($(CPPUTEST_HOME),)
    $(info CPPUTEST_HOME not set! See README.txt)
    else  
    include $(CPPUTEST_HOME)/build/MakefileWorker.mk
    endif
  • 相关阅读:
    设计模式之策略模式
    assert断言——调试中不应该是syso
    Spring AOP
    MyBatis
    事务处理与使用连接池管理连接
    管理结果集(ResultSet)
    执行SQL语句的方式
    JDBC基础:
    NIO.2
    NIO
  • 原文地址:https://www.cnblogs.com/aprilapril/p/5259315.html
Copyright © 2011-2022 走看看