From 4d19d474dcbcc592121b84b1c4609bc1e2561c77 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 7 Oct 2024 00:16:08 +0200 Subject: [PATCH] notes: introduce compilation modes --- project.conf | 13 +++++++++++++ src/project.conf | 13 ++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/project.conf b/project.conf index 2812ff9..fa5188b 100644 --- a/project.conf +++ b/project.conf @@ -6,6 +6,19 @@ subdirs=data,doc,include,po,src,tests targets=tests dist=Makefile,COPYING,config.h,config.sh +#modes +[mode::debug] +title=Debug + +[mode::embedded-debug] +title=Debug (embedded UI) + +[mode::embedded-release] +title=Release (embedded UI) + +[mode::release] +title=Release + #targets [tests] type=command diff --git a/src/project.conf b/src/project.conf index 0a214b3..a912d24 100644 --- a/src/project.conf +++ b/src/project.conf @@ -1,12 +1,23 @@ targets=libNotes,notes cppflags_force=-I../include -#cppflags=-D EMBEDDED cflags_force=`pkg-config --cflags libDesktop` cflags=-W -Wall -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector ldflags_force=`pkg-config --libs libDesktop` -lintl ldflags=-pie -Wl,-z,relro -Wl,-z,now dist=Makefile,note.h,noteedit.h,notes.h,window.h +#modes +[mode::embedded-debug] +cppflags_force=-I../include -DEMBEDDED + +[mode::embedded-release] +cppflags_force=-I../include -DEMBEDDED -DNDEBUG +cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector + +[mode::release] +cppflags_force=-I../include -DNDEBUG +cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector + #targets [libNotes] type=library