obj-$(CONFIG_EXCHND) += exception_handler.o
exception_handler-objs := exchnd.o modules.o triggers.o \
	ioctl.o device_buffer.o exception_queue.o \
	filter.o watchdog.o

exception_handler-$(CONFIG_ARM) += arch/modules/arm.o
exception_handler-$(CONFIG_ARM64) += arch/modules/arm64.o

ifeq ($(CONFIG_64BIT), y)
exception_handler-$(CONFIG_X86) += arch/modules/x86_64.o
else
exception_handler-$(CONFIG_X86) += arch/modules/x86.o
endif

ifneq ($(CONFIG_EXCHND_USE_PROFILING), y)
	exception_handler-objs += noprofiling.o
	exception_handler-$(CONFIG_ARM64) += arch/triggers/arm64.o
	exception_handler-$(CONFIG_ARM) += arch/triggers/arm.o
ifeq ($(CONFIG_64BIT), y)
	exception_handler-$(CONFIG_X86) += arch/triggers/x86_64.o
else
	exception_handler-$(CONFIG_X86) += arch/triggers/x86.o
endif

else
	exception_handler-objs += profiling.o
endif

obj-$(CONFIG_EXCHND_TEST) += exchnd_test/
