Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 1 | # Copyright 2009 The Android Open Source Project |
| 2 | |
| 3 | LOCAL_PATH := $(call my-dir) |
| 4 | |
| 5 | edify_src_files := \ |
| 6 | lexer.l \ |
| 7 | parser.y \ |
| 8 | expr.c |
| 9 | |
Dan Albert | 32f9fe7 | 2014-11-20 09:00:46 -0800 | [diff] [blame] | 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. |
| 13 | edify_cflags := -x c -std=gnu89 |
Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 14 | |
| 15 | # |
| 16 | # Build the host-side command line tool |
| 17 | # |
| 18 | include $(CLEAR_VARS) |
| 19 | |
| 20 | LOCAL_SRC_FILES := \ |
| 21 | $(edify_src_files) \ |
| 22 | main.c |
| 23 | |
| 24 | LOCAL_CFLAGS := $(edify_cflags) -g -O0 |
| 25 | LOCAL_MODULE := edify |
| 26 | LOCAL_YACCFLAGS := -v |
Doug Zongker | 0d32f25 | 2014-02-13 15:07:56 -0800 | [diff] [blame] | 27 | LOCAL_CFLAGS += -Wno-unused-parameter |
Tao Bao | 7101b2e | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 28 | LOCAL_CLANG := true |
Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 29 | |
| 30 | include $(BUILD_HOST_EXECUTABLE) |
| 31 | |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 32 | # |
| 33 | # Build the device-side library |
| 34 | # |
| 35 | include $(CLEAR_VARS) |
Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 36 | |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 37 | LOCAL_SRC_FILES := $(edify_src_files) |
Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 38 | |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 39 | LOCAL_CFLAGS := $(edify_cflags) |
Doug Zongker | 0d32f25 | 2014-02-13 15:07:56 -0800 | [diff] [blame] | 40 | LOCAL_CFLAGS += -Wno-unused-parameter |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 41 | LOCAL_MODULE := libedify |
Tao Bao | 7101b2e | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 42 | LOCAL_CLANG := true |
Doug Zongker | 37bee62 | 2009-06-08 17:35:39 -0700 | [diff] [blame] | 43 | |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 44 | include $(BUILD_STATIC_LIBRARY) |