-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathMakefile
66 lines (46 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
##
# Building apk-tools
-include config.mk
PACKAGE := apk-tools
VERSION := $(shell ./get-version.sh "$(FULL_VERSION)" "$(VERSION)")
SO_VERSION := $(shell cat VERSION | cut -d' ' -f1)
export PACKAGE VERSION SO_VERSION
##
# Default directories
DESTDIR :=
SBINDIR := /sbin
LIBDIR := /lib
CONFDIR := /etc/apk
MANDIR := /usr/share/man
DOCDIR := /usr/share/doc/apk
INCLUDEDIR := /usr/include
PKGCONFIGDIR := /usr/lib/pkgconfig
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR INCLUDEDIR PKGCONFIGDIR
##
# Top-level subdirs
subdirs := libfetch/ src/ doc/ lua/
##
# Include all rules and stuff
include Make.rules
##
# Globals
URL_BACKEND ?= libfetch
CRYPTO ?= openssl
export URL_BACKEND CRYPTO
CFLAGS_ALL += -DCRYPTO_USE_$(shell echo $(CRYPTO) | tr '[:lower:]' '[:upper:]')
##
# Top-level targets
install:
$(INSTALLDIR) $(DESTDIR)$(DOCDIR)
$(INSTALL) README.md $(DESTDIR)$(DOCDIR)
check test: FORCE
$(Q)$(MAKE) compile
$(Q)$(MAKE) -C test
static:
$(Q)$(MAKE) STATIC=y
tag: check
TAG_VERSION=$$(cat VERSION); \
git commit . -m "apk-tools-$${TAG_VERSION}"; \
git tag -s v$${TAG_VERSION} -m "apk-tools-$${TAG_VERSION}"
src/: libfetch/
lua/: src/