blob: ae2d44ae1828074b30dddcc04a04c1f5dbaad67e [file] [log] [blame]
The Android Open Source Project23580ca2008-10-21 07:00:00 -07001# 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 \
13 permissions.c \
14 execute.c
15
16amend_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++.
23amend_cflags := -Wall -x c
24
25#
26# Build the host-side command line tool
27#
28include $(CLEAR_VARS)
29
30LOCAL_SRC_FILES := \
31 $(amend_src_files) \
32 $(amend_test_files) \
33 register.c \
34 main.c
35
36LOCAL_CFLAGS := $(amend_cflags) -g -O0
37LOCAL_MODULE := amend
38LOCAL_YACCFLAGS := -v
39
40include $(BUILD_HOST_EXECUTABLE)
41
42#
43# Build the device-side library
44#
45include $(CLEAR_VARS)
46
47LOCAL_SRC_FILES := $(amend_src_files)
48LOCAL_SRC_FILES += $(amend_test_files)
49
50LOCAL_CFLAGS := $(amend_cflags)
51LOCAL_MODULE := libamend
52
53include $(BUILD_STATIC_LIBRARY)