blob: eb366c28748d5eab33df2a655667ccbbf26516a2 [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
Dan Albertb02e90f2015-08-07 17:24:49 -070024LOCAL_CPPFLAGS := $(edify_cflags) -g -O0
Doug Zongker37bee622009-06-08 17:35:39 -070025LOCAL_MODULE := edify
26LOCAL_YACCFLAGS := -v
Dan Albertb02e90f2015-08-07 17:24:49 -070027LOCAL_CPPFLAGS += -Wno-unused-parameter
Tao Bao80e46e02015-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
Dan Albertb02e90f2015-08-07 17:24:49 -070039LOCAL_CPPFLAGS := $(edify_cflags)
40LOCAL_CPPFLAGS += -Wno-unused-parameter
Doug Zongker9931f7f2009-06-10 14:11:53 -070041LOCAL_MODULE := libedify
Tao Bao80e46e02015-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)