File: Makefile.pylibfdt

package info (click to toggle)
device-tree-compiler 1.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,116 kB
  • sloc: ansic: 13,916; sh: 1,200; asm: 713; lex: 522; python: 507; yacc: 499; makefile: 313; perl: 74
file content (30 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download
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
# 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) --root=/ --install-lib=$(PREFIX)/lib/python3/dist-packages --install-layout=deb --single-version-externally-managed

pylibfdt_clean:
	@$(VECHO) CLEAN "(pylibfdt)"
	rm -f $(PYLIBFDT_CLEANFILES)
	rm -rf $(PYLIBFDT_CLEANDIRS)