saha -> salam: To continue using hello
[src/app-framework-binder.git] / coverage / bin / Makefile
1
2 .PHONY: clean binaries
3
4 heredir = .
5 basedir = ../..
6
7 targets = afb-daemon-cov  afb-client hi3.so hello.so salut.so salam.so shalom.so demat.so bug.so
8
9 binaries: $(targets)
10
11 clean:
12         @rm $(targets) *.gcno *.gcda
13
14 #======================================================================================
15 # creates the targets
16 #======================================================================================
17
18 incdir = $(basedir)/include
19 srcdir = $(basedir)/src
20 samdir = $(basedir)/bindings/samples
21
22 bindir = $(heredir)/bin
23
24 cflags = -I$(incdir) \
25         $(shell pkg-config --cflags --libs openssl libmicrohttpd json-c libsystemd uuid) \
26         -ldl -lrt -lpthread 
27
28 afb_lib_src = $(shell ls $(srcdir)/*.c | egrep -v '/afs-|/main-|-so-v1|-so-vdyn|-fake|-api-dbus|-api-v1' )
29 afb_clib_src = $(shell ls $(srcdir)/*.c | egrep -v '/afs-|/main-|-so-v1|-so-vdyn|-fake|-api-dbus|-api-v1|afb-supervision' )
30
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"'
33
34 afb_client_srcs = $(srcdir)/main-afb-client-demo.c $(afb_clib_src)
35 afb_client_defs = '-DAFB_VERSION="cov"' '-DBINDING_INSTALL_DIR="fake"'
36
37 hello3_src = $(samdir)/hello3.c
38 hi_src = $(samdir)/hi3.c
39 binding_flags = -shared -fPIC -Wl,--version-script=$(samdir)/export.map
40
41 afb-daemon-cov: $(afb_daemon_srcs)
42         @echo creation of $@
43         @gcc -o $@ $(afb_daemon_srcs) --coverage $(afb_daemon_defs) $(cflags)
44
45 afb-client: $(afb_client_srcs)
46         @echo creation of $@
47         @gcc -o $@ $(afb_client_srcs) $(afb_client_defs) $(cflags)
48
49 hi3.so: $(hi3_src)
50         @echo creation of $@
51         @gcc -o $@ $(hi3_src) $(binding_flags) $(cflags)
52
53 hello.so: $(hello3_src)
54         @echo creation of $@
55         @gcc -o $@ $(hello3_src) '-DAPINAME="hello"' $(binding_flags) $(cflags)
56
57 salut.so: $(hello3_src)
58         @echo creation of $@
59         @gcc -o $@ $(hello3_src) '-DAPINAME="salut"' $(binding_flags) $(cflags)
60
61 salam.so: $(hello3_src)
62         @echo creation of $@
63         @gcc -o $@ $(hello3_src) '-DAPINAME="salam"' $(binding_flags) $(cflags)
64
65 shalom.so: $(hello3_src)
66         @echo creation of $@
67         @gcc -o $@ $(hello3_src) '-DAPINAME="shalom"' $(binding_flags) $(cflags)
68
69 demat.so: $(hello3_src)
70         @echo creation of $@
71         @gcc -o $@ $(hello3_src) '-DAPINAME="demat"' $(binding_flags) $(cflags)
72
73 bug.so: bug.c
74         @echo creation of $@
75         @gcc -o $@ bug.c $(binding_flags) $(cflags)
76