137bee62aefb5ac10716054edf482fd37078f1427Doug Zongker# Copyright 2009 The Android Open Source Project
237bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
337bee62aefb5ac10716054edf482fd37078f1427Doug ZongkerLOCAL_PATH := $(call my-dir)
437bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
537bee62aefb5ac10716054edf482fd37078f1427Doug Zongkeredify_src_files := \
637bee62aefb5ac10716054edf482fd37078f1427Doug Zongker	lexer.l \
737bee62aefb5ac10716054edf482fd37078f1427Doug Zongker	parser.y \
837bee62aefb5ac10716054edf482fd37078f1427Doug Zongker	expr.c
937bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
1037bee62aefb5ac10716054edf482fd37078f1427Doug Zongker# "-x c" forces the lex/yacc files to be compiled as c;
1137bee62aefb5ac10716054edf482fd37078f1427Doug Zongker# the build system otherwise forces them to be c++.
1237bee62aefb5ac10716054edf482fd37078f1427Doug Zongkeredify_cflags := -x c
1337bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
1437bee62aefb5ac10716054edf482fd37078f1427Doug Zongker#
1537bee62aefb5ac10716054edf482fd37078f1427Doug Zongker# Build the host-side command line tool
1637bee62aefb5ac10716054edf482fd37078f1427Doug Zongker#
1737bee62aefb5ac10716054edf482fd37078f1427Doug Zongkerinclude $(CLEAR_VARS)
1837bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
1937bee62aefb5ac10716054edf482fd37078f1427Doug ZongkerLOCAL_SRC_FILES := \
2037bee62aefb5ac10716054edf482fd37078f1427Doug Zongker		$(edify_src_files) \
2137bee62aefb5ac10716054edf482fd37078f1427Doug Zongker		main.c
2237bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
2337bee62aefb5ac10716054edf482fd37078f1427Doug ZongkerLOCAL_CFLAGS := $(edify_cflags) -g -O0
2437bee62aefb5ac10716054edf482fd37078f1427Doug ZongkerLOCAL_MODULE := edify
2537bee62aefb5ac10716054edf482fd37078f1427Doug ZongkerLOCAL_YACCFLAGS := -v
260d32f259cddeaf46917bdc4af3514114c206dd76Doug ZongkerLOCAL_CFLAGS += -Wno-unused-parameter
2737bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
2837bee62aefb5ac10716054edf482fd37078f1427Doug Zongkerinclude $(BUILD_HOST_EXECUTABLE)
2937bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
309931f7f3c1288171319e9ff7d053ebaad07db720Doug Zongker#
319931f7f3c1288171319e9ff7d053ebaad07db720Doug Zongker# Build the device-side library
329931f7f3c1288171319e9ff7d053ebaad07db720Doug Zongker#
339931f7f3c1288171319e9ff7d053ebaad07db720Doug Zongkerinclude $(CLEAR_VARS)
3437bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
359931f7f3c1288171319e9ff7d053ebaad07db720Doug ZongkerLOCAL_SRC_FILES := $(edify_src_files)
3637bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
379931f7f3c1288171319e9ff7d053ebaad07db720Doug ZongkerLOCAL_CFLAGS := $(edify_cflags)
380d32f259cddeaf46917bdc4af3514114c206dd76Doug ZongkerLOCAL_CFLAGS += -Wno-unused-parameter
399931f7f3c1288171319e9ff7d053ebaad07db720Doug ZongkerLOCAL_MODULE := libedify
4037bee62aefb5ac10716054edf482fd37078f1427Doug Zongker
419931f7f3c1288171319e9ff7d053ebaad07db720Doug Zongkerinclude $(BUILD_STATIC_LIBRARY)
42