2010-02-02 12:51:50 +01:00
|
|
|
.PHONY : all obj test doc clean purge install uninstall style check
|
2010-01-16 12:23:07 +01:00
|
|
|
|
2010-02-02 12:51:50 +01:00
|
|
|
TEST_DIR = tests
|
|
|
|
TEST_XX = $(TEST_DIR)/tests.cc
|
|
|
|
TEST_OBJ = $(TEST_DIR)/tests.o
|
|
|
|
TEST_TARGET = $(TEST_DIR)/tests
|
2010-01-16 12:23:07 +01:00
|
|
|
DOXYGEN_DIR = doc
|
|
|
|
DOXYFILE = Doxyfile
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
|
|
|
# Répertoire d'installation
|
|
|
|
PREFIX = /usr/local
|
|
|
|
INSTALL_DIR = $(PREFIX)/bin
|
|
|
|
|
|
|
|
# Commandes d'installation et de désinstallation
|
|
|
|
RM = rm -fv
|
2010-02-04 18:46:23 +01:00
|
|
|
RM_RECURSIVE = \rm -fr
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
CP = cp -v
|
|
|
|
|
|
|
|
# Autres outils
|
|
|
|
STYLE = astyle --style=gnu
|
2010-01-18 14:19:57 +01:00
|
|
|
CPPCHECK = cppcheck --enable=all
|
2010-01-16 12:23:07 +01:00
|
|
|
DOXYGEN = doxygen
|
2009-05-29 17:02:20 +02:00
|
|
|
|
2010-01-11 19:40:45 +01:00
|
|
|
GXX = g++-4.4
|
2010-02-01 17:36:45 +01:00
|
|
|
#DEBUG = -g
|
2010-02-02 12:51:50 +01:00
|
|
|
TESTSGXXFLAGS = -I$(TEST_DIR) -I.
|
2010-01-11 19:40:45 +01:00
|
|
|
GXXFLAGS = $(DEBUG) -Wall -Wextra $(STLPORTGXXFLAGS)
|
|
|
|
LD = $(GXX)
|
2010-02-01 17:36:45 +01:00
|
|
|
LDFLAGS = -lm -lrt
|
2009-07-03 14:29:40 +02:00
|
|
|
LIBS = -lpq -lboost_program_options-mt
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2009-05-29 14:39:35 +02:00
|
|
|
TARGET = owlps-positioning
|
2010-02-01 17:36:45 +01:00
|
|
|
#HEADER = owlps-positioning.hh
|
2010-02-03 17:03:31 +01:00
|
|
|
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
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
all: $(TARGET)
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
%: %.o
|
2009-05-29 17:02:20 +02:00
|
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
2010-02-01 17:36:45 +01:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
%.o: %.cc $(HEADER)
|
2008-05-29 10:48:05 +02:00
|
|
|
$(GXX) $(GXXFLAGS) -c $<
|
|
|
|
|
2010-02-02 12:51:50 +01:00
|
|
|
$(TEST_DIR)/%_test.o: %.o
|
|
|
|
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -c $<
|
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
posutil.o: posutil.hh
|
2010-01-12 00:31:22 +01:00
|
|
|
stock.o: stock.hh
|
2010-02-03 17:03:31 +01:00
|
|
|
timestamp.o: timestamp.hh
|
2009-12-14 15:45:16 +01:00
|
|
|
point3d.o: point3d.hh
|
2010-01-11 19:40:45 +01:00
|
|
|
referencepoint.o : referencepoint.hh point3d.o
|
|
|
|
waypoint.o: waypoint.hh point3d.o building.o
|
2009-12-14 15:45:16 +01:00
|
|
|
building.o: building.hh
|
2010-01-11 19:40:45 +01:00
|
|
|
area.o: area.hh building.o point3d.o
|
|
|
|
wifidevice.o: wifidevice.hh posutil.o
|
|
|
|
accesspoint.o: accesspoint.hh wifidevice.o point3d.o
|
|
|
|
mobile.o: mobile.hh wifidevice.o
|
|
|
|
measurement.o: measurement.hh accesspoint.o
|
|
|
|
calibrationmeasurement.o: calibrationmeasurement.hh measurement.o referencepoint.o
|
2010-02-03 17:03:31 +01:00
|
|
|
request.o: request.hh timestamp.o measurement.o
|
2010-01-12 00:31:22 +01:00
|
|
|
inputcsv.o: inputcsv.hh inputmedium.hh request.o stock.o
|
2009-12-14 15:45:16 +01:00
|
|
|
#libowlps-positioning.o: libowlps-positioning.hh
|
|
|
|
#positioning.o: point.hh referencepoint.hh accesspoint.hh area.hh measurement.hh libowlps-positioning.hh
|
|
|
|
#server.o: server.hh positioning.hh point.hh measurement.hh treatment.hh libowlps-positioning.hh
|
|
|
|
#owlps-positioning.o: server.hh
|
|
|
|
#treatment.o: treatment.hh point.hh measurement.hh referencepoint.hh accesspoint.hh libowlps-positioning.hh
|
2008-05-29 10:48:05 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
obj: $(OBJ)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJ)
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2010-02-04 18:46:23 +01:00
|
|
|
$(TEST_XX): $(OBJ:%.o=$(TEST_DIR)/%_test.hh) $(TEST_DIR)/valuetraits.hh
|
|
|
|
$(TEST_DIR)/cxxtestgen.pl --error-printer \
|
|
|
|
--include=$(TEST_DIR)/valuetraits.hh \
|
|
|
|
-o $@ $^
|
2010-02-02 12:51:50 +01:00
|
|
|
|
|
|
|
$(TEST_OBJ): $(TEST_XX) $(OBJ)
|
|
|
|
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
$(TEST_TARGET): $(TEST_OBJ)
|
|
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(OBJ)
|
|
|
|
|
|
|
|
test: $(TEST_TARGET)
|
|
|
|
@$(TEST_TARGET)
|
|
|
|
|
2010-01-16 12:23:07 +01:00
|
|
|
doc:
|
|
|
|
@$(DOXYGEN) $(DOXYFILE)
|
|
|
|
|
2008-04-11 10:11:29 +02:00
|
|
|
clean:
|
2010-01-16 12:23:07 +01:00
|
|
|
@$(RM) *~ *.o *.gch *.orig
|
2010-02-02 12:51:50 +01:00
|
|
|
@$(RM) $(TEST_OBJ) $(TEST_XX) $(TEST_DIR)/*~ $(TEST_DIR)/*.o \
|
|
|
|
$(TEST_DIR)/*.orig
|
2008-04-15 12:19:15 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
purge: clean
|
2010-01-16 12:23:07 +01:00
|
|
|
@$(RM) $(TARGET)
|
2010-02-02 12:51:50 +01:00
|
|
|
@$(RM) $(TEST_TARGET)
|
2010-01-16 12:23:07 +01:00
|
|
|
@$(RM_RECURSIVE) $(DOXYGEN_DIR)
|
2008-10-09 09:44:48 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
install: $(TARGET)
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
@$(CP) $(TARGET) $(INSTALL_DIR) && \
|
|
|
|
chmod 755 $(INSTALL_DIR)/$(TARGET) && \
|
|
|
|
chown root:root $(INSTALL_DIR)/$(TARGET)
|
2008-10-09 09:44:48 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
uninstall:
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
@$(RM) $(INSTALL_DIR)/$(TARGET)
|
2009-05-29 14:39:35 +02:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
style:
|
2010-02-01 17:36:45 +01:00
|
|
|
@$(STYLE) \
|
|
|
|
$(OBJ:.o=.hh) \
|
|
|
|
$(OBJ:.o=.cc) \
|
2010-02-02 12:51:50 +01:00
|
|
|
inputmedium.hh \
|
|
|
|
$(OBJ:%.o=$(TEST_DIR)/%_test.hh)
|
2010-01-18 14:19:57 +01:00
|
|
|
|
|
|
|
check:
|
|
|
|
@$(CPPCHECK) $(OBJ:.o=.hh) $(OBJ:.o=.cc) inputmedium.hh
|