mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-18 19:41:09 +00:00
Makefile: Add dist target.
This commit is contained in:
1 parent
1319f2ba5a
commit
baa02de05f
1 file changed
+15
-4
@@ -24,15 +24,21 @@
|
|||||||
#
|
#
|
||||||
.PHONY: all test clean
|
.PHONY: all test clean
|
||||||
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
#VERSION = $(shell git tag -l | tail -1)
|
||||||
AR = $(CROSS_COMPILE)ar
|
VERSION ?= 1.0.0
|
||||||
STRIP = $(CROSS_COMPILE)strip
|
NAME = libuev
|
||||||
|
PKG = $(NAME)-$(VERSION)
|
||||||
|
ARCHIVE = $(PKG).tar.xz
|
||||||
|
|
||||||
|
CC = $(CROSS)gcc
|
||||||
|
AR = $(CROSS)ar
|
||||||
|
STRIP = $(CROSS)strip
|
||||||
CFLAGS += -fPIC -Os
|
CFLAGS += -fPIC -Os
|
||||||
CPPFLAGS += -W -Wall -Iinclude
|
CPPFLAGS += -W -Wall -Iinclude
|
||||||
ARFLAGS = crus
|
ARFLAGS = crus
|
||||||
JUNK = *~ *.bak *.map .*.d DEADJOE *.gdb *.elf core core.*
|
JUNK = *~ *.bak *.map .*.d DEADJOE *.gdb *.elf core core.*
|
||||||
|
|
||||||
LIBNAME = libuev
|
LIBNAME = $(NAME)
|
||||||
prefix ?= /usr/local
|
prefix ?= /usr/local
|
||||||
libdir ?= $(prefix)/lib
|
libdir ?= $(prefix)/lib
|
||||||
datadir ?= $(prefix)/share/doc/$(LIBNAME)
|
datadir ?= $(prefix)/share/doc/$(LIBNAME)
|
||||||
@@ -103,6 +109,11 @@ clean:
|
|||||||
distclean: clean
|
distclean: clean
|
||||||
-@$(RM) $(DEPS) $(JUNK)
|
-@$(RM) $(DEPS) $(JUNK)
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@echo "Building .xz tarball of $(PKG) in parent dir..."
|
||||||
|
git archive --format=tar --prefix=$(PKG)/ $(VERSION) | xz >../$(ARCHIVE)
|
||||||
|
@(cd ..; md5sum $(ARCHIVE) | tee $(ARCHIVE).md5)
|
||||||
|
|
||||||
# Include automatically generated rules
|
# Include automatically generated rules
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifneq ($(MAKECMDGOALS),distclean)
|
ifneq ($(MAKECMDGOALS),distclean)
|
||||||
|
|||||||
Reference in new issue
Block a user