-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
101 lines (70 loc) · 7.08 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
CC_EXEC = g++ --std=c++11
BUILD_DIR = ./build
API_DIR = ./API
USERINTERFACE_DIR = ./UserInterface
BACKEND_DIR = ./Business-Logic
DB_DIR = ./Models
ORM_DIR = ./ORM
EXCEPTION_DIR = ./Exception
ROOMS_DIR = ${DB_DIR}/Rooms
USER_DIR = ${DB_DIR}/User
FILTER_DIR = ${DB_DIR}/Filters
RESULT_DIR = ${API_DIR}/Result
AI_DIR = ${BACKEND_DIR}/AI
all: utrip.out
utrip.out: ${BUILD_DIR}/main.o ${BUILD_DIR}/Database.o ${BUILD_DIR}/Hotel.o ${BUILD_DIR}/Room.o ${BUILD_DIR}/StandardRoom.o ${BUILD_DIR}/DeluxeRoom.o ${BUILD_DIR}/LuxuryRoom.o ${BUILD_DIR}/PremiumRoom.o ${BUILD_DIR}/ReserveCase.o ${BUILD_DIR}/User.o ${BUILD_DIR}/Filter.o ${BUILD_DIR}/CityFilter.o ${BUILD_DIR}/AvgPriceFilter.o ${BUILD_DIR}/AdvancedFilter.o ${BUILD_DIR}/Rating.o ${BUILD_DIR}/Comment.o ${BUILD_DIR}/API.o ${BUILD_DIR}/ObjectRelational.o ${BUILD_DIR}/UserInterface.o ${BUILD_DIR}/Backend.o ${BUILD_DIR}/Exception.o ${BUILD_DIR}/StarRangeFilter.o ${BUILD_DIR}/Result.o ${BUILD_DIR}/DefaultAvgPriceFilter.o ${BUILD_DIR}/AI.o | build_dir
${CC_EXEC} ${BUILD_DIR}/main.o ${BUILD_DIR}/Database.o ${BUILD_DIR}/Hotel.o ${BUILD_DIR}/Room.o ${BUILD_DIR}/StandardRoom.o ${BUILD_DIR}/DeluxeRoom.o ${BUILD_DIR}/LuxuryRoom.o ${BUILD_DIR}/PremiumRoom.o ${BUILD_DIR}/ReserveCase.o ${BUILD_DIR}/User.o ${BUILD_DIR}/Filter.o ${BUILD_DIR}/CityFilter.o ${BUILD_DIR}/AvgPriceFilter.o ${BUILD_DIR}/AdvancedFilter.o ${BUILD_DIR}/Rating.o ${BUILD_DIR}/Comment.o ${BUILD_DIR}/API.o ${BUILD_DIR}/ObjectRelational.o ${BUILD_DIR}/UserInterface.o ${BUILD_DIR}/Backend.o ${BUILD_DIR}/Exception.o ${BUILD_DIR}/StarRangeFilter.o ${BUILD_DIR}/Result.o ${BUILD_DIR}/DefaultAvgPriceFilter.o ${BUILD_DIR}/AI.o -o utrip.out
${BUILD_DIR}/main.o: main.cpp ConstNames.hpp ${USERINTERFACE_DIR}/UserInterface.hpp | build_dir
${CC_EXEC} -c main.cpp -o ${BUILD_DIR}/main.o
${BUILD_DIR}/Database.o: ${DB_DIR}/Database.cpp ${DB_DIR}/Database.hpp ${DB_DIR}/Hotel.hpp ${USER_DIR}/User.hpp ConstNames.hpp ${EXCEPTION_DIR}/Exception.hpp ${USER_DIR}/ReserveCase.hpp ${DB_DIR}/Comment.hpp ${RESULT_DIR}/Result.hpp | build_dir
${CC_EXEC} -c ${DB_DIR}/Database.cpp -o ${BUILD_DIR}/Database.o
${BUILD_DIR}/Hotel.o: ${DB_DIR}/Hotel.cpp ${DB_DIR}/Hotel.hpp ${DB_DIR}/Database.hpp ${ROOMS_DIR}/StandardRoom.hpp ${ROOMS_DIR}/DeluxeRoom.hpp ${ROOMS_DIR}/LuxuryRoom.hpp ${ROOMS_DIR}/PremiumRoom.hpp ${USER_DIR}/User.hpp ${EXCEPTION_DIR}/Exception.hpp | build_dir
${CC_EXEC} -c ${DB_DIR}/Hotel.cpp -o ${BUILD_DIR}/Hotel.o
${BUILD_DIR}/Room.o: ${ROOMS_DIR}/Room.cpp ${ROOMS_DIR}/Room.hpp ${DB_DIR}/Hotel.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${ROOMS_DIR}/Room.cpp -o ${BUILD_DIR}/Room.o
${BUILD_DIR}/StandardRoom.o: ${ROOMS_DIR}/StandardRoom.cpp ${ROOMS_DIR}/StandardRoom.hpp ${ROOMS_DIR}/Room.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${ROOMS_DIR}/StandardRoom.cpp -o ${BUILD_DIR}/StandardRoom.o
${BUILD_DIR}/DeluxeRoom.o: ${ROOMS_DIR}/DeluxeRoom.cpp ${ROOMS_DIR}/DeluxeRoom.hpp ${ROOMS_DIR}/Room.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${ROOMS_DIR}/DeluxeRoom.cpp -o ${BUILD_DIR}/DeluxeRoom.o
${BUILD_DIR}/PremiumRoom.o: ${ROOMS_DIR}/PremiumRoom.cpp ${ROOMS_DIR}/PremiumRoom.hpp ${ROOMS_DIR}/Room.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${ROOMS_DIR}/PremiumRoom.cpp -o ${BUILD_DIR}/PremiumRoom.o
${BUILD_DIR}/LuxuryRoom.o: ${ROOMS_DIR}/LuxuryRoom.cpp ${ROOMS_DIR}/LuxuryRoom.hpp ${ROOMS_DIR}/Room.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${ROOMS_DIR}/LuxuryRoom.cpp -o ${BUILD_DIR}/LuxuryRoom.o
${BUILD_DIR}/ReserveCase.o: ${USER_DIR}/ReserveCase.cpp ${USER_DIR}/ReserveCase.hpp ${USER_DIR}/User.hpp ConstNames.hpp | build_dir
${CC_EXEC} -c ${USER_DIR}/ReserveCase.cpp -o ${BUILD_DIR}/ReserveCase.o
${BUILD_DIR}/User.o: ${USER_DIR}/User.cpp ${USER_DIR}/User.hpp ${ROOMS_DIR}/Room.hpp ${FILTER_DIR}/CityFilter.hpp ${FILTER_DIR}/AvgPriceFilter.hpp ${FILTER_DIR}/AdvancedFilter.hpp ${FILTER_DIR}/StarRangeFilter.hpp ${FILTER_DIR}/DefaultAvgPriceFilter.hpp ${AI_DIR}/AI.hpp ${DB_DIR}/Rating.hpp | build_dir
${CC_EXEC} -c ${USER_DIR}/User.cpp -o ${BUILD_DIR}/User.o
${BUILD_DIR}/Filter.o: ${FILTER_DIR}/Filter.cpp ${FILTER_DIR}/Filter.hpp ${USER_DIR}/User.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/Filter.cpp -o ${BUILD_DIR}/Filter.o
${BUILD_DIR}/AdvancedFilter.o: ${FILTER_DIR}/AdvancedFilter.cpp ${FILTER_DIR}/AdvancedFilter.hpp ${FILTER_DIR}/Filter.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/AdvancedFilter.cpp -o ${BUILD_DIR}/AdvancedFilter.o
${BUILD_DIR}/CityFilter.o: ${FILTER_DIR}/CityFilter.cpp ${FILTER_DIR}/CityFilter.hpp ${FILTER_DIR}/Filter.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/CityFilter.cpp -o ${BUILD_DIR}/CityFilter.o
${BUILD_DIR}/AvgPriceFilter.o: ${FILTER_DIR}/AvgPriceFilter.cpp ${FILTER_DIR}/AvgPriceFilter.hpp ${FILTER_DIR}/Filter.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/AvgPriceFilter.cpp -o ${BUILD_DIR}/AvgPriceFilter.o
${BUILD_DIR}/Rating.o: ${DB_DIR}/Rating.cpp ${DB_DIR}/Rating.hpp ${USER_DIR}/User.hpp | build_dir
${CC_EXEC} -c ${DB_DIR}/Rating.cpp -o ${BUILD_DIR}/Rating.o
${BUILD_DIR}/Comment.o: ${DB_DIR}/Comment.cpp ${DB_DIR}/Comment.cpp ${USER_DIR}/User.hpp | build_dir
${CC_EXEC} -c ${DB_DIR}/Comment.cpp -o ${BUILD_DIR}/Comment.o
${BUILD_DIR}/API.o: ${API_DIR}/API.cpp ${API_DIR}/API.hpp ${ORM_DIR}/ObjectRelational.hpp ${RESULT_DIR}/Result.hpp | build_dir
${CC_EXEC} -c ${API_DIR}/API.cpp -o ${BUILD_DIR}/API.o
${BUILD_DIR}/ObjectRelational.o: ${ORM_DIR}/ObjectRelational.cpp ${ORM_DIR}/ObjectRelational.hpp ConstNames.hpp ${BACKEND_DIR}/Backend.hpp ${DB_DIR}/Comment.hpp ${RESULT_DIR}/Result.hpp | build_dir
${CC_EXEC} -c ${ORM_DIR}/ObjectRelational.cpp -o ${BUILD_DIR}/ObjectRelational.o
${BUILD_DIR}/UserInterface.o: ${USERINTERFACE_DIR}/UserInterface.cpp ${USERINTERFACE_DIR}/UserInterface.hpp ConstNames.hpp ${API_DIR}/API.hpp | build_dir
${CC_EXEC} -c ${USERINTERFACE_DIR}/UserInterface.cpp -o ${BUILD_DIR}/UserInterface.o
${BUILD_DIR}/Backend.o: ${BACKEND_DIR}/Backend.cpp ${BACKEND_DIR}/Backend.hpp ${ORM_DIR}/ObjectRelational.hpp ${USER_DIR}/User.hpp ${RESULT_DIR}/Result.hpp ${AI_DIR}/AI.hpp ${DB_DIR}/Rating.hpp | build_dir
${CC_EXEC} -c ${BACKEND_DIR}/Backend.cpp -o ${BUILD_DIR}/Backend.o
${BUILD_DIR}/Exception.o: ${EXCEPTION_DIR}/Exception.cpp ${EXCEPTION_DIR}/Exception.hpp | build_dir
${CC_EXEC} -c ${EXCEPTION_DIR}/Exception.cpp -o ${BUILD_DIR}/Exception.o
${BUILD_DIR}/StarRangeFilter.o: ${FILTER_DIR}/StarRangeFilter.cpp ${FILTER_DIR}/StarRangeFilter.hpp ${FILTER_DIR}/Filter.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/StarRangeFilter.cpp -o ${BUILD_DIR}/StarRangeFilter.o
${BUILD_DIR}/Result.o: ${RESULT_DIR}/Result.cpp ${RESULT_DIR}/Result.hpp ${API_DIR}/API.hpp ${USER_DIR}/ReserveCase.hpp ${DB_DIR}/Comment.hpp | build_dir
${CC_EXEC} -c ${RESULT_DIR}/Result.cpp -o ${BUILD_DIR}/Result.o
${BUILD_DIR}/DefaultAvgPriceFilter.o: ${FILTER_DIR}/DefaultAvgPriceFilter.cpp ${FILTER_DIR}/DefaultAvgPriceFilter.hpp ${FILTER_DIR}/Filter.hpp ${USER_DIR}/ReserveCase.hpp | build_dir
${CC_EXEC} -c ${FILTER_DIR}/DefaultAvgPriceFilter.cpp -o ${BUILD_DIR}/DefaultAvgPriceFilter.o
${BUILD_DIR}/AI.o: ${AI_DIR}/AI.cpp ${AI_DIR}/AI.hpp ${BACKEND_DIR}/Backend.hpp ${DB_DIR}/Rating.hpp | build_dir
${CC_EXEC} -c ${AI_DIR}/AI.cpp -o ${BUILD_DIR}/AI.o
build_dir:
mkdir -p ${BUILD_DIR}
clean:
rm -rf build *.out