mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-27 15:56:09 -04:00
Since we are using the standard .i extension for the swig file, we can use setup.py to build the wrapper. Drop the existing build code since it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
24 lines
654 B
Text
24 lines
654 B
Text
# Makefile.pylibfdt
|
|
#
|
|
|
|
PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
|
|
$(PYLIBFDT_srcdir)/libfdt.i
|
|
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
|
|
|
define run_setup
|
|
SOURCES="$(1)" CPPFLAGS="$(CPPFLAGS)" OBJDIR="$(PYLIBFDT_objdir)"
|
|
VERSION="$(dtc_version)"
|
|
$(PYLIBFDT_objdir)/setup.py --quiet $(2)
|
|
endef
|
|
|
|
$(PYMODULE): $(PYLIBFDT_srcs)
|
|
@$(VECHO) PYMOD $@
|
|
$(call run_setup, $^, build_ext --inplace)
|
|
mv _libfdt.so $@
|
|
|
|
install_pylibfdt: $(PYMODULE)
|
|
$(VECHO) INSTALL-PYLIB; \
|
|
$(call run_setup, $(PYLIBFDT_srcs), \
|
|
install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX)))
|
|
|
|
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|