blob: b0c8c8be534578a7f4e1216422362b59ca66b99f [file] [log] [blame]
Tomas Cejkade321aa2013-11-14 22:10:59 +01001SRCS=mod_netconf.c \
Tomas Cejka55b63df2013-11-16 01:21:42 +01002 notification-server.c
Tomas Cejkade321aa2013-11-14 22:10:59 +01003
4HDRS=message_type.h \
5 notification_module.h \
6 mod_netconf.h
7
Tomas Cejka55b63df2013-11-16 01:21:42 +01008noinst_PROGRAMS=webgui-backend test-client
9webgui_backend_SOURCES=mod_netconf.c notification-server.c message_type.h notification_module.h mod_netconf.h
10test_client_SOURCES=test-client.c
Tomas Cejkade321aa2013-11-14 22:10:59 +010011
Tomas Cejka55b63df2013-11-16 01:21:42 +010012EXTRA_DIST=$(SRCS) $(HDRS)
Tomas Cejkade321aa2013-11-14 22:10:59 +010013
Tomas Cejka55b63df2013-11-16 01:21:42 +010014dist-hook:
15 cp $(SRC) $(HDRS) $(distdir)
Tomas Cejkade321aa2013-11-14 22:10:59 +010016
Tomas Cejka55b63df2013-11-16 01:21:42 +010017all: mod_netconf.so test-client webgui-backend
Tomas Cejkade321aa2013-11-14 22:10:59 +010018
Tomas Cejka55b63df2013-11-16 01:21:42 +010019mod_netconf.so: mod_netconf.c notification-server.c
20 $(APXS) $(LIBS) $(CFLAGS) -c -o $@ $(srcdir)/mod_netconf.c $(srcdir)/notification-server.c
Tomas Cejkade321aa2013-11-14 22:10:59 +010021
Tomas Cejka55b63df2013-11-16 01:21:42 +010022test-client$(EXEEXT): test-client.c
23 gcc -std=gnu99 -Wall -g -ljson -I/usr/include/json -o $@ $<
24
25#notification-test$(EXEEXT): notification-server.c
26# gcc -std=gnu99 -Wall -g -lwebsockets -DTEST_NOTIFICATION_SERVER -o $@ $<
27
28install-exec-local: mod_netconf.so
29 [ "x$(httpdmoduledir)" != x ] || \
30 $(APXS) -i -a mod_netconf.la && \
31 { mkdir -p "$(httpdmoduledir)"; $(APXS) -i -S LIBEXECDIR="$(httpdmoduledir)" -a mod_netconf.la; }
32
33webgui-backend$(EXEEXT): mod_netconf.c notification-server.c mod_netconf.h
34 gcc -Wall -g @SAVED_CFLAGS@ -DHTTPD_INDEPENDENT `apr-1-config --cflags --cppflags --includes --link-ld` -I/usr/include/httpd @SAVED_LIBS@ -laprutil-1 -o $@ $(srcdir)/mod_netconf.c $(srcdir)/notification-server.c
Tomas Cejkade321aa2013-11-14 22:10:59 +010035
36clean-local:
37 rm -rf .libs *.la *.lo *.slo test-client webgui-backend
38
Tomas Cejka55b63df2013-11-16 01:21:42 +010039distclean-local:
40 rm -rf $(RPMDIR)
Tomas Cejkade321aa2013-11-14 22:10:59 +010041