2017-03-17 23:14:30 +01:00
|
|
|
# Makefile.pylibfdt
|
|
|
|
#
|
|
|
|
|
2018-08-08 15:34:11 +02:00
|
|
|
PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
|
2017-03-17 23:14:30 +01:00
|
|
|
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
2018-11-23 11:24:44 +01:00
|
|
|
PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
|
|
|
|
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_objdir)/%)
|
|
|
|
PYLIBFDT_CLEANDIRS_L = build __pycache__
|
|
|
|
PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_objdir)/%)
|
2017-03-17 23:14:30 +01:00
|
|
|
|
2018-08-10 05:52:33 +02:00
|
|
|
SETUP = $(PYLIBFDT_srcdir)/setup.py
|
2018-08-10 05:55:38 +02:00
|
|
|
SETUPFLAGS =
|
|
|
|
|
|
|
|
ifndef V
|
|
|
|
SETUPFLAGS += --quiet
|
|
|
|
endif
|
2018-08-10 05:52:33 +02:00
|
|
|
|
2018-08-10 06:25:42 +02:00
|
|
|
$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
|
2017-03-17 23:14:30 +01:00
|
|
|
@$(VECHO) PYMOD $@
|
2018-07-09 12:38:59 +02:00
|
|
|
$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_objdir)
|
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)
|