PROG = babbler CFLAGS = -Wall -I. -g -O0 LDLIBS = -L. -lxaal -lcbor -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 if [ -e $@ ]; then mv -f $@ old_$@; fi msginit -i $< -o $@ if [ -e old_$@ ]; then msgcat -o $@ $@ old_$@; fi -joe $@ || vi $@ fr.mo: fr.po msgfmt -o $@ $< clean: -rm -f *.o *~ old_fr.po proper: clean uninstall -rm -f $(PROG) xaal-$(PROG).service test: all LD_LIBRARY_PATH=. ./$(PROG) -a 224.0.29.200 -p 1236 -s my_secret .PHONY: all clean proper test install uninstall svnignore .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)