diff --git a/infrastructure-centred/libowlps-client/Makefile b/infrastructure-centred/libowlps-client/Makefile index 69d8be5..57526fc 100644 --- a/infrastructure-centred/libowlps-client/Makefile +++ b/infrastructure-centred/libowlps-client/Makefile @@ -1,5 +1,8 @@ # Compilateur -CC = gcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CC = colorgcc +endif # Autres outils AR = ar diff --git a/infrastructure-centred/owlps-aggregator/Makefile b/infrastructure-centred/owlps-aggregator/Makefile index 555abe5..521ab10 100644 --- a/infrastructure-centred/owlps-aggregator/Makefile +++ b/infrastructure-centred/owlps-aggregator/Makefile @@ -6,7 +6,10 @@ INSTALL_INC= $(PREFIX)/include INSTALL_MAN= $(PREFIX)/share/man # Compilateur -CC = gcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CC = colorgcc +endif # Commandes d'installation et de désinstallation RM=rm -fv diff --git a/infrastructure-centred/owlps-client/Makefile b/infrastructure-centred/owlps-client/Makefile index 059b702..3ca989a 100644 --- a/infrastructure-centred/owlps-client/Makefile +++ b/infrastructure-centred/owlps-client/Makefile @@ -6,7 +6,10 @@ INSTALL_INC= $(PREFIX)/include INSTALL_MAN= $(PREFIX)/share/man # Compilateur -CC = gcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CC = colorgcc +endif # Commandes d'installation et de désinstallation RM=rm -fv diff --git a/infrastructure-centred/owlps-listener/Makefile b/infrastructure-centred/owlps-listener/Makefile index 8e36ce6..b3e789f 100644 --- a/infrastructure-centred/owlps-listener/Makefile +++ b/infrastructure-centred/owlps-listener/Makefile @@ -6,7 +6,10 @@ INSTALL_INC= $(PREFIX)/include INSTALL_MAN= $(PREFIX)/share/man # Compilateur -CC = gcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CC = colorgcc +endif # Commandes d'installation et de désinstallation RM=rm -fv diff --git a/libowlps/Makefile b/libowlps/Makefile index f2fb2dc..f0289e1 100644 --- a/libowlps/Makefile +++ b/libowlps/Makefile @@ -5,7 +5,10 @@ INSTALL_INC= $(PREFIX)/include INSTALL_MAN= $(PREFIX)/share/man # Compilateur -CC = gcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CC = colorgcc +endif # Autres outils AR = ar diff --git a/owlps-positioning/Makefile b/owlps-positioning/Makefile index a1af7cc..8b64c42 100644 --- a/owlps-positioning/Makefile +++ b/owlps-positioning/Makefile @@ -23,11 +23,14 @@ CPPCHECK = cppcheck --enable=all DOXYGEN = doxygen >/dev/null # Compilation tools and flags -GXX = colorgcc +COLORGCC := $(shell which colorgcc >/dev/null 2>&1 ; echo $$?) +ifeq ($(COLORGCC), 0) + CXX = colorgcc +endif #DEBUG = -g TESTSGXXFLAGS = -I$(TESTS_DIR) -I$(SRC_DIR) -I. GXXFLAGS = $(DEBUG) -Wall -Wextra -LD = $(GXX) +LD = $(CXX) LDFLAGS = -lm -lrt -lboost_program_options # Targets @@ -107,10 +110,10 @@ all: prepare $(TARGET) # Generic targets $(TESTS_DIR)/%.o: $(TESTS_DIR)/%.cc $(TESTS_DIR)/%.hh - $(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $< + $(CXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $< $(OBJ_DIR)/%.o: $(SRC_DIR)/%.cc $(SRC_DIR)/%.hh - $(GXX) $(GXXFLAGS) -o $@ -c $< + $(CXX) $(GXXFLAGS) -o $@ -c $< %: $(OBJ_DIR)/%.o $(LD) $(LDFLAGS) -o $@ $^ @@ -243,7 +246,7 @@ $(OBJ_DIR)/positioning.o: \ $(TARGET): $(OBJ) $(OBJ_NOTEST) $(OBJ_TARGET) $(OBJ_TARGET): $(SOURCE_TARGET) - $(GXX) $(GXXFLAGS) -o $@ -c $< + $(CXX) $(GXXFLAGS) -o $@ -c $< $(TESTS_XX): $(SOURCE_TESTS) $(OBJ) $(TESTS_DIR)/cxxtestgen.pl --error-printer \ @@ -252,7 +255,7 @@ $(TESTS_XX): $(SOURCE_TESTS) $(OBJ) -o $@ $(SOURCE_TESTS) $(TESTS_OBJ): $(TESTS_XX) $(INCLUDES_TESTS) - $(GXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $< + $(CXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $< $(TESTS_TARGET): $(TESTS_OBJ) $(OBJ_TESTS) $(OBJ) $(OBJ_NOTEST) $(LD) $(LDFLAGS) -o $@ $^