-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.TRAVIS
58 lines (44 loc) · 1.46 KB
/
Makefile.TRAVIS
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
# -*- mode: makefile; -*-
export AG_INSTALL ?= sudo apt-get install --yes
export SANDBOX ?= $(PWD)/.sandbox
export ARCHIVES ?= $(SANDBOX)/archives
export BUILD ?= $(SANDBOX)/build
export ROOT ?= $(SANDBOX)/root
export STAMPS ?= $(SANDBOX)/stamps
export PATH := $(ROOT)/bin:$(PATH)
export CPPFLAGS := $(CPPFLAGS) -I$(ROOT)/include
export CFLAGS := $(CFLAGS) -I$(ROOT)/include
export CXXFLAGS := $(CXXFLAGS) -I$(ROOT)/include
export LDFLAGS := $(LDFLAGS) -L$(ROOT)/lib
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ROOT)/lib
all: test
clean:
$(MAKE) -C test clean
test: $(STAMPS)/sawzall
$(MAKE) -C test
$(SANDBOX):
mkdir -vp $(SANDBOX)
mkdir -vp $(ARCHIVES)
mkdir -vp $(BUILD)
mkdir -vp $(ROOT)
mkdir -vp $(STAMPS)
$(STAMPS)/build-tools: $(SANDBOX)
$(AG_INSTALL) build-essential
touch $@
$(STAMPS)/libicu-dev: $(SANDBOX)
$(AG_INSTALL) libicu-dev
touch $@
$(STAMPS)/protocol-buffer-tools: $(SANDBOX) $(STAMPS)/build-tools $(ARCHIVES)/protobuf-2.5.0.tar.bz2
cd $(BUILD) && tar xjvf $(ARCHIVES)/protobuf-2.5.0.tar.bz2
cd $(BUILD)/protobuf-2.5.0 && ./configure --prefix=$(ROOT)
cd $(BUILD)/protobuf-2.5.0 && make
cd $(BUILD)/protobuf-2.5.0 && make install
touch $@
$(STAMPS)/sawzall: $(SANDBOX) $(STAMPS)/protocol-buffer-tools $(STAMPS)/libicu-dev
./configure --prefix=$(ROOT)
make
make install
touch $@
$(ARCHIVES)/protobuf-2.5.0.tar.bz2: $(SANDBOX)
wget --no-use-server-timestamp https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2 -O $@
.PHONY: clean test