~ubuntu-branches/debian/stretch/android-platform-frameworks-base/stretch

« back to all changes in this revision

Viewing changes to debian/patches/tools_aidl_makefile.patch

  • Committer: Package Import Robot
  • Author(s): Hans-Christoph Steiner
  • Date: 2014-09-30 20:55:30 UTC
  • Revision ID: package-import@ubuntu.com-20140930205530-rlfscbdm3mrzcxqw
Tags: 21-1
Initial release (Closes: #763571)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- /dev/null
 
2
+++ b/tools/aidl/Makefile
 
3
@@ -0,0 +1,40 @@
 
4
+#!/usr/bin/make
 
5
+
 
6
+CXX = g++
 
7
+
 
8
+HOST_OS=linux
 
9
+include Android.mk
 
10
+
 
11
+LEX_SOURCES = $(LOCAL_SRC_FILES:.l=.cpp)
 
12
+CXX_SOURCES = $(LEX_SOURCES:.y=.cpp)
 
13
+OBJECTS = $(CXX_SOURCES:.cpp=.o)
 
14
+
 
15
+ALL_CXXFLAGS = -O2 -fPIC $(LOCAL_CFLAGS) \
 
16
+       -include /usr/include/android/arch/linux-x86/AndroidConfig.h
 
17
+ALL_LDFLAGS = -fPIC -Wl,-rpath=/usr/lib/android
 
18
+ALL_LIBS = $(LOCAL_LDLIBS) \
 
19
+
 
20
+CXXFLAGS := $(ALL_CXXFLAGS) $(CXXFLAGS)
 
21
+LDFLAGS := $(ALL_LDFLAGS) $(LDFLAGS)
 
22
+LIBS := $(ALL_LIBS) $(LIBS)
 
23
+
 
24
+# from android-platform-build/core/definitions.mk: transform-l-to-cpp
 
25
+%.cpp: %.l
 
26
+       echo HERE
 
27
+       flex -o$@ $<
 
28
+
 
29
+# from android-platform-build/core/definitions.mk: transform-y-to-cpp
 
30
+%.cpp: %.y
 
31
+       bison -o $@ $<
 
32
+       touch $(@:$1=.hpp)
 
33
+       echo '#ifndef '$(@F:$1=_h) > $(@:$1=.h)
 
34
+       echo '#define '$(@F:$1=_h) >> $(@:$1=.h)
 
35
+       cat $(@:$1=$(YACC_HEADER_SUFFIX)) >> $(@:$1=.h)
 
36
+       echo '#endif' >> $(@:$1=.h)
 
37
+
 
38
+all: $(OBJECTS)
 
39
+       $(CXX) $(LDFLAGS) -o aidl $(OBJECTS) $(LIBS)
 
40
+
 
41
+clean:
 
42
+       rm -f $(OBJECTS)
 
43
+       rm -f aidl