ifndef MAKE MAKE = make endif .PHONY: \ all c clean purge help \ libowlps \ libowlps-client \ libowlps-resultreader \ owlps-client \ owlps-listener \ owlps-aggregator \ owlps-udp-to-http \ owlps-positioning \ install \ install-owlps-client \ install-owlps-listener \ install-owlps-aggregator \ install-owlps-udp-to-http \ install-owlps-positioning \ uninstall \ uninstall-owlps-client \ uninstall-owlps-listener \ uninstall-owlps-aggregator \ uninstall-owlps-udp-to-http \ uninstall-owlps-positioning ## Compilation ## all: \ c \ owlps-positioning c: \ libowlps \ libowlps-client \ libowlps-resultreader \ owlps-client \ owlps-listener \ owlps-aggregator \ owlps-udp-to-http libowlps: @$(MAKE) -C $@ libowlps-client: libowlps @$(MAKE) -C $@ libowlps-resultreader: libowlps @$(MAKE) -C $@ owlps-client: libowlps libowlps-client @$(MAKE) -C $@ owlps-listener: libowlps libowlps-client @$(MAKE) -C $@ owlps-aggregator: libowlps @$(MAKE) -C $@ owlps-udp-to-http: libowlps libowlps-resultreader @$(MAKE) -C $@ owlps-positioning: libowlps @$(MAKE) -C $@ ## Installation ## install : \ install-libowlps \ install-owlps-client \ install-owlps-listener \ install-owlps-aggregator \ install-owlps-udp-to-http \ install-owlps-positioning install-libowlps: @$(MAKE) -C $(subst install-,,$@) install install-owlps-client: install-libowlps @$(MAKE) -C $(subst install-,,$@) install install-owlps-listener: install-libowlps @$(MAKE) -C $(subst install-,,$@) install install-owlps-aggregator: install-libowlps @$(MAKE) -C $(subst install-,,$@) install install-owlps-udp-to-http: install-libowlps @$(MAKE) -C $(subst install-,,$@) install install-owlps-positioning: install-libowlps @$(MAKE) -C $(subst install-,,$@) install ## Uninstallation ## uninstall : \ uninstall-libowlps \ uninstall-owlps-client \ uninstall-owlps-listener \ uninstall-owlps-aggregator \ uninstall-owlps-udp-to-http \ uninstall-owlps-positioning uninstall-libowlps: @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-client: @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-listener: @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-aggregator: @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-udp-to-http: @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-positioning: @$(MAKE) -C $(subst uninstall-,,$@) uninstall ## Cleaning ## clean : @$(MAKE) -C libowlps clean @$(MAKE) -C libowlps-client clean @$(MAKE) -C libowlps-resultreader clean @$(MAKE) -C owlps-client clean @$(MAKE) -C owlps-listener clean @$(MAKE) -C owlps-aggregator clean @$(MAKE) -C owlps-udp-to-http clean @$(MAKE) -C owlps-positioning clean purge : @$(MAKE) -C libowlps purge @$(MAKE) -C libowlps-client purge @$(MAKE) -C libowlps-resultreader purge @$(MAKE) -C owlps-client purge @$(MAKE) -C owlps-listener purge @$(MAKE) -C owlps-aggregator purge @$(MAKE) -C owlps-udp-to-http purge @$(MAKE) -C owlps-positioning purge ## Help ## help : @echo "Needed libraries:" @echo " libiw-dev" @echo " libpcap0.8-dev" @echo " libconfuse-dev" @echo " libboost-dev" @echo " libboost-program-options-dev" @echo @echo "Targets:" @echo " all (default target): Compile all the modules." @echo " : Compile only the given module (and its \ dependencies)." @echo @echo " install: Install all the modules." @echo " install-: Install only the given module (and its \ dependencies)." @echo @echo " uninstall: Remove all the modules." @echo " uninstall-: Remove only the given module (and its \ dependencies)." @echo @echo " clean: Remove temporary files." @echo " purge: Remove compiled programs as well as temporary files." @echo @echo "Note: Files are installed under /usr/local. Tune the PREFIX \ variable in the Makefile to change that."