mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 19:42:19 +00:00
This will install C library, specs, rsts and pyynl. The initial
structure is:
$ mkdir /tmp/myroot
$ make DESTDIR=/tmp/myroot install
/usr
/usr/lib64
/usr/lib64/libynl.a
/usr/lib/python3.XX/site-packages/pyynl/*
/usr/lib/python3.XX/site-packages/pyynl-0.0.1.dist-info/*
/usr/bin
/usr/bin/ynl
/usr/bin/ynl-ethtool
/usr/include/ynl/*.h
/usr/share
/usr/share/doc
/usr/share/doc/ynl
/usr/share/doc/ynl/*.rst
/usr/share/ynl
/usr/share/ynl/genetlink-c.yaml
/usr/share/ynl/genetlink-legacy.yaml
/usr/share/ynl/genetlink.yaml
/usr/share/ynl/netlink-raw.yaml
/usr/share/ynl/specs
/usr/share/ynl/specs/devlink.yaml
/usr/share/ynl/specs/dpll.yaml
/usr/share/ynl/specs/ethtool.yaml
/usr/share/ynl/specs/fou.yaml
/usr/share/ynl/specs/handshake.yaml
/usr/share/ynl/specs/mptcp_pm.yaml
/usr/share/ynl/specs/netdev.yaml
/usr/share/ynl/specs/net_shaper.yaml
/usr/share/ynl/specs/nfsd.yaml
/usr/share/ynl/specs/nftables.yaml
/usr/share/ynl/specs/nlctrl.yaml
/usr/share/ynl/specs/ovs_datapath.yaml
/usr/share/ynl/specs/ovs_flow.yaml
/usr/share/ynl/specs/ovs_vport.yaml
/usr/share/ynl/specs/rt_addr.yaml
/usr/share/ynl/specs/rt_link.yaml
/usr/share/ynl/specs/rt_neigh.yaml
/usr/share/ynl/specs/rt_route.yaml
/usr/share/ynl/specs/rt_rule.yaml
/usr/share/ynl/specs/tcp_metrics.yaml
/usr/share/ynl/specs/tc.yaml
/usr/share/ynl/specs/team.yaml
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/c882688d751295c7f35c7d4eba104cd5174a0861.1736343575.git.jstancek@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
53 lines
1.2 KiB
Makefile
53 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
include ../../scripts/Makefile.arch
|
|
|
|
INSTALL ?= install
|
|
prefix ?= /usr
|
|
ifeq ($(LP64), 1)
|
|
libdir_relative = lib64
|
|
else
|
|
libdir_relative = lib
|
|
endif
|
|
libdir ?= $(prefix)/$(libdir_relative)
|
|
includedir ?= $(prefix)/include
|
|
|
|
SUBDIRS = lib generated samples
|
|
|
|
all: $(SUBDIRS) libynl.a
|
|
|
|
samples: | lib generated
|
|
libynl.a: | lib generated
|
|
@echo -e "\tAR $@"
|
|
@ar rcs $@ lib/ynl.o generated/*-user.o
|
|
|
|
$(SUBDIRS):
|
|
@if [ -f "$@/Makefile" ] ; then \
|
|
$(MAKE) -C $@ ; \
|
|
fi
|
|
|
|
clean distclean:
|
|
@for dir in $(SUBDIRS) ; do \
|
|
if [ -f "$$dir/Makefile" ] ; then \
|
|
$(MAKE) -C $$dir $@; \
|
|
fi \
|
|
done
|
|
rm -f libynl.a
|
|
rm -rf pyynl/__pycache__
|
|
rm -rf pyynl/lib/__pycache__
|
|
rm -rf pyynl.egg-info
|
|
rm -rf build
|
|
|
|
install: libynl.a lib/*.h
|
|
@echo -e "\tINSTALL libynl.a"
|
|
@$(INSTALL) -d $(DESTDIR)$(libdir)
|
|
@$(INSTALL) -m 0644 libynl.a $(DESTDIR)$(libdir)/libynl.a
|
|
@echo -e "\tINSTALL libynl headers"
|
|
@$(INSTALL) -d $(DESTDIR)$(includedir)/ynl
|
|
@$(INSTALL) -m 0644 lib/*.h $(DESTDIR)$(includedir)/ynl/
|
|
@echo -e "\tINSTALL pyynl"
|
|
@pip install --prefix=$(DESTDIR)$(prefix) .
|
|
@make -C generated install
|
|
|
|
.PHONY: all clean distclean install $(SUBDIRS)
|