The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # Copyright 2007 The Android Open Source Project |
| 2 | # |
| 3 | |
| 4 | LOCAL_PATH := $(call my-dir) |
| 5 | |
| 6 | amend_src_files := \ |
| 7 | amend.c \ |
| 8 | lexer.l \ |
| 9 | parser_y.y \ |
| 10 | ast.c \ |
| 11 | symtab.c \ |
| 12 | commands.c \ |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 13 | execute.c |
| 14 | |
| 15 | amend_test_files := \ |
| 16 | test_symtab.c \ |
Doug Zongker | f28c916 | 2009-06-02 15:30:11 -0700 | [diff] [blame] | 17 | test_commands.c |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 18 | |
| 19 | # "-x c" forces the lex/yacc files to be compiled as c; |
| 20 | # the build system otherwise forces them to be c++. |
| 21 | amend_cflags := -Wall -x c |
| 22 | |
| 23 | # |
| 24 | # Build the host-side command line tool |
| 25 | # |
| 26 | include $(CLEAR_VARS) |
| 27 | |
| 28 | LOCAL_SRC_FILES := \ |
| 29 | $(amend_src_files) \ |
| 30 | $(amend_test_files) \ |
| 31 | register.c \ |
| 32 | main.c |
| 33 | |
| 34 | LOCAL_CFLAGS := $(amend_cflags) -g -O0 |
| 35 | LOCAL_MODULE := amend |
| 36 | LOCAL_YACCFLAGS := -v |
| 37 | |
| 38 | include $(BUILD_HOST_EXECUTABLE) |
| 39 | |
| 40 | # |
| 41 | # Build the device-side library |
| 42 | # |
| 43 | include $(CLEAR_VARS) |
| 44 | |
| 45 | LOCAL_SRC_FILES := $(amend_src_files) |
| 46 | LOCAL_SRC_FILES += $(amend_test_files) |
| 47 | |
| 48 | LOCAL_CFLAGS := $(amend_cflags) |
| 49 | LOCAL_MODULE := libamend |
| 50 | |
| 51 | include $(BUILD_STATIC_LIBRARY) |