blob: 6f03b35bc34135121428a0ea3d301f91ea2ae84f [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 Cejka5b0e4752014-03-20 15:58:04 +010022#test-client$(EXEEXT): test-client.c
23# gcc -std=gnu99 -Wall -g -ljson -I/usr/include/json -o $@ $<
Tomas Cejka55b63df2013-11-16 01:21:42 +010024
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
Tomas Cejka5b0e4752014-03-20 15:58:04 +010029 if [ "x${httpdmoduledir}" == x ]; then \
30 $(APXS) -i -a mod_netconf.la; else \
31 { \
32 mkdir -p "${httpdmoduledir}"; \
33 $(APXS) -i -S LIBEXECDIR="${httpdmoduledir}" -a mod_netconf.la; } \
34 fi
Tomas Cejka55b63df2013-11-16 01:21:42 +010035
36webgui-backend$(EXEEXT): mod_netconf.c notification-server.c mod_netconf.h
Tomas Cejka438142c2013-11-17 23:57:30 +010037 gcc -Wall -g $(LIBS) $(CFLAGS) -DHTTPD_INDEPENDENT `apr-1-config --cflags --cppflags --includes --link-ld` -I/usr/include/httpd -laprutil-1 -o $@ $(srcdir)/mod_netconf.c $(srcdir)/notification-server.c
Tomas Cejkade321aa2013-11-14 22:10:59 +010038
39clean-local:
40 rm -rf .libs *.la *.lo *.slo test-client webgui-backend
41
Tomas Cejka55b63df2013-11-16 01:21:42 +010042distclean-local:
43 rm -rf $(RPMDIR)
Tomas Cejkade321aa2013-11-14 22:10:59 +010044