Ease compilation with the backend for Salt

This commit is contained in:
Pierre Pronchery 2016-02-06 18:11:33 +01:00
parent d09021a16a
commit cdb65b9fc2
2 changed files with 13 additions and 8 deletions

View File

@ -15,4 +15,8 @@
#include "damon-backend-app.c"
#ifdef DAMON_BACKEND_SALT
# include "damon-backend-salt.c"
#else
# include "damon-backend-app.c"
#endif

View File

@ -1,12 +1,6 @@
targets=../data/Probe.h,Probe,DaMon
cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
ldflags=-Wl,-pie -Wl,-z,relro -Wl,-z,now
#for App
cflags_force=`pkg-config --cflags libApp`
ldflags_force=`pkg-config --libs libApp`
#for Salt
#cflags_force=`pkg-config --cflags libApp jansson`
#ldflags_force=`pkg-config --libs libApp jansson`
dist=Makefile,appbroker.sh,damon.h,damon-backend-app.c,damon-backend-salt.c,rrd.h
[../data/Probe.h]
@ -16,12 +10,19 @@ depends=../data/Probe.interface
[Probe]
type=binary
cflags=`pkg-config --cflags libApp`
ldflags=`pkg-config --libs libApp` -Wl,--export-dynamic
sources=probe.c
ldflags=-Wl,--export-dynamic
install=$(BINDIR)
[DaMon]
type=binary
#for App
cflags=`pkg-config --cflags libApp`
ldflags=`pkg-config --libs libApp`
#for Salt
#cflags_force=-D DAMON_BACKEND_SALT `pkg-config --cflags libApp jansson`
#ldflags_force=`pkg-config --libs libApp jansson`
sources=damon.c,damon-backend.c,damon-main.c,rrd.c
install=$(BINDIR)