owlps/Makefile

137 lines
2.9 KiB
Makefile

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