97 |
cycrow |
1 |
# Compiler flags...
|
|
|
2 |
CPP_COMPILER = g++
|
|
|
3 |
C_COMPILER = gcc
|
|
|
4 |
|
|
|
5 |
# Include paths...
|
|
|
6 |
Debug_Include_Path=-I"../../libspk/src"
|
|
|
7 |
Release_Include_Path=-I"../../libspk/src"
|
|
|
8 |
|
|
|
9 |
# Library paths...
|
|
|
10 |
Debug_Library_Path=
|
|
|
11 |
Release_Library_Path=
|
|
|
12 |
|
|
|
13 |
# Additional libraries...
|
|
|
14 |
Debug_Libraries=-Wl,--start-group -l$(NOINHERIT) -Wl,--end-group
|
|
|
15 |
Release_Libraries=-Wl,--start-group -l$(NOINHERIT) -Wl,--end-group
|
|
|
16 |
|
|
|
17 |
# Preprocessor definitions...
|
|
|
18 |
Debug_Preprocessor_Definitions=-D GCC_BUILD -D _DEBUG -D _CONSOLE -D _CRT_SECURE_NO_WARNINGS
|
|
|
19 |
Release_Preprocessor_Definitions=-D GCC_BUILD -D NDEBUG -D _CONSOLE -D _CRT_SECURE_NO_WARNINGS
|
|
|
20 |
|
|
|
21 |
# Implictly linked object files...
|
|
|
22 |
Debug_Implicitly_Linked_Objects=
|
|
|
23 |
Release_Implicitly_Linked_Objects=
|
|
|
24 |
|
|
|
25 |
# Compiler flags...
|
|
|
26 |
Debug_Compiler_Flags=-O0 -g
|
|
|
27 |
Release_Compiler_Flags=-O2
|
|
|
28 |
|
|
|
29 |
# Builds all configurations for this project...
|
|
|
30 |
.PHONY: build_all_configurations
|
|
|
31 |
build_all_configurations: Debug Release
|
|
|
32 |
|
|
|
33 |
# Builds the Debug configuration...
|
|
|
34 |
.PHONY: Debug
|
|
|
35 |
Debug: create_folders ../../Windows/Debug/gcccatpck/../src/catpck.o
|
|
|
36 |
g++ ../../Windows/Debug/gcccatpck/../src/catpck.o $(Debug_Library_Path) $(Debug_Libraries) -Wl,-rpath,./ -o ../../Windows/gccDebug/catpck.exe
|
|
|
37 |
|
|
|
38 |
# Compiles file ../src/catpck.cpp for the Debug configuration...
|
|
|
39 |
-include ../../Windows/Debug/gcccatpck/../src/catpck.d
|
|
|
40 |
../../Windows/Debug/gcccatpck/../src/catpck.o: ../src/catpck.cpp
|
|
|
41 |
$(CPP_COMPILER) $(Debug_Preprocessor_Definitions) $(Debug_Compiler_Flags) -c ../src/catpck.cpp $(Debug_Include_Path) -o ../../Windows/Debug/gcccatpck/../src/catpck.o
|
|
|
42 |
$(CPP_COMPILER) $(Debug_Preprocessor_Definitions) $(Debug_Compiler_Flags) -MM ../src/catpck.cpp $(Debug_Include_Path) > ../../Windows/Debug/gcccatpck/../src/catpck.d
|
|
|
43 |
|
|
|
44 |
# Builds the Release configuration...
|
|
|
45 |
.PHONY: Release
|
|
|
46 |
Release: create_folders ../../Windows/Release/gcccatpck/../src/catpck.o
|
|
|
47 |
g++ ../../Windows/Release/gcccatpck/../src/catpck.o $(Release_Library_Path) $(Release_Libraries) -Wl,-rpath,./ -o ../../Windows/gccRelease/catpck.exe
|
|
|
48 |
|
|
|
49 |
# Compiles file ../src/catpck.cpp for the Release configuration...
|
|
|
50 |
-include ../../Windows/Release/gcccatpck/../src/catpck.d
|
|
|
51 |
../../Windows/Release/gcccatpck/../src/catpck.o: ../src/catpck.cpp
|
|
|
52 |
$(CPP_COMPILER) $(Release_Preprocessor_Definitions) $(Release_Compiler_Flags) -c ../src/catpck.cpp $(Release_Include_Path) -o ../../Windows/Release/gcccatpck/../src/catpck.o
|
|
|
53 |
$(CPP_COMPILER) $(Release_Preprocessor_Definitions) $(Release_Compiler_Flags) -MM ../src/catpck.cpp $(Release_Include_Path) > ../../Windows/Release/gcccatpck/../src/catpck.d
|
|
|
54 |
|
|
|
55 |
# Creates the intermediate and output folders for each configuration...
|
|
|
56 |
.PHONY: create_folders
|
|
|
57 |
create_folders:
|
|
|
58 |
mkdir -p ../../Windows/Debug/gcccatpck/source
|
|
|
59 |
mkdir -p ../../Windows/gccDebug
|
|
|
60 |
mkdir -p ../../Windows/Release/gcccatpck/source
|
|
|
61 |
mkdir -p ../../Windows/gccRelease
|
|
|
62 |
|
|
|
63 |
# Cleans intermediate and output files (objects, libraries, executables)...
|
|
|
64 |
.PHONY: clean
|
|
|
65 |
clean:
|
|
|
66 |
rm -f ../../Windows/Debug/gcccatpck/*.o
|
|
|
67 |
rm -f ../../Windows/Debug/gcccatpck/*.d
|
|
|
68 |
rm -f ../../Windows/gccDebug/*.a
|
|
|
69 |
rm -f ../../Windows/gccDebug/*.so
|
|
|
70 |
rm -f ../../Windows/gccDebug/*.dll
|
|
|
71 |
rm -f ../../Windows/gccDebug/*.exe
|
|
|
72 |
rm -f ../../Windows/Release/gcccatpck/*.o
|
|
|
73 |
rm -f ../../Windows/Release/gcccatpck/*.d
|
|
|
74 |
rm -f ../../Windows/gccRelease/*.a
|
|
|
75 |
rm -f ../../Windows/gccRelease/*.so
|
|
|
76 |
rm -f ../../Windows/gccRelease/*.dll
|
|
|
77 |
rm -f ../../Windows/gccRelease/*.exe
|
|
|
78 |
|