855b9963de
At the moment we have some fiddly code to either pass in make's CPPFLAGS to setup.py, or have setup.py extract them from the Makefile. But really the only thing we need from here is the include paths. We already know what include paths we need (libfdt/) so we can just set that directly in setup.py. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Simon Glass <sjg@chromium.org>
20 lines
532 B
Makefile
20 lines
532 B
Makefile
# Makefile.pylibfdt
|
|
#
|
|
|
|
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
|
|
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
|
|
|
define run_setup
|
|
VERSION="$(dtc_version)"
|
|
$(PYLIBFDT_objdir)/setup.py --quiet $(1)
|
|
endef
|
|
|
|
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive)
|
|
@$(VECHO) PYMOD $@
|
|
$(call run_setup, build_ext --build-lib=$(PYLIBFDT_objdir))
|
|
|
|
install_pylibfdt: $(PYMODULE)
|
|
$(VECHO) INSTALL-PYLIB; \
|
|
$(call run_setup, install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX)))
|
|
|
|
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|