USER_COMP_PY = pyvcp hal_input gladevcp $(patsubst %, ../bin/%, $(USER_COMP_PY)) : ../bin/%: hal/user_comps/%.py @$(ECHO) Syntax checking python script $(notdir $@) $(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' $< $(ECHO) Copying python script $(notdir $@) $(Q)(echo '#!$(PYTHON)'; sed '1 { /^#!/d; }' $<) > $@.tmp && chmod +x $@.tmp && mv -f $@.tmp $@ PYTARGETS += $(patsubst %, ../bin/%, $(USER_COMP_PY)) ifdef HAVE_LIBMODBUS3 MODBUSSRCS := hal/user_comps/gs2_vfd.c MODBUSLDFLAGS := $(GLIB_LIBS) $(LIBMODBUS_LIBS) MODBUSCCFLAGS := $(GLIB_CFLAGS) $(LIBMODBUS_CFLAGS) USERSRCS += $(MODBUSSRCS) $(call TOOBJSDEPS, $(MODBUSSRCS)) : EXTRAFLAGS += $(MODBUSCCFLAGS) ../bin/gs2_vfd: $(call TOOBJS, $(MODBUSSRCS)) ../lib/liblinuxcnchal.so.0 $(ECHO) Linking $(notdir $@) $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(MODBUSLDFLAGS) TARGETS += ../bin/gs2_vfd endif # HAVE_LIBMODBUS ifeq ($(HIDRAW_H_USABLE),yes) SHUTTLEXPRESS_SRC = hal/user_comps/shuttlexpress.c USERSRCS += $(SHUTTLEXPRESS_SRC) ../bin/shuttlexpress: $(call TOOBJS, $(SHUTTLEXPRESS_SRC)) ../lib/liblinuxcnchal.so.0 $(ECHO) Linking $(notdir $@) $(Q)$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/shuttlexpress endif ifdef HAVE_LIBUSB10 XHC_HB04_SRC = hal/user_comps/xhc-hb04.cc USERSRCS += $(XHC_HB04_SRC) $(call TOOBJSDEPS, $(XHC_HB04_SRC)) : EXTRAFLAGS += $(LIBUSB10_CFLAGS) ../bin/xhc-hb04: $(call TOOBJS, $(XHC_HB04_SRC)) ../lib/liblinuxcnchal.so.0 ../lib/liblinuxcncini.so.0 $(ECHO) Linking $(notdir $@) $(Q)$(CC) $(LDFLAGS) -o $@ $^ -lm -lstdc++ $(LIBUSB10_LIBS) TARGETS += ../bin/xhc-hb04 endif # HAVE_LIBUSB10 ../include/%.h: ./hal/user_comps/%.h cp $^ $@ ../include/%.hh: ./hal/user_comps/%.hh cp $^ $@