blob: 4ade77c17dae6866378e8c07f4d2fc121f06d1d5 [file] [log] [blame]
Wink Savilleede38fe2010-05-28 11:49:52 -07001# Copyright (C) 2009 The Android Open Source Project
Wink Saville79a4a602010-05-27 15:44:42 -07002#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Wink Savilleede38fe2010-05-28 11:49:52 -070014#
15#
Wink Saville79a4a602010-05-27 15:44:42 -070016
17LOCAL_PATH := $(call my-dir)
Wink Saville79a4a602010-05-27 15:44:42 -070018
Wink Saville732aaf02010-06-28 15:05:24 -070019CC_LITE_SRC_FILES := \
Omari Stephens373caa02010-09-30 15:59:59 -070020 src/google/protobuf/stubs/common.cc \
21 src/google/protobuf/stubs/once.cc \
22 src/google/protobuf/stubs/hash.cc \
23 src/google/protobuf/stubs/hash.h \
24 src/google/protobuf/stubs/map-util.h \
25 src/google/protobuf/stubs/stl_util-inl.h \
26 src/google/protobuf/extension_set.cc \
27 src/google/protobuf/generated_message_util.cc \
28 src/google/protobuf/message_lite.cc \
29 src/google/protobuf/repeated_field.cc \
30 src/google/protobuf/wire_format_lite.cc \
31 src/google/protobuf/io/coded_stream.cc \
32 src/google/protobuf/io/coded_stream_inl.h \
33 src/google/protobuf/io/zero_copy_stream.cc \
34 src/google/protobuf/io/zero_copy_stream_impl_lite.cc
Wink Saville732aaf02010-06-28 15:05:24 -070035
Omari Stephens373caa02010-09-30 15:59:59 -070036JAVA_LITE_SRC_FILES := \
Wink Savillea3d30792010-06-04 17:44:37 -070037 java/src/main/java/com/google/protobuf/UninitializedMessageException.java \
38 java/src/main/java/com/google/protobuf/MessageLite.java \
39 java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \
40 java/src/main/java/com/google/protobuf/CodedOutputStream.java \
41 java/src/main/java/com/google/protobuf/ByteString.java \
42 java/src/main/java/com/google/protobuf/CodedInputStream.java \
43 java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \
44 java/src/main/java/com/google/protobuf/AbstractMessageLite.java \
45 java/src/main/java/com/google/protobuf/FieldSet.java \
46 java/src/main/java/com/google/protobuf/Internal.java \
47 java/src/main/java/com/google/protobuf/WireFormat.java \
48 java/src/main/java/com/google/protobuf/GeneratedMessageLite.java
49
Omari Stephens373caa02010-09-30 15:59:59 -070050
51# Java micro library (for device-side users)
52# =======================================================
53include $(CLEAR_VARS)
54
55LOCAL_MODULE := libprotobuf-java-2.3.0-micro
56
57LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro)
58
Wink Savillea3d30792010-06-04 17:44:37 -070059include $(BUILD_STATIC_JAVA_LIBRARY)
60
Omari Stephens373caa02010-09-30 15:59:59 -070061# Java micro library (for host-side users)
62# =======================================================
63include $(CLEAR_VARS)
64
65LOCAL_MODULE := host-libprotobuf-java-2.3.0-micro
66LOCAL_MODULE_TAGS := optional
67
68LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro)
69
70include $(BUILD_HOST_JAVA_LIBRARY)
71
72# Java lite library (for device-side users)
73# =======================================================
74include $(CLEAR_VARS)
75
76LOCAL_MODULE := libprotobuf-java-2.3.0-lite
77
78LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES)
79
80include $(BUILD_STATIC_JAVA_LIBRARY)
81
82# Java lite library (for host-side users)
83# =======================================================
84include $(CLEAR_VARS)
85
86LOCAL_MODULE := host-libprotobuf-java-2.3.0-lite
87LOCAL_MODULE_TAGS := optional
88
89LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES)
90
91include $(BUILD_HOST_JAVA_LIBRARY)
92
Wink Savilleb3fe74b2010-06-03 15:33:07 -070093# C++ lite library
94# =======================================================
95include $(CLEAR_VARS)
96
97LOCAL_MODULE := libprotobuf-cpp-2.3.0-lite
98
99LOCAL_CPP_EXTENSION := .cc
100
Wink Saville732aaf02010-06-28 15:05:24 -0700101LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES)
Wink Savilleb3fe74b2010-06-03 15:33:07 -0700102
103LOCAL_C_INCLUDES := \
104 $(LOCAL_PATH)/android \
105 bionic \
Wink Savilleb3fe74b2010-06-03 15:33:07 -0700106 $(LOCAL_PATH)/src
107
108LOCAL_SHARED_LIBRARIES := \
Kenny Root5ea4d582010-06-04 09:37:31 -0700109 libcutils libutils
110
111# stlport conflicts with the host stl library
112ifneq ($(TARGET_SIMULATOR),true)
113LOCAL_C_INCLUDES += external/stlport/stlport
114LOCAL_SHARED_LIBRARIES += libstlport
115endif
Wink Savilleb3fe74b2010-06-03 15:33:07 -0700116
117# Define the header files to be copied
118#LOCAL_COPY_HEADERS := \
119# src/google/protobuf/stubs/once.h \
120# src/google/protobuf/stubs/common.h \
121# src/google/protobuf/io/coded_stream.h \
122# src/google/protobuf/generated_message_util.h \
123# src/google/protobuf/repeated_field.h \
124# src/google/protobuf/extension_set.h \
125# src/google/protobuf/wire_format_lite_inl.h
126#
127#LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE)
128
129LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
130
131include $(BUILD_STATIC_LIBRARY)
Wink Saville732aaf02010-06-28 15:05:24 -0700132
133# C++ full library
134# =======================================================
135include $(CLEAR_VARS)
136
137LOCAL_MODULE := libprotobuf-cpp-2.3.0-full
138
139LOCAL_CPP_EXTENSION := .cc
140
141LOCAL_SRC_FILES := \
Omari Stephens373caa02010-09-30 15:59:59 -0700142 $(CC_LITE_SRC_FILES) \
143 src/google/protobuf/stubs/strutil.cc \
144 src/google/protobuf/stubs/strutil.h \
145 src/google/protobuf/stubs/substitute.cc \
146 src/google/protobuf/stubs/substitute.h \
147 src/google/protobuf/stubs/structurally_valid.cc \
148 src/google/protobuf/descriptor.cc \
149 src/google/protobuf/descriptor.pb.cc \
150 src/google/protobuf/descriptor_database.cc \
151 src/google/protobuf/dynamic_message.cc \
152 src/google/protobuf/extension_set_heavy.cc \
153 src/google/protobuf/generated_message_reflection.cc \
154 src/google/protobuf/message.cc \
155 src/google/protobuf/reflection_ops.cc \
156 src/google/protobuf/service.cc \
157 src/google/protobuf/text_format.cc \
158 src/google/protobuf/unknown_field_set.cc \
159 src/google/protobuf/wire_format.cc \
160 src/google/protobuf/io/gzip_stream.cc \
161 src/google/protobuf/io/printer.cc \
162 src/google/protobuf/io/tokenizer.cc \
163 src/google/protobuf/io/zero_copy_stream_impl.cc \
164 src/google/protobuf/compiler/importer.cc \
165 src/google/protobuf/compiler/parser.cc
Wink Saville732aaf02010-06-28 15:05:24 -0700166
167LOCAL_C_INCLUDES := \
168 $(LOCAL_PATH)/android \
169 bionic \
170 external/zlib \
171 $(LOCAL_PATH)/src
172
173LOCAL_SHARED_LIBRARIES := \
174 libz libcutils libutils
175
176# stlport conflicts with the host stl library
177ifneq ($(TARGET_SIMULATOR),true)
178LOCAL_C_INCLUDES += external/stlport/stlport
179LOCAL_SHARED_LIBRARIES += libstlport
180endif
181
182# Define the header files to be copied
183#LOCAL_COPY_HEADERS := \
184# src/google/protobuf/stubs/once.h \
185# src/google/protobuf/stubs/common.h \
186# src/google/protobuf/io/coded_stream.h \
187# src/google/protobuf/generated_message_util.h \
188# src/google/protobuf/repeated_field.h \
189# src/google/protobuf/extension_set.h \
190# src/google/protobuf/wire_format_lite_inl.h
191#
192#LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE)
193
194LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
195
196include $(BUILD_STATIC_LIBRARY)