diff --git a/.gitignore b/.gitignore index 2b13fc4..e175c2e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ planning/* .tup/* src/*.o luppp + +testBuild/* +releaseBuild/* diff --git a/Tupfile b/Tupfile index a5a3491..952412b 100644 --- a/Tupfile +++ b/Tupfile @@ -1,5 +1,8 @@ LDFLAGS +=`pkg-config --libs jack sndfile cairomm-1.0 ntk ntk_images` + +ifeq (@(LUPPP_BUILD_TESTS),y) LDFLAGS +=-lgcov +endif : src/*.o |> g++ %f $(LDFLAGS) -o %o |> luppp diff --git a/src/Tupfile b/src/Tupfile index d0cfdfc..c3790c7 100644 --- a/src/Tupfile +++ b/src/Tupfile @@ -1,10 +1,18 @@ # Tup build file for Luppp # -CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math -fprofile-arcs -ftest-coverage +CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math + +OUTPUT = %B.o INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images` -: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx \ -avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o | %B.gcno +ifeq (@(LUPPP_BUILD_TESTS),y) +CFLAGS += -fprofile-arcs -ftest-coverage -DBUILD_TESTS -DBUILD_COVERAGE_TEST -DDEBUG_KILL_ON_ERR +OUTPUT += | %B.gcno +endif + + +: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx \ +avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) diff --git a/src/config.hxx b/src/config.hxx index 28a6bfc..af975dd 100644 --- a/src/config.hxx +++ b/src/config.hxx @@ -2,16 +2,12 @@ #ifndef LUPPP_CONFIG_H #define LUPPP_CONFIG_H + /// PROGAM WIDE DEFINES #define NAME "Luppp" -/// TEST OPTIONS -#define BUILD_TESTS 1 -// only works with BUILD TESTS -#define BUILD_COVERAGE_TEST 1 - -/// DEBUG OPTIONS +/// DEBUG // Track operations #define DEBUG_TRACKS 1 @@ -28,11 +24,7 @@ #define DEBUG_STATE 1 -/// COMPILE OPTIONS -#define DEBUG_KILL_ON_ERR 1 - - -/// General Options +/// GENERAL #define NTRACKS 8 #define NSCENES 10 #define MAX_BUFFER_SIZE 1024 @@ -43,5 +35,7 @@ /// include debug.hxx for printing convienience #include "debug.hxx" + + #endif // LUPPP_CONFIG_H