blob: c3b7c3277e96847ab8edb317703bed1ee4bde45d [file] [log] [blame]
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08001# Copyright 2007 The Android Open Source Project
2#
3
4LOCAL_PATH := $(call my-dir)
5
6amend_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 Projectc24a8e62009-03-03 19:28:42 -080013 execute.c
14
15amend_test_files := \
16 test_symtab.c \
Doug Zongkerf28c9162009-06-02 15:30:11 -070017 test_commands.c
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080018
19# "-x c" forces the lex/yacc files to be compiled as c;
20# the build system otherwise forces them to be c++.
21amend_cflags := -Wall -x c
22
23#
24# Build the host-side command line tool
25#
26include $(CLEAR_VARS)
27
28LOCAL_SRC_FILES := \
29 $(amend_src_files) \
30 $(amend_test_files) \
31 register.c \
32 main.c
33
34LOCAL_CFLAGS := $(amend_cflags) -g -O0
35LOCAL_MODULE := amend
36LOCAL_YACCFLAGS := -v
37
38include $(BUILD_HOST_EXECUTABLE)
39
40#
41# Build the device-side library
42#
43include $(CLEAR_VARS)
44
45LOCAL_SRC_FILES := $(amend_src_files)
46LOCAL_SRC_FILES += $(amend_test_files)
47
48LOCAL_CFLAGS := $(amend_cflags)
49LOCAL_MODULE := libamend
50
51include $(BUILD_STATIC_LIBRARY)