2017-03-17 23:14:30 +01:00
|
|
|
# Makefile.pylibfdt
|
|
|
|
#
|
|
|
|
|
2017-04-07 23:51:34 +02:00
|
|
|
PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
|
|
|
|
$(PYLIBFDT_srcdir)/libfdt.i
|
2017-03-17 23:14:30 +01:00
|
|
|
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
|
|
|
|
2017-04-07 23:51:32 +02:00
|
|
|
define run_setup
|
2018-08-10 04:39:18 +02:00
|
|
|
SOURCES="$(1)" CPPFLAGS="$(CPPFLAGS)" VERSION="$(dtc_version)"
|
2017-04-07 23:51:32 +02:00
|
|
|
$(PYLIBFDT_objdir)/setup.py --quiet $(2)
|
|
|
|
endef
|
2017-03-26 21:06:23 +02:00
|
|
|
|
2017-04-07 23:51:34 +02:00
|
|
|
$(PYMODULE): $(PYLIBFDT_srcs)
|
2017-03-17 23:14:30 +01:00
|
|
|
@$(VECHO) PYMOD $@
|
2018-08-10 04:39:18 +02:00
|
|
|
$(call run_setup, $^, build_ext --build-lib=$(PYLIBFDT_objdir))
|
2017-03-17 23:14:30 +01:00
|
|
|
|
2017-04-07 23:51:34 +02:00
|
|
|
install_pylibfdt: $(PYMODULE)
|
2017-03-26 21:06:21 +02:00
|
|
|
$(VECHO) INSTALL-PYLIB; \
|
2017-04-07 23:51:34 +02:00
|
|
|
$(call run_setup, $(PYLIBFDT_srcs), \
|
2017-03-26 21:06:23 +02:00
|
|
|
install $(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX)))
|
2017-03-26 21:06:21 +02:00
|
|
|
|
2017-03-17 23:14:30 +01:00
|
|
|
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|