OBJECTS = \ PatchCord.o \ CallCapture.o LIBRARIES = \ pcre DEPENDENCIES = \ dbus-1 CXXFLAGS := -fno-implicit-templates -D__STDC_CONSTANT_MACROS FLAGS := -g -rdynamic -fno-omit-frame-pointer -O3 -MMD $(foreach directory, $(DIRECTORIES), -I$(directory)) $(shell pkg-config --cflags $(DEPENDENCIES)) -DBUILD=\"$(BUILD)\" -DVERSION=$(VERSION) LIBS := -lstdc++ $(foreach library, $(LIBRARIES), -l$(library)) $(shell pkg-config --libs $(DEPENDENCIES)) # PREREQUISITES = CC = gcc CXX = g++ COMPILER_VERSION_FLAG := $(shell expr `${CXX} -dumpversion | cut -f1-2 -d.` \>= 4.9) CFLAGS += $(FLAGS) -std=gnu99 ifeq ($(COMPILER_VERSION_FLAG), 1) CXXFLAGS += $(FLAGS) -std=gnu++11 else CXXFLAGS += $(FLAGS) -std=gnu++0x endif all: build build: $(PREREQUISITES) $(OBJECTS) $(CC) $(OBJECTS) $(FLAGS) $(LIBS) -o callcapture clean: rm -f $(PREREQUISITES) $(OBJECTS) callcapture rm -f *.d */*.d .PHONY: all build clean install