PROG = babbler CFLAGS = -Wall -I. -g LDLIBS = -L. -lxaal -ljson-c -luuid -lsodium -lespeak all: $(PROG) $(PROG).pot: $(PROG).c xgettext --copyright-holder="Christophe Lohr" --package-name=babbler --package-version=1 --msgid-bugs-address=christophe.lohr@imt-atlantique.fr -o $@ $^ fr.po: $(PROG).pot msginit -i $< -o $@ -joe $@ || vi $@ fr.mo: fr.po msgfmt -o $@ $< clean: -rm -f *.o *~ proper: clean uninstall -rm -f $(PROG) test: all LD_LIBRARY_PATH=. ./$(PROG) -a 224.0.29.200 -p 1234 -s my_secret .PHONY: all clean proper install uninstall svnignore test .SUFFIXES: .service .service.in .svnignore: echo $(PROG).o $(PROG) xaal-$(PROG).service | tr ' ' '\012' > $@ svnignore: .svnignore svn propset svn:ignore -F $< . install: xaal-$(PROG).service $(PROG) sudo systemctl --system --now enable $(PWD)/$< xaal-%.service: %.service.in envsubst < $< > $@ uninstall: -if systemctl --system --quiet is-enabled xaal-$(PROG) &>/dev/null ; then \ sudo systemctl --system --now disable xaal-$(PROG) ; \ fi status: -sudo systemctl --system --no-pager -l status xaal-$(PROG)