forked from gavalian/hipo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (52 loc) · 2.18 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
#***********************************************************
# MAKEFILE for BUILDING EXAMPLES FOR HIPO4 LIBRARY *
# AUTHOR: GAVALIAN DATE: 10/24/2018 *
#***********************************************************
# ██╗ ██╗██╗██████╗ ██████╗ ██╗ ██╗ ██████╗ *
# ██║ ██║██║██╔══██╗██╔═══██╗ ██║ ██║ ██╔═████╗ *
# ███████║██║██████╔╝██║ ██║ ███████║ ██║██╔██║ *
# ██╔══██║██║██╔═══╝ ██║ ██║ ╚════██║ ████╔╝██║ *
# ██║ ██║██║██║ ╚██████╔╝ ██║██╗╚██████╔╝ *
# ╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝ ╚═╝╚═╝ ╚═════╝ *
# === Jefferson National Lab (2017) *
#***********************************************************
#
### Detect OS
ifeq ($(OS),Windows_NT)
$(info OS detection: Windows)
$(error Windows is not supported for make, try cmake)
endif
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
$(info OS detection: Linux)
SHAREDEXT = so
endif
ifeq ($(UNAME_S),Darwin)
$(info OS detection: Darwin)
SHAREDEXT = dylib
endif
ifeq ($(SHAREDEXT),)
$(warning OS detection failed; assuming Linux)
SHAREDEXT = so
endif
all: lib shlib
lib:
@test -d lib || mkdir -p lib
@cd lz4 ; make lz4
@cp lz4/lib/liblz4.a lib/.
@cd hipo4; make
shlib:
@echo compiling shared library
@test -d slib || mkdir -p slib
@cd lz4 ; make
@test -f lz4/lib/liblz4.$(SHAREDEXT) && cp lz4/lib/liblz4.$(SHAREDEXT) slib/.
# @test -f lz4/lib/liblz4.so && cp lz4/lib/liblz4.so lib/.
@cd hipo4 ; make slibhipo
@test -f slib/liblz4.dylib && mv slib/liblz4.dylib slib/liblz4.so || echo 'all done....'
clean:
@cd lz4; make clean
@cd hipo4; make clean
@cd examples; make clean
@cd examples/root ; make clean
@echo "Cleaning lib directory"
@rm -rf lib/* slib lib