Mercurial > hg > beaglert
comparison Makefile @ 209:5f53b838b742
Updated Makefile to include debug mode (make debug)
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 08 Feb 2016 22:50:39 +0000 |
parents | c3a34eaef0cf |
children | c0bf6157f67e |
comparison
equal
deleted
inserted
replaced
208:35fc8bfc240b | 209:5f53b838b742 |
---|---|
34 # only wants to provide the render functions. | 34 # only wants to provide the render functions. |
35 DEFAULT_MAIN_CPP_SRCS := ./core/default_main.cpp | 35 DEFAULT_MAIN_CPP_SRCS := ./core/default_main.cpp |
36 DEFAULT_MAIN_OBJS := ./build/core/default_main.o | 36 DEFAULT_MAIN_OBJS := ./build/core/default_main.o |
37 DEFAULT_MAIN_CPP_DEPS := ./build/core/default_main.d | 37 DEFAULT_MAIN_CPP_DEPS := ./build/core/default_main.d |
38 | 38 |
39 # All = build BeagleRT | 39 CPP_FLAGS=-O2 |
40 C_FLAGS=-O2 | |
41 | |
42 # all = build BeagleRT | |
40 all: SYNTAX_FLAG := | 43 all: SYNTAX_FLAG := |
41 all: BeagleRT | 44 all: BeagleRT |
45 | |
46 # debug = buildBeagleRT debug | |
47 debug: CPP_FLAGS=-g | |
48 debug: C_FLAGS=-g | |
49 debug: all | |
42 | 50 |
43 # syntax = check syntax | 51 # syntax = check syntax |
44 syntax: SYNTAX_FLAG := -fsyntax-only | 52 syntax: SYNTAX_FLAG := -fsyntax-only |
45 syntax: BeagleRT | 53 syntax: BeagleRT |
46 | 54 |
47 # Rule for BeagleRT core C++ files | 55 # Rule for BeagleRT core C++ files |
48 build/core/%.o: ./core/%.cpp | 56 build/core/%.o: ./core/%.cpp |
49 @echo 'Building file: $<' | 57 @echo 'Building file: $<' |
50 @echo 'Invoking: GCC C++ Compiler' | 58 @echo 'Invoking: GCC C++ Compiler' |
51 g++ $(SYNTAX_FLAG) $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" | 59 g++ $(SYNTAX_FLAG) $(INCLUDES) $(CPP_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" |
52 @echo 'Finished building: $<' | 60 @echo 'Finished building: $<' |
53 @echo ' ' | 61 @echo ' ' |
54 | 62 |
55 # Rule for user-supplied C++ files | 63 # Rule for user-supplied C++ files |
56 build/source/%.o: ./source/%.cpp | 64 build/source/%.o: ./source/%.cpp |
57 @echo 'Building file: $<' | 65 @echo 'Building file: $<' |
58 @echo 'Invoking: GCC C++ Compiler' | 66 @echo 'Invoking: GCC C++ Compiler' |
59 g++ $(SYNTAX_FLAG) $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" | 67 g++ $(SYNTAX_FLAG) $(INCLUDES) $(CPP_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" |
60 @echo 'Finished building: $<' | 68 @echo 'Finished building: $<' |
61 @echo ' ' | 69 @echo ' ' |
62 | 70 |
63 # Rule for user-supplied C files | 71 # Rule for user-supplied C files |
64 build/source/%.o: ./source/%.c | 72 build/source/%.o: ./source/%.c |
65 @echo 'Building file: $<' | 73 @echo 'Building file: $<' |
66 @echo 'Invoking: GCC C Compiler' | 74 @echo 'Invoking: GCC C Compiler' |
67 gcc $(SYNTAX_FLAG) $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -std=c99 -mfpu=neon | 75 gcc $(SYNTAX_FLAG) $(INCLUDES) $(C_FLAGS) -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -std=c99 -mfpu=neon |
68 @echo 'Finished building: $<' | 76 @echo 'Finished building: $<' |
69 @echo ' ' | 77 @echo ' ' |
70 | 78 |
71 # Rule for user-supplied assembly files | 79 # Rule for user-supplied assembly files |
72 build/source/%.o: ./source/%.S | 80 build/source/%.o: ./source/%.S |
118 -@echo ' ' | 126 -@echo ' ' |
119 | 127 |
120 post-build: | 128 post-build: |
121 # Nothing to do here (for now) | 129 # Nothing to do here (for now) |
122 | 130 |
123 .PHONY: all clean distclean sourceclean dependents | 131 .PHONY: all clean distclean sourceclean dependents debug |
124 .SECONDARY: post-build | 132 .SECONDARY: post-build |