include common.mk .PHONY: \ all c clean purge help \ libowlps \ libowlps-client \ libowlps-resultreader \ owlps-client \ owlps-listener \ owlps-aggregator \ owlps-udp-to-http \ owlps-positioner \ install \ install-owlps-client \ install-owlps-listener \ install-owlps-aggregator \ install-owlps-udp-to-http \ install-owlps-positioner \ uninstall \ uninstall-owlps-client \ uninstall-owlps-listener \ uninstall-owlps-aggregator \ uninstall-owlps-udp-to-http \ uninstall-owlps-positioner ## Compilation ## C_TARGETS := \ libowlps \ libowlps-client \ libowlps-resultreader \ owlps-client \ owlps-aggregator \ owlps-udp-to-http ifeq "$(OS)" "Linux" C_TARGETS += owlps-listener endif ALL_TARGETS := $(C_TARGETS) ifneq "$(OS)" "OpenBSD" ALL_TARGETS += owlps-positioner endif all: $(ALL_TARGETS) c: $(C_TARGETS) libowlps: @$(MAKE) -C $@ $(ARG) libowlps-client: libowlps @$(MAKE) -C $@ $(ARG) libowlps-resultreader: libowlps @$(MAKE) -C $@ $(ARG) owlps-client: libowlps libowlps-client libowlps-resultreader @$(MAKE) -C $@ $(ARG) owlps-listener: libowlps libowlps-client @$(MAKE) -C $@ $(ARG) owlps-aggregator: libowlps @$(MAKE) -C $@ $(ARG) owlps-udp-to-http: libowlps libowlps-resultreader @$(MAKE) -C $@ $(ARG) owlps-positioner: libowlps @$(MAKE) -C $@ $(ARG) ## Installation ## install : \ install-libowlps \ install-owlps-client \ install-owlps-listener \ install-owlps-aggregator \ install-owlps-udp-to-http \ install-owlps-positioner 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-positioner: 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-positioner 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-positioner: @$(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-positioner 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-positioner 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 the temporary files." @echo " purge: Remove compiled programs as well as temporary files." @echo @echo "Note: Files are installed under /usr/local." @echo "Tune the PREFIX variable in the Makefiles to change that."