blob: c366450455efd6fbeadd200bc9caf0eb2c5a620c [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
Tao Bao7101b2e2015-06-03 10:49:29 -070028LOCAL_CLANG := true
Doug Zongker37bee622009-06-08 17:35:39 -070029
30include $(BUILD_HOST_EXECUTABLE)
31
Doug Zongker9931f7f2009-06-10 14:11:53 -070032#
33# Build the device-side library
34#
35include $(CLEAR_VARS)
Doug Zongker37bee622009-06-08 17:35:39 -070036
Doug Zongker9931f7f2009-06-10 14:11:53 -070037LOCAL_SRC_FILES := $(edify_src_files)
Doug Zongker37bee622009-06-08 17:35:39 -070038
Doug Zongker9931f7f2009-06-10 14:11:53 -070039LOCAL_CFLAGS := $(edify_cflags)
Doug Zongker0d32f252014-02-13 15:07:56 -080040LOCAL_CFLAGS += -Wno-unused-parameter
Doug Zongker9931f7f2009-06-10 14:11:53 -070041LOCAL_MODULE := libedify
Tao Bao7101b2e2015-06-03 10:49:29 -070042LOCAL_CLANG := true
Doug Zongker37bee622009-06-08 17:35:39 -070043
Doug Zongker9931f7f2009-06-10 14:11:53 -070044include $(BUILD_STATIC_LIBRARY)