targets=configure,configure-update,pkg-config
cppflags_force=-D PREFIX=\"$(PREFIX)\"
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,configure-update.in

#modes
[mode::release]
cppflags_force=-DNDEBUG
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector

#targets
[configure]
type=binary
cflags=`pkg-config --cflags libSystem`
ldflags=`pkg-config --libs libSystem`
sources=configure.c

[configure-update]
type=script
script=../src/scripts/tools/subst.sh
depends=configure-update.in
install=$(BINDIR)

[pkg-config]
type=binary
sources=pkg-config.c
#install=$(BINDIR)

#sources
[configure.c]
depends=../src/common.c,../src/common.h,../src/configure.c,../src/configure.h,../src/main.c,../src/makefile.c,../src/makefile.h,../src/settings.c,../src/settings.h

[pkg-config.c]
depends=../config.h
