-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
89 lines (69 loc) · 1.73 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Main makefile for building distributable packages of native eden
# executable
#
# For Debian-based systems:
#
# $ make deb
#
# For RPM-based systems:
#
# $ make rpm
#
# For a compressed archive:
#
# $ make tar
#
# To Install Locally from the repository:
#
# $ make install
#
# or include a custom PREFIX to install elsewhere:
#
# $ PREFIX=~/.bin make install
#
# Configuration:
#
# Requires: leiningen
#
# Requires: GraalVM with GRAAL_HOME environment variable set to the
# root of the graal folder (might work if you just have the command native-image on the path)
#
# Hardware Requirements: 64-bit Linux-based OS. Tested on Ubuntu 17.10
# and Fedora 28. 8Gb+ of Memory. Latest Builds were made in a Virtual
# Machine with 12Gb of memory.
LEIN_CMD := lein
PREFIX := /usr/bin
EDEN_VERSION := $(shell $(LEIN_CMD) project-version)
EDEN_EXE_NAME := eden-$(EDEN_VERSION)
PROJ_EDEN_EXE := bin/$(EDEN_EXE_NAME)
# default
all: clean build_native
# Generate eden native executable
build_native: $(PROJ_EDEN_EXE)
# Generate deb Package for native executable
# Note: Tested on Ubuntu 17.10
dpkg: $(PROJ_EDEN_EXE)
make -C dist_config/dpkg/
# Generate tar.gz Distribution for native executable
tar: $(PROJ_EDEN_EXE)
make -C dist_config/tar/
# Generate rpm Package for native executable
# Note: Tested on Fedora 28
rpm: $(PROJ_EDEN_EXE)
make -C dist_config/rpmpkg/
# Install Native Executable
# Note: Tested in linux
install: $(PROJ_EDEN_EXE)
cp $(PROJ_EDEN_EXE) $(PREFIX)/$(EDEN_EXE_NAME)
chmod 755 $(PREFIX)/$(EDEN_EXE_NAME)
rm -f $(PREFIX)/eden
ln -s $(PREFIX)/$(EDEN_EXE_NAME) $(PREFIX)/eden
clean:
rm -f $(PROJ_EDEN_EXE)
rm -rf dist
rm -rf bin
distclean:
rm -f $(PREFIX)/$(EDEN_EXE_NAME)
rm -f $(PREFIX)/eden
$(PROJ_EDEN_EXE):
sh ./build-native.sh