MODULE_HELPERSRCS := \
	module_helper/module_helper.c \
	rtapi/rtapi_compat.c
USERSRCS += $(MODULE_HELPERSRCS)

$(call TOOBJSDEPS, $(MODULE_HELPERSRCS)) : \
	EXTRAFLAGS += -Wall -Werror $(THREADS_CFLAGS)

../libexec/linuxcnc_module_helper: $(call TOOBJS, $(MODULE_HELPERSRCS)) \
		../lib/liblinuxcncini.so.0
	$(ECHO) Linking $(notdir $@)
	@mkdir -p $(dir $@)
	$(Q)$(CXX) $(LDFLAGS) -o $@ $^

TARGETS += ../libexec/linuxcnc_module_helper
