forked from jchunky/GildedRose-Refactoring-Kata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 1.31 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Makefile for building the kata file with the Google Testing Framework
#
# SYNOPSIS:
#
# make [all] - makes everything.
# make TARGET - makes the given target.
# make clean - removes all files generated by make.
# Please tweak the following variable definitions as needed by your
# project.
# Points to the root of CppUTest, relative to where this file is.
# Remember to tweak this if you move this file.
CPPUTEST_HOME = CppUTest
# Where to find user code.
USER_DIR = .
# Flags passed to the preprocessor.
CPPFLAGS += -I$(CPPUTEST_HOME)/include
# Flags passed to the C++ compiler.
CFLAGS += -g -Wall -Wextra
LD_LIBRARIES = -L$(CPPUTEST_HOME)/lib -lCppUTest
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
TESTS = GildedRoseUnitTests
TEXTTESTS = GildedRoseTextTests
# House-keeping build targets.
all : $(TESTS) $(TEXTTESTS)
GildedRose.o : $(USER_DIR)/GildedRose.c
GildedRoseUnitTests : $(USER_DIR)/GildedRoseUnitTests.cc GildedRose.o
$(CXX) $(CPPFLAGS) $(CFLAGS) -o $@ $(USER_DIR)/GildedRoseUnitTests.cc GildedRose.o $(LD_LIBRARIES)
GildedRoseTextTests.o : $(USER_DIR)/GildedRoseTextTests.c
GildedRoseTextTests : GildedRoseTextTests.o GildedRose.o
$(CC) $^ -o $@
clean :
rm -f $(TESTS) $(TEXTTESTS) *.o *~
check-syntax:
gcc $(CPPFLAGS) -o /dev/null -S ${CHK_SOURCES}