21 lines
555 B
Makefile
21 lines
555 B
Makefile
# Makefile.pylibfdt
|
|
#
|
|
|
|
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
|
|
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
|
|
|
define run_setup
|
|
CPPFLAGS="$(CPPFLAGS)" 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
|