Emese Revfy | 6b90bd4 | 2016-05-24 00:09:38 +0200 | [diff] [blame] | 1 | GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) |
| 2 | |
| 3 | ifeq ($(PLUGINCC),$(HOSTCC)) |
| 4 | HOSTLIBS := hostlibs |
| 5 | HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb |
| 6 | export HOST_EXTRACFLAGS |
| 7 | else |
| 8 | HOSTLIBS := hostcxxlibs |
| 9 | HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti |
| 10 | HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb |
| 11 | HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable |
| 12 | export HOST_EXTRACXXFLAGS |
| 13 | endif |
| 14 | |
| 15 | export GCCPLUGINS_DIR HOSTLIBS |
| 16 | |
Emese Revfy | 543c37c | 2016-05-24 00:11:37 +0200 | [diff] [blame] | 17 | ifneq ($(CFLAGS_KCOV), $(SANCOV_PLUGIN)) |
| 18 | GCC_PLUGIN := $(filter-out $(SANCOV_PLUGIN), $(GCC_PLUGIN)) |
| 19 | endif |
| 20 | |
Emese Revfy | 6b90bd4 | 2016-05-24 00:09:38 +0200 | [diff] [blame] | 21 | $(HOSTLIBS)-y := $(GCC_PLUGIN) |
| 22 | always := $($(HOSTLIBS)-y) |
| 23 | |
Emese Revfy | 0dae776 | 2016-05-24 00:10:35 +0200 | [diff] [blame] | 24 | cyc_complexity_plugin-objs := cyc_complexity_plugin.o |
Emese Revfy | 543c37c | 2016-05-24 00:11:37 +0200 | [diff] [blame] | 25 | sancov_plugin-objs := sancov_plugin.o |
| 26 | |
Emese Revfy | 6b90bd4 | 2016-05-24 00:09:38 +0200 | [diff] [blame] | 27 | clean-files += *.so |