dtc/pylibfdt/Makefile.pylibfdt
David Gibson 48795c82bd pylibfdt: Don't emit warnings from swig generate C code
The swig generated code has a heap of warnings with the flags we usually
use.  These aren't helpful, since there's nothing we can do about them from
the dtc side.  So, just disable the warnings flags when compiling the
Python module.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-11-06 14:00:45 +11:00

30 lines
911 B
Text

# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
# Makefile.pylibfdt
#
PYLIBFDT_srcs = $(PYLIBFDT_dir)/libfdt.i
PYMODULE = $(PYLIBFDT_dir)/_libfdt.so
PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_dir)/%)
PYLIBFDT_CLEANDIRS_L = __pycache__ libfdt.egg-info
PYLIBFDT_CLEANDIRS = build $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_dir)/%)
SETUP = ./setup.py
ifndef V
SETUPFLAGS += --quiet
endif
$(PYMODULE): WARNINGS = # suppress warnings from generated code
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP)
@$(VECHO) PYMOD $@
CFLAGS="$(CFLAGS) -Wno-error" $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext
install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB
$(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(PREFIX)
pylibfdt_clean:
@$(VECHO) CLEAN "(pylibfdt)"
rm -f $(PYLIBFDT_CLEANFILES)
rm -rf $(PYLIBFDT_CLEANDIRS)