Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 1 | SRCS=mod_netconf.c \ |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 2 | notification-server.c |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 3 | |
| 4 | HDRS=message_type.h \ |
| 5 | notification_module.h \ |
| 6 | mod_netconf.h |
| 7 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 8 | noinst_PROGRAMS=webgui-backend test-client |
| 9 | webgui_backend_SOURCES=mod_netconf.c notification-server.c message_type.h notification_module.h mod_netconf.h |
| 10 | test_client_SOURCES=test-client.c |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 11 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 12 | EXTRA_DIST=$(SRCS) $(HDRS) |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 13 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 14 | dist-hook: |
| 15 | cp $(SRC) $(HDRS) $(distdir) |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 16 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 17 | all: mod_netconf.so test-client webgui-backend |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 18 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 19 | mod_netconf.so: mod_netconf.c notification-server.c |
| 20 | $(APXS) $(LIBS) $(CFLAGS) -c -o $@ $(srcdir)/mod_netconf.c $(srcdir)/notification-server.c |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 21 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 22 | test-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 | |
| 28 | install-exec-local: mod_netconf.so |
Tomas Cejka | 32528d6 | 2013-11-25 09:50:51 +0100 | [diff] [blame] | 29 | [ "x$(httpdmoduledir)" == x ] && \ |
| 30 | $(APXS) -i -a mod_netconf.la || \ |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 31 | { mkdir -p "$(httpdmoduledir)"; $(APXS) -i -S LIBEXECDIR="$(httpdmoduledir)" -a mod_netconf.la; } |
| 32 | |
| 33 | webgui-backend$(EXEEXT): mod_netconf.c notification-server.c mod_netconf.h |
Tomas Cejka | 438142c | 2013-11-17 23:57:30 +0100 | [diff] [blame] | 34 | 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 Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 35 | |
| 36 | clean-local: |
| 37 | rm -rf .libs *.la *.lo *.slo test-client webgui-backend |
| 38 | |
Tomas Cejka | 55b63df | 2013-11-16 01:21:42 +0100 | [diff] [blame] | 39 | distclean-local: |
| 40 | rm -rf $(RPMDIR) |
Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 41 | |