File: libaidl-common.mk

package info (click to toggle)
android-platform-system-tools-aidl 1:8.1.0+r23-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 900 kB
  • sloc: cpp: 11,257; java: 824; yacc: 284; lex: 106; python: 97; xml: 19; sh: 18; makefile: 17
file content (31 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
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
NAME = libaidl-common
SOURCES = aidl.cpp \
          aidl_language.cpp \
          ast_cpp.cpp \
          ast_java.cpp \
          code_writer.cpp \
          generate_cpp.cpp \
          generate_java.cpp \
          generate_java_binder.cpp \
          import_resolver.cpp \
          line_reader.cpp \
          io_delegate.cpp \
          options.cpp \
          type_cpp.cpp \
          type_java.cpp \
          type_namespace.cpp
SOURCES += $(OUT_DIR)/aidl_language_l.cpp $(OUT_DIR)/aidl_language_y.cpp
LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
           -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
           -L/usr/lib/$(DEB_HOST_MULTIARCH)/android -lbase

build: $(SOURCES)
	$(CXX) $^ -o $(OUT_DIR)/$(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
	ln -s $(NAME).so.0 $(OUT_DIR)/$(NAME).so

$(OUT_DIR)/aidl_language_l.cpp: aidl_language_l.ll $(OUT_DIR)/aidl_language_y.cpp
	flex -o $@ $<

$(OUT_DIR)/aidl_language_y.cpp: aidl_language_y.yy
	mkdir --parents $(OUT_DIR)
	bison --defines=$(OUT_DIR)/aidl_language_y.h -o $@ $^