mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-18 03:45:04 +00:00
ported the C++ version in C
This commit is contained in:
1 parent
8e10e60244
commit
e48300e32e
7 files changed
+243
No files matched your search
@@ -0,0 +1,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 -lCppUTestExt
|
||||
|
||||
# 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}
|
||||
Reference in new issue
Block a user