7 targets = afb-daemon-cov afb-client hi3.so hello.so salut.so salam.so shalom.so demat.so bug.so
12 @rm $(targets) *.gcno *.gcda
14 #======================================================================================
16 #======================================================================================
18 incdir = $(basedir)/include
19 srcdir = $(basedir)/src
20 samdir = $(basedir)/bindings/samples
22 bindir = $(heredir)/bin
24 cflags = -I$(incdir) \
25 $(shell pkg-config --cflags --libs openssl libmicrohttpd json-c libsystemd uuid) \
28 afb_lib_src = $(shell ls $(srcdir)/*.c | egrep -v '/afs-|/main-|-fake' )
29 afb_clib_src = $(shell ls $(srcdir)/*.c | egrep -v '/afs-|/main-|-fake' )
31 afb_daemon_srcs = $(srcdir)/main-afb-daemon.c $(afb_lib_src)
32 afb_daemon_defs = '-DAFB_VERSION="cov"' -DAGL_DEVEL -DWITH_MONITORING_OPTION '-DBINDING_INSTALL_DIR="fake"'
34 afb_client_srcs = $(srcdir)/main-afb-client-demo.c $(afb_clib_src)
35 afb_client_defs = '-DAFB_VERSION="cov"' '-DBINDING_INSTALL_DIR="fake"'
37 hello3_src = $(samdir)/hello3.c
38 hi_src = $(samdir)/hi3.c
39 binding_flags = -shared -fPIC -Wl,--version-script=$(samdir)/export.map
41 afb-daemon-cov: $(afb_daemon_srcs)
43 @gcc -o $@ $(afb_daemon_srcs) --coverage $(afb_daemon_defs) $(cflags)
45 afb-client: $(afb_client_srcs)
47 @gcc -o $@ $(afb_client_srcs) $(afb_client_defs) $(cflags)
51 @gcc -o $@ $(hi3_src) $(binding_flags) $(cflags)
53 hello.so: $(hello3_src)
55 @gcc -o $@ $(hello3_src) '-DAPINAME="hello"' $(binding_flags) $(cflags)
57 salut.so: $(hello3_src)
59 @gcc -o $@ $(hello3_src) '-DAPINAME="salut"' $(binding_flags) $(cflags)
61 salam.so: $(hello3_src)
63 @gcc -o $@ $(hello3_src) '-DAPINAME="salam"' $(binding_flags) $(cflags)
65 shalom.so: $(hello3_src)
67 @gcc -o $@ $(hello3_src) '-DAPINAME="shalom"' $(binding_flags) $(cflags)
69 demat.so: $(hello3_src)
71 @gcc -o $@ $(hello3_src) '-DAPINAME="demat"' $(binding_flags) $(cflags)
75 @gcc -o $@ bug.c $(binding_flags) $(cflags)