owlps/owlps-positioning/Makefile

129 lines
3.0 KiB
Makefile
Raw Normal View History

2010-02-11 10:37:15 +01:00
.PHONY : all test doc clean purge install uninstall style check
TESTS_DIR = tests
DOXYGEN_DIR = doc
DOXYFILE = Doxyfile
2010-02-11 10:37:15 +01:00
# Installation directory
PREFIX = /usr/local
INSTALL_DIR = $(PREFIX)/bin
2010-02-11 10:37:15 +01:00
# System tools
RM = rm -fv
RM_RECURSIVE = \rm -fr
CP = cp -v
2010-02-11 10:37:15 +01:00
# Other tools
STYLE = astyle --style=gnu --formatted
CPPCHECK = cppcheck --enable=all
DOXYGEN = doxygen
Reconstitution du dépôt, étape 5 (et dernière) Le commentaire de révision initial figure ci-dessous. Les différences par rapport à ce commit sont : - Dans code/infrastructure-centred/owlps-client/ : importation des modifs de Julien dans la dernière version du client (Julien avait utilisé comme base une ancienne version). - Dans code/infrastructure-centred/owlps-listener/ : idem. - Dans code/owlps-positioning/ : ° Suppression de client (déplacé dans les archives). ° Makefile : ajout d'une pseudo-cible .PHONY. - code/writeInDb/ : ° Le binaire n'est pas versionné. ° Application de astyle --style=gnu. | r93 | jgraeffly | 2009-05-27 14:51:40 +0200 (mer 27 mai 2009) | 23 lines | Chemins modifiés : | R /code/infrastructure-centred/owlps-aggregator/owlps-aggregator.h | R /code/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c | R /code/infrastructure-centred/owlps-client/owlps-client.c | R /code/infrastructure-centred/owlps-listener/owlps-listener.h | R /code/infrastructure-centred/owlps-listener/owlps-listenerd.c | R /code/libowlps/owlps.h | R /code/owlps-positioning/Makefile | D /code/owlps-positioning/client | A /code/owlps-positioning/libowlps-positioning.cc | A /code/owlps-positioning/libowlps-positioning.hh | R /code/owlps-positioning/owlps-positioning.cc | A /code/owlps-positioning/owlps-positioning.cfg | R /code/owlps-positioning/owlps-positioning.hh | R /code/owlps-positioning/positioning.cc | R /code/owlps-positioning/positioning.hh | R /code/owlps-positioning/server.cc | R /code/owlps-positioning/server.hh | R /code/owlps-positioning/treatment.cc | R /code/owlps-positioning/treatment.hh | A /code/writeInDb | A /code/writeInDb/writeindb | A /code/writeInDb/writeindb.cc | A /code/writeInDb/writeindb.hh | | - Mise à jour du positioner : | Prise en charge de la BdD pour utilisation ainsi que pour la | sauvegarde des résultats | Envoi du résultat au client | Prise en compte du fichier de configuration ainsi que des | lignes de commande avec la library boost | | - Mise à jour de l'aggregator : | Pris en compte de la BdD pour la sauvegarde des requetes de | calibration ou de localisation | Envoi des demandes de localisation uniquement vers le | positioner | Ajout des options utilisables en ligne de commande et dans le | fichier de conf | | - Mise à jour du listener : | Ajout de l'envoi de l'adresse IP du mobile | | - Mise à jour du mobile : | Ajout de la socket de récupération de la réponse du serveur la | réponse est sous forme de 3 float (x, y, z) et non d'un Point. | | - Mise à jour de owlps.h : | Ajout des ports par défaut du positioner ainsi que du mobile. | | - Ajout de writeInDb : | Programme permettant de mettre les données contenu dans un | fichier dans la BdD git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@94 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-05-29 17:02:20 +02:00
2010-02-11 10:37:15 +01:00
# Compilation tools and flags
GXX = g++-4.4
#DEBUG = -g
TESTSGXXFLAGS = -I$(TESTS_DIR) -I.
2010-02-11 10:37:15 +01:00
GXXFLAGS = $(DEBUG) -Wall -Wextra
LD = $(GXX)
LDFLAGS = -lm -lrt -lboost_program_options
2010-02-11 10:37:15 +01:00
# Targets
TARGET = owlps-positioning
OBJ = posutil.o stock.o timestamp.o point3d.o referencepoint.o \
waypoint.o building.o area.o wifidevice.o accesspoint.o \
mobile.o measurement.o request.o calibrationrequest.o \
configuration.o userinterface.o input.o \
inputcsv.o inputlogcsv.o
OBJ_NOTEST = posexcept.o inputmedium.o
INTERFACES = inputlogmedium.hh
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:%.o=$(TESTS_DIR)/%_test.hh)
OBJ_TESTS = $(TESTUTIL_OBJ) $(TESTSETUP_OBJ)
INCLUDES_TESTS = $(TESTS_DIR)/valuetraits.hh
all: $(TARGET)
2010-02-11 10:37:15 +01:00
# Generic targets
$(TESTS_DIR)/%.o: $(TESTS_DIR)/%.cc $(TESTS_DIR)/%.hh
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
2010-02-11 10:37:15 +01:00
%.o: %.cc %.hh
$(GXX) $(GXXFLAGS) -c $<
%: %.o
$(LD) $(LDFLAGS) -o $@ $^
2010-02-11 10:37:15 +01:00
# Dependencies
userinterface.o: configuration.o
referencepoint.o: point3d.o
waypoint.o: point3d.o building.o
area.o: building.o point3d.o
wifidevice.o: posutil.o
accesspoint.o: wifidevice.o point3d.o
mobile.o: wifidevice.o
measurement.o: accesspoint.o
request.o: timestamp.o measurement.o
calibrationrequest.o: request.o referencepoint.o
inputcsv.o: inputmedium.o request.o stock.o
inputlogcsv.o: inputlogmedium.hh request.o
input.o: posexcept.o
2010-02-11 10:37:15 +01:00
# Specific targets
$(TARGET): $(OBJ) $(OBJ_NOTEST)
$(TESTS_XX): $(SOURCE_TESTS)
$(TESTS_DIR)/cxxtestgen.pl --error-printer \
--include=$(TESTS_DIR)/valuetraits.hh \
--include=$(TESTUTIL_OBJ:.o=.hh) \
-o $@ $^
$(TESTS_OBJ): $(TESTS_XX) $(OBJ) $(OBJ_NOTEST) $(INCLUDES_TESTS)
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
$(TESTS_TARGET): $(TESTS_OBJ) $(OBJ_TESTS)
$(LD) $(LDFLAGS) -o $@ $^ $(OBJ) $(OBJ_NOTEST)
test: $(TESTS_TARGET)
@$(TESTS_TARGET)
doc:
@$(DOXYGEN) $(DOXYFILE)
clean:
@$(RM) *~ *.o *.gch *.orig
@$(RM) $(TESTS_XX) $(TESTS_DIR)/*~ $(TESTS_DIR)/*.o \
$(TESTS_DIR)/*.orig
purge: clean
@$(RM) $(TARGET)
@$(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) \
$(OBJ:.o=.hh) \
$(OBJ:.o=.cc) \
$(OBJ_NOTEST:.o=.hh) \
$(OBJ_NOTEST:.o=.cc) \
$(INTERFACES) \
$(TESTS_DIR)/*.hh \
$(TESTS_DIR)/*.cc
check:
@$(CPPCHECK) \
$(OBJ:.o=.hh) $(OBJ:.o=.cc) \
$(OBJ_NOTEST:.o=.hh) $(OBJ_NOTEST:.o=.cc) \
$(INTERFACES) $(TARGET).cc