-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
76 lines (58 loc) · 1.39 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
# Main makefile for building distributable packages of native fif
# 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
#
# Configuration:
#
# Requires: leiningen
#
# Requires: GraalVM with GRAAL_HOME environment variable set to the
# root of the graal folder (might work if you just have native-image on the path)
.PHONY: all build-native clean distclean
FIF_VERSION := $(shell lein project-version)
FIF_EXE_NAME := fif-$(FIF_VERSION)
PROJ_FIF_EXE := bin/$(FIF_EXE_NAME)
# default
all: clean build-native
# Generate fif native executable
build-native:
sh ./build-native.sh
# Generate deb Package for native executable
# Note: Tested on Ubuntu 17.10
dpkg: $(PROJ_FIF_EXE)
make -C dist_config/dpkg/
# Generate tar.gz Distribution for native executable
tar: $(PROJ_FIF_EXE)
make -C dist_config/tar/
# Generate rpm Package for native executable
# Note: Tested on Fedora 28
rpm: $(PROJ_FIF_EXE)
make -C dist_config/rpmpkg/
# Install Native Executable
# Note: Tested in linux
install: $(PROJ_FIF_EXE)
cp $(PROJ_FIF_EXE) /usr/bin/$(FIF_EXE_NAME)
chmod 755 /usr/bin/$(FIF_EXE_NAME)
rm -f /usr/bin/fif
ln -s /usr/bin/$(FIF_EXE_NAME) /usr/bin/fif
clean:
rm -f $(PROJ_FIF_EXE)
rm -rf dist
distclean:
rm -f /usr/bin/$(FIF_EXE_NAME)
rm -f /usr/bin/fif