File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: GPL-2.0
2
2
3
+ include ../../scripts/Makefile.arch
4
+
5
+ INSTALL ?= install
6
+ prefix ?= /usr
7
+ ifeq ($(LP64 ) , 1)
8
+ libdir_relative = lib64
9
+ else
10
+ libdir_relative = lib
11
+ endif
12
+ libdir ?= $(prefix ) /$(libdir_relative )
13
+ includedir ?= $(prefix ) /include
14
+
3
15
SUBDIRS = lib generated samples
4
16
5
17
all : $(SUBDIRS ) libynl.a
@@ -23,5 +35,18 @@ clean distclean:
23
35
rm -f libynl.a
24
36
rm -rf pyynl/__pycache__
25
37
rm -rf pyynl/lib/__pycache__
38
+ rm -rf pyynl.egg-info
39
+ rm -rf build
40
+
41
+ install : libynl.a lib/* .h
42
+ @echo -e " \tINSTALL libynl.a"
43
+ @$(INSTALL ) -d $(DESTDIR )$(libdir )
44
+ @$(INSTALL ) -m 0644 libynl.a $(DESTDIR )$(libdir ) /libynl.a
45
+ @echo -e " \tINSTALL libynl headers"
46
+ @$(INSTALL ) -d $(DESTDIR )$(includedir ) /ynl
47
+ @$(INSTALL ) -m 0644 lib/* .h $(DESTDIR )$(includedir ) /ynl/
48
+ @echo -e " \tINSTALL pyynl"
49
+ @pip install --prefix=$(DESTDIR )$(prefix ) .
50
+ @make -C generated install
26
51
27
- .PHONY : all clean distclean $(SUBDIRS )
52
+ .PHONY : all clean distclean install $(SUBDIRS )
You can’t perform that action at this time.
0 commit comments