43 lines
1 KiB
Makefile
43 lines
1 KiB
Makefile
DIRECTORIES = \
|
|
echolink
|
|
|
|
OBJECTS = \
|
|
echolink/UserDataStore.o \
|
|
echolink/PatchCordProxy.o \
|
|
echolink/BrandMeisterBridge.o \
|
|
Test.o
|
|
|
|
LIBRARIES = \
|
|
mysqlclient
|
|
|
|
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 unit-test
|
|
|
|
clean:
|
|
rm -f $(PREREQUISITES) $(OBJECTS) unit-test
|
|
rm -f *.d */*.d
|
|
|
|
.PHONY: all build clean install config binary system
|