File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 1- CC =g++
2- # CFLAGS = -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)"
3- CFLAGS = -O0 -g3 -Wall
1+ CXX =g++
2+ # CXXFLAGS = -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)"
3+ # If run as DEBUG=1 make, it adds these flags, otherwise it simply uses flags from the environment
4+ ifeq ($(DEBUG ) , 1)
5+ CXXFLAGS := $(CXXFLAGS) -O0 -g3 -Wall -fmessage-length=0
6+ endif
47
5- SRCS = ./sources/Archive.cpp ./sources/Attribute.cpp ./sources/DESolver.cpp ./sources/Evaluate.cpp ./sources/Feature.cpp ./sources/Problem.cpp ./sources/Rule.cpp ./sources/Setup.cpp ./sources/uARMSolver.cpp
8+ SRCS = ./sources/Archive.cpp ./sources/Attribute.cpp ./sources/DESolver.cpp ./sources/Evaluate.cpp ./sources/Feature.cpp ./sources/Problem.cpp ./sources/Rule.cpp ./sources/Setup.cpp ./sources/uARMSolver.cpp
69
7- DEPS = ./Archive.d ./Attribute.d ./DESolver.d ./Evaluate.d ./Feature.d ./Problem.d ./Rule.d ./Setup.d ./uARMSolver.d
10+ DEPS = ./Archive.d ./Attribute.d ./DESolver.d ./Evaluate.d ./Feature.d ./Problem.d ./Rule.d ./Setup.d ./uARMSolver.d
811
9- OBJS = ./Archive.o ./Attribute.o ./DESolver.o ./Evaluate.o ./Feature.o ./Problem.o ./Rule.o ./Setup.o ./uARMSolver.o
12+ OBJS = ./Archive.o ./Attribute.o ./DESolver.o ./Evaluate.o ./Feature.o ./Problem.o ./Rule.o ./Setup.o ./uARMSolver.o
1013
1114all : bin/uARMSolver
1215
1316bin/uARMSolver : $(OBJS )
1417 @echo ' Invoking: GCC C++ Linker'
15- $(CC ) -o $@ $^
18+ $(CXX ) $( LDFLAGS ) -o $@ $^
1619 @echo ' Finished building: $<'
1720 rm -fr $(OBJS ) $(DEPS )
1821
19- % .o : ./sources/% .cpp
22+ % .o : ./sources/% .cpp
2023 @echo ' Invoking: GCC C++ Compiler'
21- $(CC ) -I./sources -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF" $( @:%.o=%.d) " -MT" $( @) " -o " $@ " " $<"
24+ $(CXX ) -I./sources $( CXXFLAGS ) -c -MMD -MP -MF" $( @:%.o=%.d) " -MT" $( @) " -o " $@ " " $<"
2225 @echo ' Finished building: $<'
2326
2427clean :
You can’t perform that action at this time.
0 commit comments