targets=clint.log,fixme.log,hayes,modems,oss,pdu,plugins,ussd,tests.log,xmllint.log
cppflags_force=-I ../include
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,clint.sh,fixme.sh,tests.sh,xmllint.sh

[clint.log]
type=script
script=./clint.sh
enabled=0
depends=clint.sh

[fixme.log]
type=script
script=./fixme.sh
enabled=0
depends=fixme.sh

[hayes]
type=binary
cflags=`pkg-config --cflags glib-2.0 libSystem`
ldflags=`pkg-config --libs glib-2.0 libSystem`
sources=hayes.c

[hayes.c]
depends=$(OBJDIR)../src/modems/hayes.o,../config.h

[modems]
type=binary
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -ldl
sources=modems.c

[oss]
type=binary
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -lossaudio
sources=oss.c

[oss.c]
depends=../src/plugins/oss.c

[pdu]
type=binary
cflags=`pkg-config --cflags glib-2.0 libSystem`
ldflags=`pkg-config --libs glib-2.0 libSystem`
sources=pdu.c

[pdu.c]
cppflags=-I ../src/modems
depends=$(OBJDIR)../src/modems/hayes.o

[plugins]
type=binary
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -ldl
sources=plugins.c

[tests.log]
type=script
script=./tests.sh
enabled=0
depends=$(OBJDIR)hayes,$(OBJDIR)modems,$(OBJDIR)pdu,$(OBJDIR)plugins,tests.sh,$(OBJDIR)ussd

[ussd]
type=binary
cflags=`pkg-config --cflags glib-2.0 libSystem`
ldflags=`pkg-config --libs glib-2.0 libSystem`
sources=ussd.c

[ussd.c]
cppflags=-I ../src/modems
depends=$(OBJDIR)../src/modems/hayes.o

[xmllint.log]
type=script
script=./xmllint.sh
enabled=0
depends=xmllint.sh
