91 lines
2.3 KiB
Makefile
91 lines
2.3 KiB
Makefile
.PHONY : all obj doc clean purge install uninstall style check
|
|
|
|
DOXYGEN_DIR = doc
|
|
DOXYFILE = Doxyfile
|
|
|
|
# Répertoire d'installation
|
|
PREFIX = /usr/local
|
|
INSTALL_DIR = $(PREFIX)/bin
|
|
|
|
# Commandes d'installation et de désinstallation
|
|
RM = rm -fv
|
|
RM_RECURSIVE = $(RM) -r
|
|
CP = cp -v
|
|
|
|
# Autres outils
|
|
STYLE = astyle --style=gnu
|
|
CPPCHECK = cppcheck --enable=all
|
|
DOXYGEN = doxygen
|
|
|
|
GXX = g++-4.4
|
|
#DEBUG = -g
|
|
GXXFLAGS = $(DEBUG) -Wall -Wextra $(STLPORTGXXFLAGS)
|
|
LD = $(GXX)
|
|
LDFLAGS = -lm -lrt
|
|
LIBS = -lpq -lboost_program_options-mt
|
|
|
|
TARGET = owlps-positioning
|
|
#HEADER = owlps-positioning.hh
|
|
OBJ = posutil.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 stock.o
|
|
|
|
all: $(TARGET)
|
|
|
|
%: %.o
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
%.o: %.cc $(HEADER)
|
|
$(GXX) $(GXXFLAGS) -c $<
|
|
|
|
posutil.o: posutil.hh
|
|
stock.o: stock.hh
|
|
point3d.o: point3d.hh
|
|
referencepoint.o : referencepoint.hh point3d.o
|
|
waypoint.o: waypoint.hh point3d.o building.o
|
|
building.o: building.hh
|
|
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
|
|
request.o: request.hh measurement.o
|
|
inputcsv.o: inputcsv.hh inputmedium.hh request.o stock.o
|
|
#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
|
|
|
|
obj: $(OBJ)
|
|
|
|
$(TARGET): $(OBJ)
|
|
|
|
doc:
|
|
@$(DOXYGEN) $(DOXYFILE)
|
|
|
|
clean:
|
|
@$(RM) *~ *.o *.gch *.orig
|
|
|
|
purge: clean
|
|
@$(RM) $(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
|
|
|
|
check:
|
|
@$(CPPCHECK) $(OBJ:.o=.hh) $(OBJ:.o=.cc) inputmedium.hh
|