Files
android_external_dtc/pylibfdt/Makefile.pylibfdt
David Gibson 1e4a0928f3 pylibfdt: Don't have setup.py depend on where it's invoked from
Currently setup.py depends on being invoked from the right directory
(specifically it needs to be run from the root of the project).  That's a
bit confusing.

This updates setup.py to no longer depend on the invoking directory by
instead having it change directory to the location of the script itself,
then using internal paths relative to that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-25 10:31:54 +10:00

23 lines
562 B
Makefile

# Makefile.pylibfdt
#
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
SETUP = $(PYLIBFDT_srcdir)/setup.py
SETUPFLAGS =
ifndef V
SETUPFLAGS += --quiet
endif
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
@$(VECHO) PYMOD $@
$(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_objdir)
install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB
$(SETUP) $(SETUPFLAGS) install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX))
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so