-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
43 lines (32 loc) · 936 Bytes
/
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
PROJECT_ROOT := src/
VERSION = 0.1
.DEFAULT_GOAL := all
# The resulting binaries map to the subproject names
BINARIES = \
uspin
LIBRARIES = \
libuspin \
libuspin/boot \
libuspin/build \
libuspin/config \
libuspin/spec
GO_TESTS = \
$(addsuffix .test,$(LIBRARIES))
include Makefile.gobuild
# We want to add compliance for all built binaries
_CHECK_COMPLIANCE = $(addsuffix .compliant,$(BINARIES)) $(addsuffix .compliant,$(LIBRARIES))
# Build all binaries as static binary
BINS = $(addsuffix .statbin,$(BINARIES))
# Ensure our own code is compliant..
compliant: $(_CHECK_COMPLIANCE)
install: $(BINS)
test -d $(DESTDIR)/usr/bin || install -D -d -m 00755 $(DESTDIR)/usr/bin; \
install -m 00755 builds/* $(DESTDIR)/usr/bin/.
ensure_modules:
@ ( \
git submodule init; \
git submodule update; \
);
release:
git archive --format=tar.gz --verbose -o USpin-$(VERSION).tar.gz HEAD --prefix=USpin-$(VERSION)/
all: $(BINS)