|
|
@@ -1,75 +0,0 @@
|
|
|
-WARNINGS := -Wall -pedantic -pedantic-errors -Wextra -Wcast-align \
|
|
|
- -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion \
|
|
|
- -Wdisabled-optimization -Werror -Wfloat-equal -Wformat -Wformat=2 \
|
|
|
- -Wformat-nonliteral -Wformat-security -Wformat-y2k \
|
|
|
- -Wimport -Winit-self -Winline -Winvalid-pch \
|
|
|
- -Wunsafe-loop-optimizations -Wno-long-long -Wmissing-braces \
|
|
|
- -Wmissing-field-initializers -Wmissing-format-attribute \
|
|
|
- -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-declarations \
|
|
|
- -Wpacked -Wparentheses -Wpointer-arith \
|
|
|
- -Wredundant-decls -Wreturn-type \
|
|
|
- -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector \
|
|
|
- -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default \
|
|
|
- -Wswitch-enum -Wtrigraphs -Wuninitialized \
|
|
|
- -Wunknown-pragmas -Wunreachable-code -Wunused \
|
|
|
- -Wunused-function -Wunused-label -Wunused-parameter \
|
|
|
- -Wunused-value -Wunused-variable -Wvariadic-macros \
|
|
|
- -Wvolatile-register-var -Wwrite-strings
|
|
|
-
|
|
|
-CWARNINGS := $(WARNINGS) -Wimplicit
|
|
|
-CPPWARNINGS := $(WARNINGS)
|
|
|
-
|
|
|
-CFLAGS := $(CWARNINGS)
|
|
|
-CPPFLAGS := $(CPPWARNINGS)
|
|
|
-LDFLAGS :=
|
|
|
-
|
|
|
-HDRFILES :=
|
|
|
-SRCFILES :=
|
|
|
-TSTFILES :=
|
|
|
-
|
|
|
-BINARY :=
|
|
|
-
|
|
|
-DEPFILES := $(patsubst %.cpp,.%.d,$(SRCFILES))
|
|
|
-OBJFILES := $(patsubst %.cpp,%.o,$(SRCFILES))
|
|
|
-TSTFILES := $(patsubst %.h,%.cpp,$(TSTSUITE))
|
|
|
-TSTDRIVR := $(patsubst %.cpp,%,$(TSTFILES))
|
|
|
-
|
|
|
-ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)
|
|
|
-
|
|
|
-.PHONY: all clean debug release check coverage
|
|
|
-
|
|
|
-all: $(BINARY) $(LNBINARY)
|
|
|
-
|
|
|
-debug: CFLAGS += -DDEBUG -g
|
|
|
-debug: CPPFLAGS += -DDEBUG -g
|
|
|
-debug: all
|
|
|
-
|
|
|
-release: CFLAGS += -O2
|
|
|
-release: CPPFLAGS += -O2
|
|
|
-release: all
|
|
|
-
|
|
|
-coverage: CFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
-coverage: CPPFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
-coverage: check
|
|
|
-
|
|
|
-clean: check-clean
|
|
|
- @$(RM) $(BINARY) $(wildcard $(OBJFILES)) $(LNBINARY)
|
|
|
-
|
|
|
-check-clean:
|
|
|
- @$(RM) $(TSTDRIVR) $(TSTFILES)
|
|
|
-
|
|
|
-check: check-clean $(TSTDRIVR)
|
|
|
-
|
|
|
-.h.cpp:
|
|
|
- @cxxtestgen --error-printer $< -o $@
|
|
|
-
|
|
|
-.cpp.o: Makefile
|
|
|
- $(CXX) $(CPPFLAGS) -MMD -MP -MF $(patsubst %.cpp,.%.d,$<) -c $< -o $@
|
|
|
-
|
|
|
-$(BINARY): $(OBJFILES)
|
|
|
- $(CXX) $(LDFLAGS) -o $@ $(OBJFILES)
|
|
|
-
|
|
|
-$(TSTDRIVR): $(TSTFILES)
|
|
|
- @$(CXX) $(CPPFLAGS) -I$(CXXTEST) -w $@.cpp -o $@
|
|
|
- @echo Running TestDriver: ./$@
|
|
|
- @./$@
|