2019-06-20 23:19:40 +02:00
|
|
|
# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
|
2017-03-17 23:14:30 +01:00
|
|
|
# Makefile.pylibfdt
|
|
|
|
#
|
|
|
|
|
2018-11-23 11:58:42 +01:00
|
|
|
PYLIBFDT_srcs = $(PYLIBFDT_dir)/libfdt.i
|
|
|
|
PYMODULE = $(PYLIBFDT_dir)/_libfdt.so
|
2018-11-23 11:24:44 +01:00
|
|
|
PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
|
2018-11-23 11:58:42 +01:00
|
|
|
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_dir)/%)
|
2018-11-23 11:24:44 +01:00
|
|
|
PYLIBFDT_CLEANDIRS_L = build __pycache__
|
2018-11-23 11:58:42 +01:00
|
|
|
PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_dir)/%)
|
2017-03-17 23:14:30 +01:00
|
|
|
|
2021-11-11 02:11:35 +01:00
|
|
|
SETUP = ./setup.py
|
2018-08-10 05:55:38 +02:00
|
|
|
|
|
|
|
ifndef V
|
|
|
|
SETUPFLAGS += --quiet
|
|
|
|
endif
|
2018-08-10 05:52:33 +02:00
|
|
|
|
2021-11-11 02:11:33 +01:00
|
|
|
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP)
|
2017-03-17 23:14:30 +01:00
|
|
|
@$(VECHO) PYMOD $@
|
2020-10-12 09:34:03 +02:00
|
|
|
$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=$(PYLIBFDT_dir)
|
2017-03-17 23:14:30 +01:00
|
|
|
|
2017-04-07 23:51:34 +02:00
|
|
|
install_pylibfdt: $(PYMODULE)
|
2018-08-10 06:37:52 +02:00
|
|
|
@$(VECHO) INSTALL-PYLIB
|
2018-11-23 11:51:35 +01:00
|
|
|
$(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(PREFIX)
|
2017-03-26 21:06:21 +02:00
|
|
|
|
2018-11-23 11:24:44 +01:00
|
|
|
pylibfdt_clean:
|
|
|
|
@$(VECHO) CLEAN "(pylibfdt)"
|
|
|
|
rm -f $(PYLIBFDT_CLEANFILES)
|
|
|
|
rm -rf $(PYLIBFDT_CLEANDIRS)
|