[Positioning] Clean Makefile
This commit is contained in:
parent
9cf4daca3b
commit
c341f852b7
|
@ -1,4 +1,4 @@
|
|||
.PHONY : all obj test doc clean purge install uninstall style check
|
||||
.PHONY : all test doc clean purge install uninstall style check
|
||||
|
||||
TEST_DIR = tests
|
||||
TEST_XX = $(TEST_DIR)/tests.cc
|
||||
|
@ -7,30 +7,30 @@ TEST_TARGET = $(TEST_DIR)/tests
|
|||
DOXYGEN_DIR = doc
|
||||
DOXYFILE = Doxyfile
|
||||
|
||||
# Répertoire d'installation
|
||||
# Installation directory
|
||||
PREFIX = /usr/local
|
||||
INSTALL_DIR = $(PREFIX)/bin
|
||||
|
||||
# Commandes d'installation et de désinstallation
|
||||
# System tools
|
||||
RM = rm -fv
|
||||
RM_RECURSIVE = \rm -fr
|
||||
CP = cp -v
|
||||
|
||||
# Autres outils
|
||||
# Other tools
|
||||
STYLE = astyle --style=gnu --formatted
|
||||
CPPCHECK = cppcheck --enable=all
|
||||
DOXYGEN = doxygen
|
||||
|
||||
# Compilation tools and flags
|
||||
GXX = g++-4.4
|
||||
#DEBUG = -g
|
||||
TESTSGXXFLAGS = -I$(TEST_DIR) -I.
|
||||
GXXFLAGS = $(DEBUG) -Wall -Wextra $(STLPORTGXXFLAGS)
|
||||
GXXFLAGS = $(DEBUG) -Wall -Wextra
|
||||
LD = $(GXX)
|
||||
LDFLAGS = -lm -lrt -lboost_program_options
|
||||
#LIBS = -lpq
|
||||
|
||||
# Targets
|
||||
TARGET = owlps-positioning
|
||||
#HEADER = owlps-positioning.hh
|
||||
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 \
|
||||
|
@ -38,40 +38,30 @@ OBJ = posutil.o stock.o timestamp.o point3d.o referencepoint.o \
|
|||
|
||||
all: $(TARGET)
|
||||
|
||||
# Generic targets
|
||||
%: %.o
|
||||
$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
%.o: %.cc $(HEADER)
|
||||
%.o: %.cc %.hh
|
||||
$(GXX) $(GXXFLAGS) -c $<
|
||||
|
||||
$(TEST_DIR)/%_test.o: %.o
|
||||
$(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -c $<
|
||||
|
||||
posutil.o: posutil.hh
|
||||
stock.o: stock.hh
|
||||
configuration.o: configuration.hh
|
||||
userinterface.o: userinterface.hh configuration.o
|
||||
timestamp.o: timestamp.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 timestamp.o 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)
|
||||
# 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)/valuetraits.hh
|
||||
|
@ -93,7 +83,7 @@ doc:
|
|||
|
||||
clean:
|
||||
@$(RM) *~ *.o *.gch *.orig
|
||||
@$(RM) $(TEST_OBJ) $(TEST_XX) $(TEST_DIR)/*~ $(TEST_DIR)/*.o \
|
||||
@$(RM) $(TEST_XX) $(TEST_DIR)/*~ $(TEST_DIR)/*.o \
|
||||
$(TEST_DIR)/*.orig
|
||||
|
||||
purge: clean
|
||||
|
|
Loading…
Reference in New Issue