1 LOCAL_PATH:= $(call my-dir) 2 include $(CLEAR_VARS) 3 4 LOCAL_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 32 LOCAL_MODULE:= sh 33 34 LOCAL_CFLAGS += -DSHELL -DWITH_LINENOISE 35 36 LOCAL_STATIC_LIBRARIES := liblinenoise 37 38 LOCAL_C_INCLUDES += system/core/liblinenoise 39 40 make_ash_files: PRIVATE_SRC_FILES := $(SRC_FILES) 41 make_ash_files: PRIVATE_CFLAGS := $(LOCAL_CFLAGS) 42 make_ash_files: 43 p4 edit arith.c arith_lex.c arith.h builtins.h builtins.c 44 p4 edit init.c nodes.c nodes.h token.h 45 sh ./mktokens 46 bison -o arith.c arith.y 47 flex -o arith_lex.c arith_lex.l 48 perl -ne 'print if ( /^\#\s*define\s+ARITH/ );' < arith.c > arith.h 49 sh ./mkbuiltins shell.h builtins.def . -Wall -O2 50 sh ./mknodes.sh nodetypes nodes.c.pat . 51 sh ./mkinit.sh $(PRIVATE_SRC_FILES) 52 53 include $(BUILD_EXECUTABLE) 54