include ../Makefile.inc

EXTRA_CFLAGS += -I. -DLXRT_MODULE -DLINUX_SIGNAL_HANDLER

lxrt-objs = lxrt.o hash.o msg.o tid.o proxies.o names.o qblk.o \
	usrf.o informed.o registry.o lxrt_table.o signal.o

export-objs = $(lxrt-objs)

obj-$(CONFIG_RTAI_LXRT) = $(lxrt-objs)

ifeq ("$(CONFIG_RTAI_LXRT)", "m")
do-module = "yes"
obj-m += rtai_lxrt.o
else
O_TARGET = rtai_lxrt.o
endif


include $(TOPDIR)/Rules.make

ifdef do-module
# we are building a module
rtai_lxrt.o: $(lxrt-objs)
	$(LD) -r -o $@ $(lxrt-objs)
endif
