blob: 09bb6ac174feaa5c860547b8c5de726cd6a9bc3c [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_SRC_FILES:= \
5 alias.c \
6 arith.c \
7 arith_lex.c \
8 builtins.c \
9 cd.c \
10 error.c \
11 eval.c \
12 exec.c \
13 expand.c \
14 input.c \
15 jobs.c \
16 main.c \
17 memalloc.c \
18 miscbltin.c \
19 mystring.c \
20 nodes.c \
21 options.c \
22 parser.c \
23 redir.c \
24 show.c \
25 syntax.c \
26 trap.c \
27 output.c \
28 var.c \
29 bltin/echo.c \
30 init.c
31
32LOCAL_MODULE:= sh
33
34LOCAL_CFLAGS += -DSHELL
35
36make_ash_files: PRIVATE_SRC_FILES := $(SRC_FILES)
37make_ash_files: PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
38make_ash_files:
39 p4 edit arith.c arith_lex.c arith.h builtins.h builtins.c
40 p4 edit init.c nodes.c nodes.h token.h
41 sh ./mktokens
42 bison -o arith.c arith.y
43 flex -o arith_lex.c arith_lex.l
44 perl -ne 'print if ( /^\#\s*define\s+ARITH/ );' < arith.c > arith.h
45 sh ./mkbuiltins shell.h builtins.def . -Wall -O2
46 sh ./mknodes.sh nodetypes nodes.c.pat .
47 sh ./mkinit.sh $(PRIVATE_SRC_FILES)
48
49include $(BUILD_EXECUTABLE)