-
Notifications
You must be signed in to change notification settings - Fork 234
/
Makefile.package
executable file
·82 lines (56 loc) · 2.5 KB
/
Makefile.package
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
# Makefile for building and collecting native libraries in Win/Mac/Linux (32/64bit).
include Makefile.common
RESOURCE_DIR=src/main/resources
NATIVE_DIR=$(RESOURCE_DIR)/native
RSYNC=rsync -av -e ssh --exclude=".hg"
WORK:=work/hg/snappy-java
WIN64_SERVER=localhost
MAC_SERVER=172.16.133.41
MAC_TIGER_SERVER=172.16.133.171
AMD_SERVER=hx02
BUILD_CMD_PREFIX = hg pull -u && make clean-native && make
BUILD_CMD = $(BUILD_CMD_PREFIX) native
TEST_CMD = hg pull -u && mvn test
all: compile test
.PHONY: compile test native clean
DLL_DIR=src/main/resources/org/xerial/snappy/native
DLL_WIN=$(DLL_DIR)/Windows/x86/snappyjava.dll
DLL_WIN64=$(DLL_DIR)/Windows/amd64/snappyjava.dll
DLL_MAC=$(DLL_DIR)/Mac/x86_64/libsnappyjava.dylib
DLL_TIGER_MAC=$(DLL_DIR)/Mac/i386/libsnappyjava.dylib
DLL_LINUX=$(DLL_DIR)/Linux/i386/libsnappyjava.so
DLL_AMD64=$(DLL_DIR)/Linux/amd64/libsnappyjava.so
version_file:=src/main/java/org/xerial/snappy/VERSION
$(DLL_WIN): $(version_file)
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD_PREFIX) win32"
mkdir -p $(dir $(DLL_WIN))
$(RSYNC) $(WIN_SERVER):./$(WORK)/$(DLL_WIN) $(DLL_WIN)
$(DLL_WIN64): $(version_file)
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
mkdir -p $(dir $(DLL_WIN64))
$(RSYNC) $(WIN64_SERVER):./$(WORK)/$(DLL_WIN64) $(DLL_WIN64)
$(DLL_MAC): $(version_file)
ssh $(MAC_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
mkdir -p $(dir $(DLL_MAC))
$(RSYNC) $(MAC_SERVER):./$(WORK)/$(DLL_MAC) $(DLL_MAC)
$(DLL_TIGER_MAC): $(version_file)
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
mkdir -p $(dir $(DLL_TIGER_MAC))
$(RSYNC) $(MAC_TIGER_SERVER):./$(WORK)/$(DLL_TIGER_MAC) $(DLL_TIGER_MAC)
$(DLL_LINUX):$(version_file)
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD_PREFIX) linux32"
mkdir -p $(dir $(DLL_LINUX))
$(RSYNC) $(AMD_SERVER):./$(WORK)/$(DLL_LINUX) $(DLL_LINUX)
$(DLL_AMD64):$(version_file)
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
mkdir -p $(dir $(DLL_AMD64))
$(RSYNC) $(AMD_SERVER):./$(WORK)/$(DLL_AMD64) $(DLL_AMD64)
native: $(DLL_WIN) $(DLL_WIN64) $(DLL_LINUX) $(DLL_AMD64) $(DLL_MAC) $(DLL_TIGER_MAC)
compile: native
test:
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
ssh $(MAC_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
release:
mvn deploy -DperformRelease=true