Tomas Cejka | de321aa | 2013-11-14 22:10:59 +0100 | [diff] [blame] | 1 | ARCSID = @ARCSID@ |
| 2 | RCSID = @RCSID@ |
| 3 | |
| 4 | SRCS=mod_netconf.c \ |
| 5 | notification-server.c \ |
| 6 | test-client.c |
| 7 | |
| 8 | HDRS=message_type.h \ |
| 9 | notification_module.h \ |
| 10 | mod_netconf.h |
| 11 | |
| 12 | all: module client webgui-backend |
| 13 | |
| 14 | module: mod_netconf.c |
| 15 | $(APXS) $(LIBS) $(ARCSID) $(CFLAGS) -c mod_netconf.c notification-server.c |
| 16 | |
| 17 | client: test-client.c |
| 18 | gcc $(RCSID) -std=gnu99 -Wall -g -ljson -I/usr/include/json test-client.c -o test-client |
| 19 | |
| 20 | notification-test: notification-server.c |
| 21 | gcc $(RCSID) -std=gnu99 -Wall -g -lwebsockets -DTEST_NOTIFICATION_SERVER notification-server.c -o notification-test |
| 22 | |
| 23 | install-exec-local: module |
| 24 | $(APXS) -i -a mod_netconf.la |
| 25 | |
| 26 | install-data-local: $(TARGETS) |
| 27 | [ -d $(DESTDIR)/etc/httpd/modules ] || \ |
| 28 | (mkdir -p $(DESTDIR)/$(libdir)/httpd/modules; chmod 755 $(DESTDIR)/$(libdir)/httpd/modules) |
| 29 | [ -d $(DESTDIR)/$(sysconfdir)/httpd/conf.d/ ] || \ |
| 30 | mkdir -p $(DESTDIR)/$(sysconfdir)/httpd/conf.d/; chmod 755 $(DESTDIR)/$(sysconfdir)/httpd/conf.d/; |
| 31 | cp mod_netconf.conf $(DESTDIR)/$(sysconfdir)/httpd/conf.d/ |
| 32 | #install-exec-local: $(TARGETS) |
| 33 | # $(APXS) -i $(NAME).la |
| 34 | |
| 35 | clean-local: |
| 36 | rm -rf .libs *.la *.lo *.slo test-client webgui-backend |
| 37 | |
| 38 | #.PHONY: tarball |
| 39 | #tarball: $(SRCS) $(HEADERS) |
| 40 | # @rm -rf $(NAME)-$(VERSION); |
| 41 | # @mkdir $(NAME)-$(VERSION); |
| 42 | # for i in $(SRCS) $(HDRS) mod_netconf.conf README configure.in configure \ |
| 43 | # Makefile.in VERSION $(NAME).spec.in install-sh; do \ |
| 44 | # [ -d $(NAME)-$(VERSION)/$$(dirname $$i) ] || (mkdir -p $(NAME)-$(VERSION)/$$(dirname $$i)); \ |
| 45 | # cp $$i $(NAME)-$(VERSION)/$$i; \ |
| 46 | # done; |
| 47 | # @rm -rf $(RPMDIR)/SOURCES/; \ |
| 48 | # mkdir -p $(RPMDIR)/SOURCES/; \ |
| 49 | # tar -c -z -f $(RPMDIR)/SOURCES/$(NAME)-$(VERSION)-$(RELEASE).tar.gz \ |
| 50 | # $(NAME)-$(VERSION); \ |
| 51 | # rm -rf $(NAME)-$(VERSION); |
| 52 | # |
| 53 | #.PHONY: rpm |
| 54 | #rpm: tarball |
| 55 | # mkdir -p $(RPMDIR)/BUILD $(RPMDIR)/RPMS $(RPMDIR)/SRPMS |
| 56 | # $(RPMBUILD) -ba $(PKGNAME).spec \ |
| 57 | # --define "_topdir `pwd`/$(RPMDIR)"; |
| 58 | # |
| 59 | #.PHONY: distclean |
| 60 | #distclean: |
| 61 | # rm -rf $(RPMDIR) |
| 62 | |
| 63 | webgui-backend: mod_netconf.c notification-server.c mod_netconf.h |
| 64 | gcc -Wall -g @SAVED_CFLAGS@ -DHTTPD_INDEPENDENT $(RCSID) `apr-1-config --cflags --cppflags --includes --link-ld` -I/usr/include/httpd @SAVED_LIBS@ -laprutil-1 -o $@ mod_netconf.c notification-server.c |
| 65 | |