try it, then you know it____________just do it , as love easily fade.

一次只有一个目标,步子迈小些,抑制一次实现所有功能的冲动。 过程如何结果就如何,行动是欢喜的,不管是兴奋还是沮丧的情绪都对结果无益。贵在持之以恒

导航

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:\cpputest\include\CppUTest”
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

 

posted on 2016-03-09 19:08  吾一  阅读(261)  评论(0编辑  收藏  举报