The Android Open Source Project | 23580ca | 2008-10-21 07:00:00 -0700 | [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 \ |
| 13 | permissions.c \ |
| 14 | execute.c |
| 15 | |
| 16 | amend_test_files := \ |
| 17 | test_symtab.c \ |
| 18 | test_commands.c \ |
| 19 | test_permissions.c |
| 20 | |
| 21 | # "-x c" forces the lex/yacc files to be compiled as c; |
| 22 | # the build system otherwise forces them to be c++. |
| 23 | amend_cflags := -Wall -x c |
| 24 | |
| 25 | # |
| 26 | # Build the host-side command line tool |
| 27 | # |
| 28 | include $(CLEAR_VARS) |
| 29 | |
| 30 | LOCAL_SRC_FILES := \ |
| 31 | $(amend_src_files) \ |
| 32 | $(amend_test_files) \ |
| 33 | register.c \ |
| 34 | main.c |
| 35 | |
| 36 | LOCAL_CFLAGS := $(amend_cflags) -g -O0 |
| 37 | LOCAL_MODULE := amend |
| 38 | LOCAL_YACCFLAGS := -v |
| 39 | |
| 40 | include $(BUILD_HOST_EXECUTABLE) |
| 41 | |
| 42 | # |
| 43 | # Build the device-side library |
| 44 | # |
| 45 | include $(CLEAR_VARS) |
| 46 | |
| 47 | LOCAL_SRC_FILES := $(amend_src_files) |
| 48 | LOCAL_SRC_FILES += $(amend_test_files) |
| 49 | |
| 50 | LOCAL_CFLAGS := $(amend_cflags) |
| 51 | LOCAL_MODULE := libamend |
| 52 | |
| 53 | include $(BUILD_STATIC_LIBRARY) |