blob: a74cd30f051eccc3e37f799a09fb9d6778b77976 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# Makefile.pylibfdt
#
PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS))
WRAP = $(PYLIBFDT_objdir)/libfdt_wrap.c
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
$(PYMODULE): $(PYLIBFDT_srcs) $(WRAP)
@$(VECHO) PYMOD $@
SOURCES="$^" CPPFLAGS="$(CPPFLAGS)" OBJDIR="$(PYLIBFDT_objdir)" \
VERSION="$(dtc_version)" \
python $(PYLIBFDT_objdir)/setup.py --quiet build_ext --inplace
$(WRAP): $(PYLIBFDT_srcdir)/libfdt.swig
@$(VECHO) SWIG $@
$(SWIG) -python -o $@ $<
install_pylibfdt: $(WRAP) $(PYMODULE)
$(VECHO) INSTALL-PYLIB; \
SOURCES="$(PYLIBFDT_srcs) $(WRAP)" CPPFLAGS="$(CPPFLAGS)" \
OBJDIR="$(PYLIBFDT_objdir)" VERSION="$(dtc_version)" \
python $(PYLIBFDT_objdir)/setup.py --quiet install \
$(if $(SETUP_PREFIX),--prefix=$(SETUP_PREFIX))
maybe_install_pylibfdt:
if [ -e $(PYMODULE) ]; then \
if [ -z "$(NO_PYTHON)" ]; then \
$(MAKE) install_pylibfdt; \
fi; \
fi
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|