
USERPCI_HEADERS := \
	../include/userpci/device.h \
	../include/userpci/firmware.h \
	../include/userpci/gfp.h \
	../include/userpci/list.h \
	../include/userpci/module.h \
	../include/userpci/slab.h \
	../include/userpci/string.h

$(USERPCI_HEADERS): ../include/userpci/%.h: rtapi/userpci/%.h
	@mkdir -p ../include/userpci
	cp  $^ $@

ifeq ($(USERMODE_PCI),yes)
# These headers need to remain in the 'userpci' subdirectory
SUBDIRECTORY_HEADERS += $(USERPCI_HEADERS)
INSTALL_DIRS += ../include/userpci

hostmot2-objs +=			  \
    rtapi/userpci/device.o		  \
    rtapi/userpci/firmware.o		  \
    rtapi/userpci/string.o

setsserial-objs +=			  \
    rtapi/userpci/device.o		  \
    rtapi/userpci/firmware.o		  \
    rtapi/userpci/string.o
endif

clean: userpci-clean
userpci-clean:
	rm -rf ../include/userpci
