mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
At present setup.py adjusts its command line when running, so that the C flags and file list can be passed as arguments. Pass them in environment variables instead, so we can avoid this messiness. It also allows us to support the 'install' command. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
18 lines
510 B
Text
18 lines
510 B
Text
# 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)" \
|
|
python $(PYLIBFDT_objdir)/setup.py --quiet build_ext --inplace
|
|
mv _libfdt.so $(PYMODULE)
|
|
|
|
$(WRAP): $(PYLIBFDT_srcdir)/libfdt.swig
|
|
@$(VECHO) SWIG $@
|
|
$(SWIG) -python -o $@ $<
|
|
|
|
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|