blob: 03c04e432d34a118f822d300361cdf3cb45c304c [file] [log] [blame]
Doug Zongker37bee622009-06-08 17:35:39 -07001# 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
Dan Albert32f9fe72014-11-20 09:00:46 -080010# "-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
Doug Zongker37bee622009-06-08 17:35:39 -070014
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
Doug Zongker0d32f252014-02-13 15:07:56 -080027LOCAL_CFLAGS += -Wno-unused-parameter
Doug Zongker37bee622009-06-08 17:35:39 -070028
29include $(BUILD_HOST_EXECUTABLE)
30
Doug Zongker9931f7f2009-06-10 14:11:53 -070031#
32# Build the device-side library
33#
34include $(CLEAR_VARS)
Doug Zongker37bee622009-06-08 17:35:39 -070035
Doug Zongker9931f7f2009-06-10 14:11:53 -070036LOCAL_SRC_FILES := $(edify_src_files)
Doug Zongker37bee622009-06-08 17:35:39 -070037
Doug Zongker9931f7f2009-06-10 14:11:53 -070038LOCAL_CFLAGS := $(edify_cflags)
Doug Zongker0d32f252014-02-13 15:07:56 -080039LOCAL_CFLAGS += -Wno-unused-parameter
Doug Zongker9931f7f2009-06-10 14:11:53 -070040LOCAL_MODULE := libedify
Doug Zongker37bee622009-06-08 17:35:39 -070041
Doug Zongker9931f7f2009-06-10 14:11:53 -070042include $(BUILD_STATIC_LIBRARY)