-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
47 lines (37 loc) · 1008 Bytes
/
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
PRODUCT := mahjong
CPPUTEST_HOME := cpputest
EVALUATOR = mahjong_evaluator
EVALUATOR_LIB = $(EVALUATOR)/lib/lib$(EVALUATOR).a
CPPUTEST_WARNINGFLAGS = -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion
#Set this to @ to keep the makefile quiet
ifndef SILENCE
SILENCE = @
endif
#--- Inputs ----#
COMPONENT_NAME = $(PRODUCT)
CPPUTEST_USE_EXTENSIONS = Y
CPP_PLATFORM = Gcc
SRC_DIRS = \
src/exercise\
src/html_ui\
src/mahjong_game
TEST_SRC_DIRS = \
tst
INCLUDE_DIRS =\
.\
include\
$(SRC_DIRS)\
$(CPPUTEST_HOME)/include
PRDUCT_MAIN_OBJ = src/main.o
include $(CPPUTEST_HOME)/build/MakefileWorker.mk
$(CPPUTEST_LIB) :
make -C cpputest all extensions
$(EVALUATOR_LIB) :
make -C $(EVALUATOR)
.PHONY: product
product : $(PRODUCT)
$(PRODUCT): $(PRDUCT_MAIN_OBJ) $(TARGET_LIB) $(EVALUATOR_LIB) $(CPPUTEST_LIB)
@echo 'Building target: $@'
$(CC) -o $@ -g $^ $(LD_LIBRARIES) -lstdc++
@echo 'Running the game. Go to your browser to play at http://localhst:8888'
./$(PRODUCT)