project.conf: register the compilation modes

This commit is contained in:
Pierre Pronchery 2022-07-11 05:24:47 +02:00
parent eb365e3132
commit 4315189049
8 changed files with 101 additions and 8 deletions

View File

@ -7,6 +7,19 @@ subdirs=data,doc,include,po,src/lib,src,src/plugins,src/widget,tests,tools
targets=tests targets=tests
dist=Makefile,COPYING,README.md,TODO,config.ent,config.h,config.sh dist=Makefile,COPYING,README.md,TODO,config.ent,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 #targets
[tests] [tests]
type=command type=command

View File

@ -1,12 +1,23 @@
targets=browser targets=browser
cppflags_force=-I../../include cppflags_force=-I../../include
#cppflags=-D EMBEDDED
cflags_force=`pkg-config --cflags libDesktop` cflags_force=`pkg-config --cflags libDesktop`
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libDesktop` -lintl -L$(OBJDIR)../lib -Wl,-rpath,$(PREFIX)/lib -lBrowser ldflags_force=`pkg-config --libs libDesktop` -lintl -L$(OBJDIR)../lib -Wl,-rpath,$(PREFIX)/lib -lBrowser
ldflags=-pie -Wl,-z,relro -Wl,-z,now ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,browser.h,callbacks.h,window.h dist=Makefile,browser.h,callbacks.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 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-I../../include -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
#targets #targets
[browser] [browser]
type=binary type=binary

View File

@ -1,12 +1,23 @@
targets=desktop,desktopctl,handler/mimeapp.o targets=desktop,desktopctl,handler/mimeapp.o
cppflags_force=-I../../include cppflags_force=-I../../include
#cppflags=-D EMBEDDED
cflags_force=`pkg-config --cflags libDesktop` cflags_force=`pkg-config --cflags libDesktop`
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libDesktop` -lintl ldflags_force=`pkg-config --libs libDesktop` -lintl
ldflags=-pie -Wl,-z,relro -Wl,-z,now ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,desktop.h,desktopicon.h,desktopiconwindow.h,handler.h,handler/applications.c,handler/categories.c,handler/files.c,handler/homescreen.c,handler/mimeapp.h dist=Makefile,desktop.h,desktopicon.h,desktopiconwindow.h,handler.h,handler/applications.c,handler/categories.c,handler/files.c,handler/homescreen.c,handler/mimeapp.h
#modes
[mode::embedded-debug]
cppflags_force=-I../../include -DEMBEDDED
[mode::embedded-release]
cppflags_force=-I../../include -DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-I../../include -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
#targets #targets
[desktop] [desktop]
type=binary type=binary

View File

@ -5,6 +5,18 @@ ldflags_force=`pkg-config --libs libDesktop` -lintl
ldflags=-Wl,-z,relro -Wl,-z,now ldflags=-Wl,-z,relro -Wl,-z,now
dist=Makefile dist=Makefile
#modes
[mode::embedded-debug]
cppflags_force=-DEMBEDDED
[mode::embedded-release]
cppflags_force=-DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-DNDEBUG
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
#targets #targets
[libBrowser] [libBrowser]
type=library type=library

View File

@ -1,12 +1,24 @@
targets=backup,cvs,dirtree,favorites,git,make,places,preview,properties,selection,subversion,template,trash,undelete,volumes targets=backup,cvs,dirtree,favorites,git,make,places,preview,properties,selection,subversion,template,trash,undelete,volumes
cppflags_force=-I../../include cppflags_force=-I../../include
cppflags=
cflags_force=`pkg-config --cflags libDesktop` -fPIC cflags_force=`pkg-config --cflags libDesktop` -fPIC
cflags=-W -Wall -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector cflags=-W -Wall -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libDesktop` ldflags_force=`pkg-config --libs libDesktop`
ldflags=-Wl,-z,relro -Wl,-z,now ldflags=-Wl,-z,relro -Wl,-z,now
dist=Makefile,common.c dist=Makefile,common.c
#modes
[mode::embedded-debug]
cppflags_force=-DEMBEDDED
[mode::embedded-release]
cppflags_force=-DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-DNDEBUG
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
#targets
[backup] [backup]
type=plugin type=plugin
sources=backup.c sources=backup.c

View File

@ -1,17 +1,28 @@
subdirs=browser,desktop subdirs=browser,desktop
targets=copy,delete,move,open,properties,view targets=copy,delete,move,open,properties,view
cppflags_force=-I../include cppflags_force=-I../include
#cppflags=-D EMBEDDED
cflags_force=`pkg-config --cflags libDesktop` cflags_force=`pkg-config --cflags libDesktop`
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libDesktop` -lintl ldflags_force=`pkg-config --libs libDesktop` -lintl
ldflags=-pie -Wl,-z,relro -Wl,-z,now ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,common.c,common.h dist=Makefile,common.c,common.h
#modes
[mode::embedded-debug]
cppflags_force=-I../include -DEMBEDDED
[mode::embedded-release]
cppflags_force=-I../include -DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-I../include -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
#targets
[copy] [copy]
type=binary type=binary
sources=copy.c sources=copy.c
cppflags=-I../include
ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser
depends=$(OBJDIR)lib/libBrowser.a depends=$(OBJDIR)lib/libBrowser.a
install=$(BINDIR) install=$(BINDIR)
@ -22,7 +33,6 @@ depends=../include/Browser/vfs.h
[delete] [delete]
type=binary type=binary
sources=delete.c sources=delete.c
cppflags=-I../include
ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser
depends=$(OBJDIR)lib/libBrowser.a depends=$(OBJDIR)lib/libBrowser.a
install=$(BINDIR) install=$(BINDIR)
@ -33,7 +43,6 @@ depends=../include/Browser/vfs.h
[move] [move]
type=binary type=binary
sources=move.c sources=move.c
cppflags=-I../include
ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser ldflags=-L$(OBJDIR)lib -Wl,-rpath,$(PREFIX)/lib -lBrowser
depends=$(OBJDIR)lib/libBrowser.a depends=$(OBJDIR)lib/libBrowser.a
install=$(BINDIR) install=$(BINDIR)

View File

@ -6,6 +6,18 @@ ldflags_force=`pkg-config --libs libDesktop`
ldflags=-pie -Wl,-z,relro -Wl,-z,now ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,clint.sh,embedded.sh,fixme.sh,htmllint.sh,pkgconfig.sh,tests.sh,xmllint.sh dist=Makefile,clint.sh,embedded.sh,fixme.sh,htmllint.sh,pkgconfig.sh,tests.sh,xmllint.sh
#modes
[mode::embedded-debug]
cppflags_force=-DEMBEDDED
[mode::embedded-release]
cppflags_force=-DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
#targets #targets
[clint.log] [clint.log]
type=script type=script

View File

@ -5,6 +5,19 @@ ldflags_force=`pkg-config --libs libDesktop`
ldflags=-pie -Wl,-z,relro -Wl,-z,now ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,subst.sh dist=Makefile,subst.sh
#modes
[mode::embedded-debug]
cppflags_force=-DEMBEDDED
[mode::embedded-release]
cppflags_force=-DEMBEDDED -DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
[mode::release]
cppflags_force=-DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
#targets
[dirtree] [dirtree]
type=binary type=binary
sources=dirtree.c sources=dirtree.c