owlps/owlps-positioning/Makefile

116 lines
2.6 KiB
Makefile
Raw Normal View History

2010-02-11 10:37:15 +01:00
.PHONY : all test doc clean purge install uninstall style check
TEST_DIR = tests
TEST_XX = $(TEST_DIR)/tests.cc
TEST_OBJ = $(TEST_DIR)/tests.o
TESTUTIL_OBJ = $(TEST_DIR)/testutil.o
TEST_TARGET = $(TEST_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$(TEST_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 calibrationmeasurement.o request.o \
inputcsv.o configuration.o userinterface.o
all: $(TARGET)
2010-02-11 10:37:15 +01:00
# Generic targets
%: %.o
$(LD) $(LDFLAGS) -o $@ $^
2010-02-11 10:37:15 +01:00
%.o: %.cc %.hh
$(GXX) $(GXXFLAGS) -c $<
$(TEST_DIR)/%_test.o: %.o
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -c $<
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
calibrationmeasurement.o: measurement.o referencepoint.o
request.o: timestamp.o measurement.o
inputcsv.o: inputmedium.hh request.o stock.o
# Specific targets
$(TARGET): $(OBJ)
$(TEST_XX): $(OBJ:%.o=$(TEST_DIR)/%_test.hh)
$(TEST_DIR)/cxxtestgen.pl --error-printer \
--include=$(TEST_DIR)/valuetraits.hh \
--include=$(TESTUTIL_OBJ:.o=.hh) \
-o $@ $^
$(TEST_OBJ): $(TEST_XX) $(OBJ) $(TESTUTIL_OBJ) $(TEST_DIR)/valuetraits.hh
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
$(TESTUTIL_OBJ): $(TESTUTIL_OBJ:.o=.cc) $(TESTUTIL_OBJ:.o=.hh)
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
$(TEST_TARGET): $(TEST_OBJ) $(TESTUTIL_OBJ)
$(LD) $(LDFLAGS) -o $@ $^ $(OBJ)
test: $(TEST_TARGET)
@$(TEST_TARGET)
doc:
@$(DOXYGEN) $(DOXYFILE)
clean:
@$(RM) *~ *.o *.gch *.orig
2010-02-11 10:37:15 +01:00
@$(RM) $(TEST_XX) $(TEST_DIR)/*~ $(TEST_DIR)/*.o \
$(TEST_DIR)/*.orig
purge: clean
@$(RM) $(TARGET)
@$(RM) $(TEST_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) \
inputmedium.hh \
$(OBJ:%.o=$(TEST_DIR)/%_test.hh)
check:
@$(CPPCHECK) $(OBJ:.o=.hh) $(OBJ:.o=.cc) inputmedium.hh