From 1ebebc1c3d266266cd83848233eb1c10b5a81441 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 15 Apr 2022 21:40:56 +0200 Subject: [PATCH] Introduce compilation modes --- project.conf | 14 ++++++++++++++ src/project.conf | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/project.conf b/project.conf index a0e0ceb..9a90ef9 100644 --- a/project.conf +++ b/project.conf @@ -6,6 +6,20 @@ config=h,sh subdirs=data,doc,include,po,src,tests targets=tests dist=COPYING,Makefile,README.md,config.h,config.sh +mode=debug + +#modes +[mode::debug] +title=Debug + +[mode::release] +title=Release + +[mode::embedded-debug] +title=Debug (embedded) + +[mode::embedded-release] +title=Release (embedded) #targets [tests] diff --git a/src/project.conf b/src/project.conf index cef312c..a143e50 100644 --- a/src/project.conf +++ b/src/project.conf @@ -1,12 +1,25 @@ subdirs=controls targets=mixer cppflags_force=-I../include -#cppflags=-D EMBEDDED cflags_force=`pkg-config --cflags libDesktop` cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector ldflags_force=`pkg-config --libs libDesktop` -lintl -lm ldflags=-pie -Wl,-z,relro -Wl,-z,now dist=Makefile,common.h,control.h,mixer.h,window.h +mode=debug + +#modes +[mode::embedded-debug] +cppflags=-DEMBEDDED + +[mode::release] +cppflags_force=-DNDEBUG +cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector + +[mode::embedded-release] +cppflags_force=-DNDEBUG +cppflags=-DEMBEDDED +cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector #targets [mixer]