.PHONY : all clean purge install uninstall style # Répertoire d'installation PREFIX = /usr/local INSTALL_DIR = $(PREFIX)/bin # Commandes d'installation et de désinstallation RM = rm -fv CP = cp -v # Autres outils STYLE = astyle --style=gnu GXX = g++ DEBUG = -g GXXFLAGS = $(DEBUG) -Wall -pedantic LD = g++ LDFLAGS = -lm LIBS = -lpq -lboost_program_options-mt TARGET = owlps-positioning HEADER = owlps-positioning.hh all : ${TARGET} % : %.o $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) %.o : %.cc $(HEADER) $(GXX) $(GXXFLAGS) -c $< 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 referencepoint.o : referencepoint.hh measurement.hh point.hh accesspoint.o : accesspoint.hh point.hh point.o : point.hh measurement.o : measurement.hh area.o : area.hh point.hh treatment.o : treatment.hh point.hh measurement.hh referencepoint.hh accesspoint.hh libowlps-positioning.hh owlps-positioning.o : server.hh ${TARGET} : point.o measurement.o accesspoint.o referencepoint.o positioning.o server.o area.o treatment.o libowlps-positioning.o owlps-positioning.o clean: @rm -fv *~ *.o *.orig purge : clean @rm -f $(TARGET) install : $(TARGET) @$(CP) $(TARGET) $(INSTALL_DIR) && \ chmod 755 $(INSTALL_DIR)/$(TARGET) && \ chown root:root $(INSTALL_DIR)/$(TARGET) uninstall : @$(RM) $(INSTALL_DIR)/$(TARGET) style : @$(STYLE) *.cc *.hh