Makefile: install package config .pc file.
This commit is contained in:
parent
3190dae731
commit
c5aad3535a
8
ipc.pc
Normal file
8
ipc.pc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
includedir=/usr/local/include
|
||||||
|
libdir=/usr/local/lib
|
||||||
|
|
||||||
|
Name: LibIPC
|
||||||
|
Description: The simplest Inter Process Communication library
|
||||||
|
Version: 0.1.0
|
||||||
|
Libs: -L${libdir} -lipc
|
||||||
|
Cflags: -I${includedir}
|
16
makefile
16
makefile
@ -11,16 +11,20 @@ ZIGOPTIM ?= ReleaseSafe
|
|||||||
build:
|
build:
|
||||||
zig build -Doptimize=$(ZIGOPTIM) $(ZIGOPTS) $(TARGET_OPTION)
|
zig build -Doptimize=$(ZIGOPTIM) $(ZIGOPTS) $(TARGET_OPTION)
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
LIBDIR ?= $(PREFIX)/lib
|
LIBDIR ?= $(PREFIX)/lib
|
||||||
INCLUDEDIR ?= $(PREFIX)/include
|
INCLUDEDIR ?= $(PREFIX)/include
|
||||||
|
PKGCONFIGDIR ?= /usr/share/pkgconfig
|
||||||
|
install-pkgconfig:
|
||||||
|
[ -d $(PKGCONFIGDIR) ] || install -m 0755 -d $(PKGCONFIGDIR)
|
||||||
|
install -m 0644 ipc.pc $(PKGCONFIGDIR)
|
||||||
install-library:
|
install-library:
|
||||||
[ -d $(LIBDIR) ] || install -m 0755 -d $(LIBDIR)
|
[ -d $(LIBDIR) ] || install -m 0755 -d $(LIBDIR)
|
||||||
install zig-out/lib/libipc* $(LIBDIR)
|
install -m 0644 zig-out/lib/libipc.so $(LIBDIR)
|
||||||
install-header:
|
install-header:
|
||||||
[ -d $(INCLUDEDIR) ] || install -m 0755 -d $(INCLUDEDIR)
|
[ -d $(INCLUDEDIR) ] || install -m 0755 -d $(INCLUDEDIR)
|
||||||
install libipc.h $(INCLUDEDIR)
|
install -m 0644 libipc.h $(INCLUDEDIR)
|
||||||
install: install-library install-header
|
install: install-pkgconfig install-library install-header
|
||||||
|
|
||||||
uninstall-library:
|
uninstall-library:
|
||||||
rm $(LIBDIR)/libipc.a \
|
rm $(LIBDIR)/libipc.a \
|
||||||
|
Loading…
Reference in New Issue
Block a user