Introduce support for compilation modes

This commit is contained in:
Pierre Pronchery 2021-09-29 11:05:43 +02:00
parent 2a2bd1d908
commit 5272d13c14

View File

@ -1,14 +1,31 @@
targets=compare,fontsel,progress
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags=-pie -Wl,-z,relro -Wl,-z,now
#for Gtk+ 2
#cflags_force=`pkg-config gtk+-2.0 --cflags`
#ldflags_force=`pkg-config gtk+-2.0 --libs`
#for Gtk+ 3
cflags_force=-W `pkg-config gtk+-3.0 --cflags`
ldflags_force=`pkg-config gtk+-3.0 --libs`
dist=Makefile
mode=gtk3-debug
#modes
[mode::gtk2-debug]
cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
[mode::gtk2-release]
cppflags_force=-I ../include -DNDEBUG
cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
[mode::gtk3-debug]
cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC
ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
[mode::gtk3-release]
cppflags_force=-I ../include -DNDEBUG
cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
#targets
[compare]
type=binary
sources=compare.c