From 005e5da12e2c779c9634c86cbfbe7fc0d8085dfd Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sat, 18 May 2013 13:01:49 -0400 Subject: [PATCH] Delete Makefiles --- Makefile | 163 ------------- common-rules.mk | 32 --- common.mk | 194 ---------------- libowlps-client/Makefile | 23 -- libowlps-resultreader/Makefile | 42 ---- libowlps/Makefile | 84 ------- owlps-aggregator/Makefile | 53 ----- owlps-client/Makefile | 68 ------ owlps-listener/Makefile | 71 ------ owlps-positioner/Makefile | 410 --------------------------------- owlps-udp-to-http/Makefile | 58 ----- 11 files changed, 1198 deletions(-) delete mode 100644 Makefile delete mode 100644 common-rules.mk delete mode 100644 common.mk delete mode 100644 libowlps-client/Makefile delete mode 100644 libowlps-resultreader/Makefile delete mode 100644 libowlps/Makefile delete mode 100644 owlps-aggregator/Makefile delete mode 100644 owlps-client/Makefile delete mode 100644 owlps-listener/Makefile delete mode 100644 owlps-positioner/Makefile delete mode 100644 owlps-udp-to-http/Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 337b5ee..0000000 --- a/Makefile +++ /dev/null @@ -1,163 +0,0 @@ -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." diff --git a/common-rules.mk b/common-rules.mk deleted file mode 100644 index 64a3b56..0000000 --- a/common-rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# Cancel implicit make rule -%: %.c - -% : %.o $(STATIC) - $(CC) $(STRIPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(DYNAMIC_LDFLAGS) - -%.semistatic: %.o $(STATIC) - $(CC) $(STRIPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(SEMISTATIC_LDFLAGS) - $(STRIP) $@ - -%.static: %.o $(STATIC) - $(CC) $(STRIPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(STATIC_LDFLAGS) -static - $(STRIP) $@ - -%.o: %.c $(HEADER) - $(CC) $(CPPFLAGS) $(CFLAGS) -c $< - -%.a: %.o - $(RM) $@ - $(AR) cru $@ $^ - $(RANLIB) $@ - -%.so.$(LIBOWLPS_VERSION): %.o - $(CC) -shared -o $@ -Wl,-soname,$@ $(STRIPFLAGS) $(CFLAGS) $(LDFLAGS) $^ - $(SYMLINK) $@ $(@:.$(LIBOWLPS_VERSION)=) - chmod a-x $@ - -clean: - @$(RM) *~ *.o *.d - -purge: clean - @$(RM) $(DYNAMIC) *.so $(STATIC) $(EXAMPLE) $(TARGET) $(TARGET).static $(TARGET).semistatic diff --git a/common.mk b/common.mk deleted file mode 100644 index 5322882..0000000 --- a/common.mk +++ /dev/null @@ -1,194 +0,0 @@ -# Export all variables by default -export - -.PHONY : all dynamic semistatic static install install-dynamic install-static install-header uninstall uninstall-dynamic uninstall-static uninstall-header clean purge help test doc style check - - -### Versions ### - -# Current version of the libowlps -LIBOWLPS_VERSION := 3.0 - -# OwlPS source version -ifndef OWLPS_VERSION - OWLPS_VERSION := $(shell git describe 2>/dev/null || echo 'UNKNOWN_VERSION') -endif - - -### make-related variables ### - -# Default make command -# Use MAKE=gmake on BSD systems. -ifndef MAKE - MAKE := make -endif - -# Default Makefile name -ifndef MAKEFILE - MAKEFILE := Makefile -endif - -# Default target to call, when calling a Makefile from another Makefile -ifndef TARGET - TARGET := all -endif - -# Target architecture -# This is unused for now. -ifndef ARCH - ARCH := native -endif - - -### Building tools ### - -# Misc tools -AR := ar -RANLIB := ranlib -STRIP := strip -s - -# Install/uninstall commands -CP := cp -MKDIR := mkdir -p -RM := rm -f -RM_RECURSIVE := \rm -fr -SYMLINK := ln -sf - -# C compiler -ifeq "$(origin CC)" "default" - CLANG := $(shell (command -v clang)) - ifneq "$(CLANG)" "" - CC := $(CLANG) - else - COLORGCC := $(shell command -v colorgcc || command -v color-gcc) - ifneq "$(COLORGCC)" "" - CC := $(COLORGCC) - endif - endif -endif - -# C++ compiler -ifeq "$(origin CXX)" "default" - COLORGCC := $(shell command -v colorgcc || command -v color-g++) - ifneq "$(COLORGCC)" "" - CXX := $(COLORGCC) - endif -endif - - -### OwlPS-specific variables ### - -LIBOWLPS_DIR = ../libowlps -LIBOWLPSCLIENT_DIR = ../libowlps-client -LIBOWLPSRESULTREADER_DIR = ../libowlps-resultreader - - -### Build flags ### - -# Reinitialisation -CPPFLAGS := -CFLAGS := -CXXFLAGS := -LDFLAGS := - -# OS detection -OS := $(shell uname) - -## OpenWrt specifics ## -# -# To compile for OpenWrt, the OPENWRT_VERSION variable must be set. -# The other relevant variables are: -# OPENWRT_ROOT: path to the base directory in which the OpenWrt stuff -# is (default: $HOME/openwrt). -# OPENWRT_TARGET: name of the OpenWrt target to build for (default: -# atheros). -# -# To allow building against several targets and OpenWrt versions, we -# look for the toolchain in the following base directory, taking into -# account specificities of each version when needed: -# $OPENWRT_ROOT/$OPENWRT_TARGET/$OPENWRT_VERSION -# -# For maintainability's sake, we don't handle changes of version of the -# toolchain's tools, so you have to create symbolic links under this -# directory: -# target_uClibc --> staging_dir/target-$ARCH_*_uClibc-* -# toolchain_gcc_uClibc --> staging_dir/toolchain-$ARCH_*_gcc-*_uClibc-* -# -# See the documentation in INSTALL.t2t for further information on how to -# set up a building environment for OpenWrt. -# -ifndef OPENWRT_PATH - OPENWRT_ROOT = $${HOME}/openwrt -endif -ifndef OPENWRT_TARGET - OPENWRT_TARGET := atheros -endif -ifdef OPENWRT_VERSION - OS := Linux - - TOOLCHAIN_PREFIX := $(OPENWRT_ROOT)/$(OPENWRT_TARGET)/$(OPENWRT_VERSION) - STAGING_DIR := $(TOOLCHAIN_PREFIX)/staging_dir - TOOLCHAIN1 := $(TOOLCHAIN_PREFIX)/toolchain_gcc_uClibc - TOOLCHAIN_BIN := $(TOOLCHAIN1)/bin - TOOLCHAIN2 := $(TOOLCHAIN_PREFIX)/target_uClibc - - ifeq "$(OPENWRT_VERSION)" "10.03" - TOOLCHAIN_BIN := $(TOOLCHAIN1)/usr/bin - endif - - CFLAGS += -I$(TOOLCHAIN1)/usr/include -I$(TOOLCHAIN2)/usr/include - LDFLAGS += -L$(TOOLCHAIN1)/lib -L$(TOOLCHAIN1)/usr/lib -L$(TOOLCHAIN2)/usr/lib - DYNAMIC_LDFLAGS += $(TOOLCHAIN1)/lib/ld-uClibc.so.0 - SEMISTATIC_LDFLAGS += $(TOOLCHAIN1)/lib/ld-uClibc.so.0 - - CC := STAGING_DIR=$(STAGING_DIR) $(TOOLCHAIN_BIN)/mips-openwrt-linux-gcc - CXX := STAGING_DIR=$(STAGING_DIR) $(TOOLCHAIN_BIN)/mips-openwrt-linux-g++ - STRIP := STAGING_DIR=$(STAGING_DIR) $(TOOLCHAIN_BIN)/mips-openwrt-linux-strip -s -endif - -# OwlPS flags -CFLAGS += -D OWLPS_VERSION=\"$(OWLPS_VERSION)\" -LDFLAGS += -L$(LIBOWLPS_DIR) -L$(LIBOWLPSCLIENT_DIR) -L$(LIBOWLPSRESULTREADER_DIR) -CFLAGS += -I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR) -I$(LIBOWLPSRESULTREADER_DIR) - -# Options -CFLAGS += -O2 -CFLAGS += -fPIC -CFLAGS += -Wall -Wextra - -# Debug flags -CFLAGS += -D DEBUG -#CFLAGS += -g -O0 -#CFLAGS += -D NDEBUG - -# Misc -#STRIPFLAGS += -Wl,-s - -# OS specific flags -ifeq "$(OS)" "DragonFly" - CFLAGS += -I/usr/pkg/include - LDFLAGS += -L/usr/pkg/lib -endif -ifeq "$(OS)" "NetBSD" - CFLAGS += -I/usr/pkg/include - LDFLAGS += -L/usr/pkg/lib -endif -ifeq "$(OS)" "OpenBSD" - CFLAGS += -I/usr/local/include - LDFLAGS += -L/usr/local/lib -endif - -# C++ specific flags -CXXFLAGS := $(CFLAGS) - -# C specific flags -CFLAGS += -Wstrict-prototypes - - -### Installation directories ### - -PREFIX := /usr/local -INSTALL_DIR := $(PREFIX)/bin -INSTALL_LIB := $(PREFIX)/lib -INSTALL_INC := $(PREFIX)/include -INSTALL_MAN := $(PREFIX)/share/man diff --git a/libowlps-client/Makefile b/libowlps-client/Makefile deleted file mode 100644 index d9779d4..0000000 --- a/libowlps-client/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -include ../common.mk - -TARGET_LIB = libowlps-client -STATIC = $(TARGET_LIB).a -HEADER = owlps-client.h - - -## Targets ## - -all : static -static : $(STATIC) - -help : - @echo "Needed libraries:" - @echo " libowlps-dev" - @echo - @echo "Targets:" - @echo " static (default target): Builds the static library." - @echo - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - -include ../common-rules.mk diff --git a/libowlps-resultreader/Makefile b/libowlps-resultreader/Makefile deleted file mode 100644 index 4617d81..0000000 --- a/libowlps-resultreader/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -include ../common.mk - -TARGET_LIB = libowlps-resultreader -STATIC = $(TARGET_LIB).a -HEADER = owlps-resultreader.h -EXAMPLE = owlps-resultreader-udp - - -## Additional libraries ## - -LDFLAGS += -lowlps -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -## Targets ## - -all : static example -static : $(STATIC) -example : $(EXAMPLE) - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libowlps-dev" - @echo - @echo "Targets:" - @echo " all (default): Builds the library and the sample program." - @echo " static: Builds the static library." - @echo " example: Builds the sample program." - @echo - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - - -include ../common-rules.mk diff --git a/libowlps/Makefile b/libowlps/Makefile deleted file mode 100644 index c332aad..0000000 --- a/libowlps/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -include ../common.mk - -TARGET_LIB = libowlps -STATIC = $(TARGET_LIB).a -DYNAMIC = $(TARGET_LIB).so.$(LIBOWLPS_VERSION) -HEADER = owlps.h - - -## Additional libraries ## - -LDFLAGS += -lc - - -## Targets ## - -all : dynamic static -dynamic : $(DYNAMIC) -static : $(STATIC) - - -## Installation ## - -install : install-static install-dynamic - -install-dynamic : install-header $(DYNAMIC) - @$(CP) $(DYNAMIC) $(INSTALL_LIB) &&\ - chmod 644 $(INSTALL_LIB)/$(DYNAMIC) &&\ - chown root:root $(INSTALL_LIB)/$(DYNAMIC) &&\ - cd $(INSTALL_LIB) && $(SYMLINK) $(DYNAMIC) $(TARGET_LIB).so &&\ - echo "Reconstruction du cache pour ld.so : ldconfig $(INSTALL_LIB)" ; ldconfig $(INSTALL_LIB) - -install-static : install-header $(STATIC) - @$(CP) $(STATIC) $(INSTALL_LIB) &&\ - chmod 644 $(INSTALL_LIB)/$(STATIC) &&\ - chown root:root $(INSTALL_LIB)/$(STATIC) - -install-header : $(HEADER) - @$(CP) $(HEADER) $(INSTALL_INC) &&\ - chmod 644 $(INSTALL_INC)/$(HEADER) &&\ - chown root:root $(INSTALL_INC)/$(HEADER) - - -## Uninstallation ## - -uninstall : uninstall-dynamic uninstall-static - -uninstall-dynamic : uninstall-header - @$(RM) $(INSTALL_LIB)/$(DYNAMIC) $(INSTALL_LIB)/$(TARGET_LIB).so - @echo "Reconstruction du cache pour ld.so : ldconfig" ; ldconfig - -uninstall-static : uninstall-header - @$(RM) $(INSTALL_LIB)/$(STATIC) - -uninstall-header : - @$(RM) $(INSTALL_INC)/$(HEADER) - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libiw-dev" - @echo - @echo "Targets:" - @echo " all (default target): Builds the library (dynamic & static)." - @echo " dynamic: Builds the shared library." - @echo " static: Builds the static library." - @echo - @echo " install: Installs the library (dynamic & static)." - @echo " install-dynamic: Installs the shared library." - @echo " install-static: Installs the static library." - @echo - @echo " uninstall: Uninstalls everything." - @echo " uninstall-dynamic: Uninstalls the shared library." - @echo " uninstall-static: Uninstalls the static library." - @echo - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." - - -include ../common-rules.mk diff --git a/owlps-aggregator/Makefile b/owlps-aggregator/Makefile deleted file mode 100644 index 69a4500..0000000 --- a/owlps-aggregator/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -include ../common.mk - -TARGET = owlps-aggregatord -HEADER = owlps-aggregator.h - - -## Additional libraries ## - -LDFLAGS += -pthread -lconfuse -lowlps -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -## Targets ## - -dynamic: $(TARGET) -static: $(TARGET).static -all: dynamic static - - -## Installation / uninstallation ## - -install : $(TARGET) - @$(CP) $(TARGET) $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) - -uninstall : - @$(RM) $(INSTALL_DIR)/$(TARGET) - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libconfuse-dev" - @echo " libowlps-dev" - @echo - @echo "Targets:" - @echo " $(TARGET) (default target): Builds the program $(TARGET)." - @echo " install : Installs the program $(TARGET)." - @echo " uninstall : Uninstalls the program $(TARGET)." - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." - - -include ../common-rules.mk diff --git a/owlps-client/Makefile b/owlps-client/Makefile deleted file mode 100644 index 03d578a..0000000 --- a/owlps-client/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -include ../common.mk - -TARGET = owlps-client - - -## Compilation-time option ## - -#CFLAGS += -D ENABLE_RECEIVE_POSITION -#LDFLAGS += -lowlps-resultreader - - -## Additional libraries ## - -STATIC_LDFLAGS += $(LIBOWLPS_DIR)/libowlps.a $(LIBOWLPSCLIENT_DIR)/libowlps-client.a -SEMISTATIC_LDFLAGS += $(STATIC_LDFLAGS) -DYNAMIC_LDFLAGS += -lowlps -lowlps-client - -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -## Targets ## - -dynamic : $(TARGET) -semistatic: $(TARGET).semistatic -static : $(TARGET).static -all : dynamic semistatic static - - -## Installation / uninstallation ## - -install : $(TARGET) - @$(CP) $(TARGET) $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) - -install-static : $(TARGET).static - @$(CP) $(TARGET).static $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET).static ; chmod 755 $(TARGET).static - -uninstall : - @$(RM) $(INSTALL_DIR)/{$(TARGET),$(TARGET).static} - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libowlps-dev" - @echo " libowlps-client-dev" - @echo - @echo "Targets:" - @echo " $(TARGET) (default target): Builds the program $(TARGET)." - @echo " $(TARGET).static : Builds the program $(TARGET).static \ -(statically linked version)." - @echo " install: Installs the program $(TARGET)." - @echo " uninstall: Uninstalls the program $(TARGET)." - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." - - -include ../common-rules.mk diff --git a/owlps-listener/Makefile b/owlps-listener/Makefile deleted file mode 100644 index bfe1a0c..0000000 --- a/owlps-listener/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -include ../common.mk - -TARGET = owlps-listenerd -HEADER = owlps-listener.h - - -## Compilation-time option ## - -CFLAGS += -D USE_CONFIG_FILE -LDFLAGS += -lconfuse -CFLAGS += -D USE_PTHREAD -LDFLAGS += -pthread -#CFLAGS += -D ENABLE_KEEP_MONITOR -#LDFLAGS += -liw - - -## Additional libraries ## - -LDFLAGS += -lpcap - -STATIC_LDFLAGS += $(LIBOWLPS_DIR)/libowlps.a $(LIBOWLPSCLIENT_DIR)/libowlps-client.a -SEMISTATIC_LDFLAGS += $(STATIC_LDFLAGS) -DYNAMIC_LDFLAGS += -lowlps -lowlps-client - -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -## Targets ## - -dynamic: $(TARGET) -semistatic: $(TARGET).semistatic -static: $(TARGET).static -all: dynamic semistatic static - - -## Installation / uninstallation ## - -install : $(TARGET) - @$(CP) $(TARGET) $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) - -uninstall : - @$(RM) $(INSTALL_DIR)/$(TARGET) - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libpcap0.8-dev" - @echo " libiw-dev (optionnal)" - @echo " libconfuse-dev (optionnal)" - @echo " libowlps-dev" - @echo - @echo "Targets:" - @echo " $(TARGET) (default target): Builds the program $(TARGET)." - @echo " install: Installs the program $(TARGET)." - @echo " uninstall: Uninstalls the program $(TARGET)." - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." - - -include ../common-rules.mk diff --git a/owlps-positioner/Makefile b/owlps-positioner/Makefile deleted file mode 100644 index 232f4d3..0000000 --- a/owlps-positioner/Makefile +++ /dev/null @@ -1,410 +0,0 @@ -include ../common.mk - -# Directories & files -SRC_DIR = src -OBJ_DIR = obj -TESTS_DIR = tests -DOXYGEN_DIR = doc -DOXYFILE = Doxyfile - -# Other tools -STYLE = astyle --style=gnu --indent=spaces=2 --formatted -CPPCHECK = cppcheck --quiet --enable=all -DOXYGEN = OWLPS_VERSION=$(OWLPS_VERSION) doxygen >/dev/null - -# Flags for the tests -TESTSCXXFLAGS = -I$(TESTS_DIR) -I$(SRC_DIR) -I. - -# Compiler flags -CXXFLAGS += -std=c++11 - -## Additional libraries ## - -LDFLAGS += -lstdc++ -lm -lboost_program_options -pthread -lowlps -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -TARGET = owlps-positionerd -OBJ_TARGET = $(OBJ_DIR)/$(TARGET).o -SOURCE_TARGET = $(SRC_DIR)/$(TARGET).cc - -OBJ_LIST = \ - posutil.o \ - autocalibration.o \ - stock.o \ - timestamp.o \ - direction.o \ - point3d.o \ - referencepoint.o \ - waypoint.o \ - building.o \ - area.o \ - wifidevice.o \ - accesspoint.o \ - mobile.o \ - measurement.o \ - request.o \ - calibrationrequest.o \ - resultlist.o \ - result.o \ - minmax.o \ - interlinknetworks.o \ - fbcm.o \ - frbhmbasic.o \ - nss.o \ - realposition.o \ - configuration.o \ - userinterface.o \ - inputdatareader.o \ - accesspointsreadercsv.o \ - mobilesreadercsv.o \ - topologyreadercsv.o \ - textfilereader.o \ - csvfilereader.o \ - csvstringreader.o \ - textfilewriter.o \ - output.o \ - outputterminal.o \ - outputcsv.o \ - outputudpsocket.o \ - outputtcpsocketevaal.o \ - positioning.o \ - input.o \ - inputcsv.o \ - inputudpsocket.o \ - inputlogcsv.o -OBJ_NOTEST_LIST = \ - posexcept.o \ - trilaterationalgorithm.o \ - cartographyalgorithm.o \ - outputnetworksocket.o \ - inputmedium.o -INTERFACES_LIST = \ - inputlogmedium.hh \ - outputmedium.hh \ - trilaterationmethod.hh \ - positioningalgorithm.hh - -OBJ = $(OBJ_LIST:%=$(OBJ_DIR)/%) -OBJ_NOTEST = $(OBJ_NOTEST_LIST:%=$(OBJ_DIR)/%) -INTERFACES = $(INTERFACES_LIST:%=$(SRC_DIR)/%) -SOURCE = \ - $(OBJ:$(OBJ_DIR)/%.o=$(SRC_DIR)/%.hh) \ - $(OBJ:$(OBJ_DIR)/%.o=$(SRC_DIR)/%.cc) \ - $(OBJ_NOTEST:$(OBJ_DIR)/%.o=$(SRC_DIR)/%.hh) \ - $(OBJ_NOTEST:$(OBJ_DIR)/%.o=$(SRC_DIR)/%.cc) \ - $(INTERFACES) - -TESTS_XX = $(TESTS_DIR)/tests.cc -TESTS_OBJ = $(TESTS_DIR)/tests.o -TESTS_TARGET = $(TESTS_DIR)/tests -TESTUTIL_OBJ = $(TESTS_DIR)/testutil.o -TESTSETUP_OBJ = $(TESTS_DIR)/testsetup.o -SOURCE_TESTS = $(OBJ:$(OBJ_DIR)/%.o=$(TESTS_DIR)/%_test.hh) -OBJ_TESTS = $(TESTUTIL_OBJ) $(TESTSETUP_OBJ) -INCLUDES_TESTS = $(TESTS_DIR)/valuetraits.hh - -dynamic: $(TARGET) -static: $(TARGET).static -all: dynamic static - -# Generic targets -$(TESTS_DIR)/%.o: $(TESTS_DIR)/%.cc $(TESTS_DIR)/%.hh - $(CXX) $(CXXFLAGS) $(TESTSCXXFLAGS) -o $@ -c $< - -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cc $(SRC_DIR)/%.hh - $(MKDIR) $(OBJ_DIR) && $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< - -%: $(OBJ_DIR)/%.o - $(CXX) $(STRIPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) - -%.static: $(OBJ_DIR)/%.o - $(CXX) $(STRIPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -static - $(STRIP) $@ - -# Dependencies -$(OBJ_DIR)/autocalibration.o: \ - $(OBJ_DIR)/stock.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/point3d.o: \ - $(OBJ_DIR)/posutil.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/posutil.o: \ - $(OBJ_DIR)/stock.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/owlps-positionerd.o: \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/owlps-positionerd.o: \ - $(OBJ_DIR)/userinterface.o \ - $(OBJ_DIR)/inputdatareader.o \ - $(OBJ_DIR)/stock.o \ - $(OBJ_DIR)/positioning.o -$(OBJ_DIR)/userinterface.o: \ - $(OBJ_DIR)/configuration.o -$(OBJ_DIR)/inputdatareader.o: \ - $(OBJ_DIR)/accesspointsreadercsv.o \ - $(OBJ_DIR)/mobilesreadercsv.o \ - $(OBJ_DIR)/topologyreadercsv.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/accesspointsreadercsv.o: \ - $(OBJ_DIR)/csvfilereader.o \ - $(OBJ_DIR)/accesspoint.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/mobilesreadercsv.o: \ - $(OBJ_DIR)/csvfilereader.o \ - $(OBJ_DIR)/mobile.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/topologyreadercsv.o: \ - $(OBJ_DIR)/csvfilereader.o \ - $(OBJ_DIR)/area.o \ - $(OBJ_DIR)/waypoint.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/referencepoint.o: \ - $(OBJ_DIR)/point3d.o \ - $(OBJ_DIR)/measurement.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/waypoint.o: \ - $(OBJ_DIR)/point3d.o \ - $(OBJ_DIR)/building.o -$(OBJ_DIR)/area.o: \ - $(OBJ_DIR)/building.o \ - $(OBJ_DIR)/point3d.o -$(OBJ_DIR)/wifidevice.o: \ - $(OBJ_DIR)/posutil.o -$(OBJ_DIR)/accesspoint.o: \ - $(OBJ_DIR)/wifidevice.o \ - $(OBJ_DIR)/posutil.o \ - $(OBJ_DIR)/point3d.o -$(OBJ_DIR)/mobile.o: \ - $(OBJ_DIR)/wifidevice.o -$(OBJ_DIR)/measurement.o: \ - $(OBJ_DIR)/accesspoint.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/request.o: \ - $(OBJ_DIR)/timestamp.o \ - $(OBJ_DIR)/measurement.o -$(OBJ_DIR)/calibrationrequest.o: \ - $(OBJ_DIR)/request.o \ - $(OBJ_DIR)/referencepoint.o \ - $(OBJ_DIR)/direction.o -$(OBJ_DIR)/result.o: \ - $(OBJ_DIR)/stock.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/area.o \ - $(OBJ_DIR)/request.o -$(OBJ_DIR)/resultlist.o: \ - $(OBJ_DIR)/result.o -$(OBJ_DIR)/textfilereader.o: \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/csvfilereader.o: \ - $(OBJ_DIR)/csvstringreader.o \ - $(OBJ_DIR)/textfilereader.o -$(OBJ_DIR)/csvstringreader.o: \ - $(OBJ_DIR)/point3d.o \ - $(OBJ_DIR)/timestamp.o -$(OBJ_DIR)/textfilewriter.o: \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/inputmedium.o: \ - $(OBJ_DIR)/calibrationrequest.o \ - $(OBJ_DIR)/posexcept.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/inputcsv.o: \ - $(OBJ_DIR)/inputmedium.o \ - $(OBJ_DIR)/csvfilereader.o \ - $(OBJ_DIR)/request.o \ - $(OBJ_DIR)/calibrationrequest.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/inputudpsocket.o: \ - $(OBJ_DIR)/inputmedium.o \ - $(OBJ_DIR)/posexcept.o \ - $(OBJ_DIR)/request.o \ - $(OBJ_DIR)/calibrationrequest.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/inputlogcsv.o: \ - $(SRC_DIR)/inputlogmedium.hh \ - $(OBJ_DIR)/request.o -$(OBJ_DIR)/input.o: \ - $(OBJ_DIR)/inputcsv.o \ - $(OBJ_DIR)/inputudpsocket.o \ - $(OBJ_DIR)/inputlogcsv.o \ - $(OBJ_DIR)/calibrationrequest.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/outputterminal.o: \ - $(SRC_DIR)/outputmedium.hh \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/result.o -$(OBJ_DIR)/outputcsv.o: \ - $(SRC_DIR)/outputmedium.hh \ - $(OBJ_DIR)/textfilewriter.o \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/result.o -$(OBJ_DIR)/outputnetworksocket.o: \ - $(SRC_DIR)/outputmedium.hh \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/result.o -$(OBJ_DIR)/outputudpsocket.o: \ - $(OBJ_DIR)/outputnetworksocket.o \ - $(OBJ_DIR)/request.o \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/result.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/outputtcpsocketevaal.o: \ - $(OBJ_DIR)/outputnetworksocket.o \ - $(OBJ_DIR)/request.o \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/result.o \ - $(OBJ_DIR)/area.o \ - $(OBJ_DIR)/posexcept.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/outputcsv.o: \ - $(SRC_DIR)/outputmedium.hh \ - $(OBJ_DIR)/result.o -$(OBJ_DIR)/output.o: \ - $(OBJ_DIR)/outputterminal.o \ - $(OBJ_DIR)/outputcsv.o \ - $(OBJ_DIR)/outputudpsocket.o \ - $(OBJ_DIR)/outputtcpsocketevaal.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/trilaterationalgorithm.o: \ - $(SRC_DIR)/positioningalgorithm.hh \ - $(OBJ_DIR)/minmax.o \ - $(OBJ_DIR)/mobile.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o -$(OBJ_DIR)/cartographyalgorithm.o: \ - $(SRC_DIR)/positioningalgorithm.hh \ - $(OBJ_DIR)/referencepoint.o -$(OBJ_DIR)/minmax.o: \ - $(SRC_DIR)/trilaterationmethod.hh \ - $(OBJ_DIR)/point3d.o \ - $(OBJ_DIR)/accesspoint.o -$(OBJ_DIR)/interlinknetworks.o: \ - $(OBJ_DIR)/trilaterationalgorithm.o -$(OBJ_DIR)/fbcm.o: \ - $(OBJ_DIR)/trilaterationalgorithm.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/stock.o -$(OBJ_DIR)/frbhmbasic.o: \ - $(OBJ_DIR)/nss.o \ - $(OBJ_DIR)/fbcm.o -$(OBJ_DIR)/nss.o: \ - $(OBJ_DIR)/cartographyalgorithm.o -$(OBJ_DIR)/realposition.o: \ - $(SRC_DIR)/positioningalgorithm.hh \ - $(OBJ_DIR)/result.o \ - $(OBJ_DIR)/calibrationrequest.o \ - $(OBJ_DIR)/referencepoint.o -$(OBJ_DIR)/positioning.o: \ - $(OBJ_DIR)/inputdatareader.o \ - $(OBJ_DIR)/input.o \ - $(OBJ_DIR)/realposition.o \ - $(OBJ_DIR)/fbcm.o \ - $(OBJ_DIR)/frbhmbasic.o \ - $(OBJ_DIR)/interlinknetworks.o \ - $(OBJ_DIR)/nss.o \ - $(OBJ_DIR)/resultlist.o \ - $(OBJ_DIR)/output.o \ - $(OBJ_DIR)/configuration.o \ - $(OBJ_DIR)/posexcept.o - -# Specific targets -$(TARGET): $(OBJ) $(OBJ_NOTEST) $(OBJ_TARGET) -$(TARGET).static: $(OBJ) $(OBJ_NOTEST) $(OBJ_TARGET) - -$(OBJ_TARGET): $(SOURCE_TARGET) - $(CXX) $(CXXFLAGS) -o $@ -c $< - -$(TESTS_XX): $(SOURCE_TESTS) $(OBJ) - $(TESTS_DIR)/cxxtestgen.pl --error-printer \ - --include=$(TESTS_DIR)/valuetraits.hh \ - --include=$(TESTUTIL_OBJ:.o=.hh) \ - -o $@ $(SOURCE_TESTS) - -$(TESTS_OBJ): $(TESTS_XX) $(INCLUDES_TESTS) - $(CXX) $(CXXFLAGS) $(TESTSCXXFLAGS) -o $@ -c $< - -$(TESTS_TARGET): $(TESTS_OBJ) $(OBJ_TESTS) $(OBJ) $(OBJ_NOTEST) - $(LD) $(LDFLAGS) -o $@ $^ - -test_forced: $(TESTS_TARGET) - @$(TESTS_TARGET) -test: - @echo "Unit tests are currently unmaintained. If you are sure" - @echo "you want to try them, use the target 'test_forced'." - -doc: - @$(DOXYGEN) $(DOXYFILE) - -clean: - @$(RM) *~ */*~ *.orig */*.orig - @$(RM_RECURSIVE) $(OBJ_DIR) - @$(RM) $(TESTS_XX) $(TESTS_DIR)/*.o - -purge: clean - @$(RM) $(TARGET) - @$(RM) $(TARGET).static - @$(RM) $(TESTS_TARGET) - @$(RM_RECURSIVE) $(DOXYGEN_DIR) - -install: $(TARGET) - @$(CP) $(TARGET) $(INSTALL_DIR) && \ - chmod 755 $(INSTALL_DIR)/$(TARGET) && \ - chown root:root $(INSTALL_DIR)/$(TARGET) - -uninstall: - @$(RM) $(INSTALL_DIR)/$(TARGET) - -style: - @$(STYLE) \ - $(SOURCE) \ - $(TESTS_DIR)/*.hh \ - $(TESTS_DIR)/*.cc - -check: - @$(CPPCHECK) \ - $(SOURCE) \ - $(TARGET).cc - -help: - @echo "/!\ This program requires GCC >=4.4 /!\\" - @echo - @echo "Needed libraries:" - @echo " libboost-dev" - @echo " libboost-program-options-dev" - @echo - @echo "Optional programs nedded for specific targets:" - @echo " doxygen" - @echo " CxxTest suite" - @echo " astyle (Artistic Style)" - @echo " cppcheck" - @echo - @echo "Targets:" - @echo " all (default target): Compiles OwlPS Positioner." - @echo " doc: Generates documentation from source files (doxygen \ -is required)." - @echo " install: Installs OwlPS Positioner." - @echo " uninstall: Uninstalls OwlPS Positioner." - @echo "" - @echo " test: Run unit tests (CxxTest suite is required)." - @echo " style: Reindent source files (astyle is required)." - @echo " check: Run automated checs on the source code (cppcheck \ -is required)." - @echo - @echo " clean: Delete the temporary files." - @echo " purge: Delete all generated files." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." diff --git a/owlps-udp-to-http/Makefile b/owlps-udp-to-http/Makefile deleted file mode 100644 index a119b53..0000000 --- a/owlps-udp-to-http/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -include ../common.mk - -TARGET = owlps-udp-to-http - - -## Additional libraries ## - -LDFLAGS += -pthread -lowlps -lowlps-resultreader -ifeq "$(OS)" "Linux" - LDFLAGS += -lrt -endif -ifeq "$(OS)" "GNU/kFreeBSD" - LDFLAGS += -lrt -endif - - -## Targets ## - -dynamic : $(TARGET) -static : $(TARGET).static -all : dynamic static - - -## Installation / uninstallation ## - -install : $(TARGET) - @$(CP) $(TARGET) $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) - -install-static : $(TARGET).static - @$(CP) $(TARGET).static $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; chown root:root $(TARGET).static ; chmod 755 $(TARGET).static - -uninstall : - @$(RM) $(INSTALL_DIR)/{$(TARGET),$(TARGET).static} - - -## Help ## - -help : - @echo "Needed libraries:" - @echo " libowlps-dev" - @echo " libowlps-resultreader-dev" - @echo - @echo "Targets:" - @echo " $(TARGET) (default target): Builds the program $(TARGET)." - @echo " $(TARGET).static : Builds the program $(TARGET).static \ -(statically linked version)." - @echo " install: Installs the program $(TARGET)." - @echo " uninstall: Uninstalls the program $(TARGET)." - @echo " clean: Deletes the temporary files." - @echo " purge: Deletes the built binaries." - @echo - @echo "Note: Files are installed under $(PREFIX)." - @echo "Tune the PREFIX variable in the Makefile to change that." - - -include ../common-rules.mk