make dist
parent
f59eb58e0b
commit
ad5fb32cfb
37
makefile
37
makefile
|
@ -15,17 +15,22 @@ PREFIX ?= /usr/local
|
|||
LIBDIR ?= $(PREFIX)/lib
|
||||
INCLUDEDIR ?= $(PREFIX)/include
|
||||
PKGCONFIGDIR ?= /usr/share/pkgconfig
|
||||
install-pkgconfig:
|
||||
[ -d $(PKGCONFIGDIR) ] || install -m 0755 -d $(PKGCONFIGDIR)
|
||||
install -m 0644 ipc.pc $(PKGCONFIGDIR)
|
||||
install-library:
|
||||
[ -d $(LIBDIR) ] || install -m 0755 -d $(LIBDIR)
|
||||
install -m 0644 zig-out/lib/libipc.a $(LIBDIR)
|
||||
install -m 0644 zig-out/lib/libipc.so $(LIBDIR)
|
||||
install-header:
|
||||
[ -d $(INCLUDEDIR) ] || install -m 0755 -d $(INCLUDEDIR)
|
||||
install -m 0644 libipc.h $(INCLUDEDIR)
|
||||
|
||||
$(PKGCONFIGDIR):; install -m 0755 -d $(PKGCONFIGDIR)
|
||||
$(PKGCONFIGDIR)/ipc.pc: ipc.pc; install -m 0644 ipc.pc $(PKGCONFIGDIR)
|
||||
install-pkgconfig: $(PKGCONFIGDIR) $(PKGCONFIGDIR)/hexa.pc
|
||||
|
||||
$(LIBDIR):; install -m 0755 -d $(LIBDIR)
|
||||
$(LIBDIR)/libipc.a: zig-out/lib/libipc.a; install -m 0644 zig-out/lib/libipc.a $(LIBDIR)
|
||||
$(LIBDIR)/libipc.so: zig-out/lib/libipc.so; install -m 0644 zig-out/lib/libipc.so $(LIBDIR)
|
||||
install-library: $(LIBDIR) $(LIBDIR)/libipc.a $(LIBDIR)/libipc.so
|
||||
|
||||
$(INCLUDEDIR):; install -m 0755 -d $(INCLUDEDIR)
|
||||
$(INCLUDEDIR)/libipc.h: libipc.h; install -m 0644 libipc.h $(INCLUDEDIR)
|
||||
install-header: $(INCLUDEDIR) $(INCLUDEDIR)/libipc.h
|
||||
|
||||
install: install-pkgconfig install-library install-header
|
||||
@echo "Now that you have installed the library, you should (probably) run ldconfig."
|
||||
|
||||
uninstall-library:
|
||||
rm $(LIBDIR)/libipc.a \
|
||||
|
@ -50,19 +55,19 @@ serve-doc:
|
|||
PACKAGE ?= libipc
|
||||
VERSION ?= 0.2.0
|
||||
PKG = $(PACKAGE)-$(VERSION)
|
||||
dist-dir:
|
||||
[ -d $(PKG) ] || ln -s . $(PKG)
|
||||
$(PKG).tar.gz: dist-dir
|
||||
tar zcf $@ \
|
||||
$(PKG)/src \
|
||||
$(PKG)/build.zig \
|
||||
$(PKG)/build.zig* \
|
||||
$(PKG)/libipc.h \
|
||||
$(PKG)/ipc.pc \
|
||||
$(PKG)/makefile* \
|
||||
$(PKG)/README* \
|
||||
$(PKG)/TODO*
|
||||
dist-rm-dir:
|
||||
rm $(PKG)
|
||||
dist-gz: $(PACKAGE)-$(VERSION).tar.gz
|
||||
$(PKG):; ln -s . $(PKG)
|
||||
dist-dir: $(PKG)
|
||||
dist-rm-dir:; rm $(PKG)
|
||||
dist-gz: $(PKG).tar.gz
|
||||
dist: dist-gz dist-rm-dir
|
||||
|
||||
# You can add your specific instructions there.
|
||||
|
|
Loading…
Reference in New Issue