Mercurial > mxe-octave
annotate src/protobuf.mk @ 2988:aca8511e7751
qt.mk: link to correct files in bin directory
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 16 May 2013 13:32:57 -0400 |
parents | 47558e958113 |
children | 100e618349f7 |
rev | line source |
---|---|
2746
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
1 # This file is part of MXE. |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
2 # See index.html for further information. |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
3 |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
4 PKG := protobuf |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
5 $(PKG)_IGNORE := |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
6 $(PKG)_CHECKSUM := df5867e37a4b51fb69f53a8baf5b994938691d6d |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
9 $(PKG)_URL := http://protobuf.googlecode.com/files/$($(PKG)_FILE) |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
10 $(PKG)_DEPS := gcc zlib |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
11 |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
12 define $(PKG)_UPDATE |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
13 $(WGET) -q -O- 'http://code.google.com/p/protobuf/downloads/list?sort=-uploaded' | \ |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
14 $(SED) -n 's,.*protobuf-\([0-9][^<]*\)\.tar.*,\1,p' | \ |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
15 head -1 |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
16 endef |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
17 |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
18 define $(PKG)_BUILD |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
19 # First step: Build for host system in order to create "protoc" binary. |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
20 cd '$(1)' && ./configure \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2752
diff
changeset
|
21 $(ENABLE_SHARED_OR_STATIC) |
2746
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
22 $(MAKE) -C '$(1)' -j '$(JOBS)' |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
23 cp '$(1)/src/protoc' '$(1)/src/protoc_host' |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
24 $(MAKE) -C '$(1)' -j 1 distclean |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
25 # Second step: Build for target system. |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
26 cd '$(1)' && ./configure \ |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
27 --host='$(TARGET)' \ |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
28 --prefix='$(PREFIX)/$(TARGET)' \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2752
diff
changeset
|
29 $(ENABLE_SHARED_OR_STATIC) \ |
2746
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
30 --with-zlib \ |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
31 --with-protoc=src/protoc_host |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
32 $(MAKE) -C '$(1)' -j '$(JOBS)' |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
33 $(MAKE) -C '$(1)' -j 1 install |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
34 |
2752
30b0ab7e6406
package protobuf: fixed bulding of test program
Mark Brand <mabrand@mabrand.nl>
parents:
2746
diff
changeset
|
35 '$(TARGET)-g++' \ |
2746
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
36 -W -Wall -Werror -ansi -pedantic \ |
2752
30b0ab7e6406
package protobuf: fixed bulding of test program
Mark Brand <mabrand@mabrand.nl>
parents:
2746
diff
changeset
|
37 '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-protobuf.exe' \ |
2746
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
38 `'$(TARGET)-pkg-config' protobuf --cflags --libs` |
a69eb5b6d9a5
Add package protobuf (google protocol buffers).
lotodore <pokerth@lotharmay.de>
parents:
diff
changeset
|
39 endef |