1# Copyright 2009 The Android Open Source Project
2
3LOCAL_PATH := $(call my-dir)
4
5edify_src_files := \
6	lexer.l \
7	parser.y \
8	expr.c
9
10# "-x c" forces the lex/yacc files to be compiled as c the build system
11# otherwise forces them to be c++. Need to also add an explicit -std because the
12# build system will soon default C++ to -std=c++11.
13edify_cflags := -x c -std=gnu89
14
15#
16# Build the host-side command line tool
17#
18include $(CLEAR_VARS)
19
20LOCAL_SRC_FILES := \
21		$(edify_src_files) \
22		main.c
23
24LOCAL_CFLAGS := $(edify_cflags) -g -O0
25LOCAL_MODULE := edify
26LOCAL_YACCFLAGS := -v
27LOCAL_CFLAGS += -Wno-unused-parameter
28
29include $(BUILD_HOST_EXECUTABLE)
30
31#
32# Build the device-side library
33#
34include $(CLEAR_VARS)
35
36LOCAL_SRC_FILES := $(edify_src_files)
37
38LOCAL_CFLAGS := $(edify_cflags)
39LOCAL_CFLAGS += -Wno-unused-parameter
40LOCAL_MODULE := libedify
41
42include $(BUILD_STATIC_LIBRARY)
43