• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2012 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16# this is a set of definitions that allow the usage of Makefile.android
17# even if we're not using the Android build system.
18#
19
20OBJS_DIR     := objs
21CONFIG_MAKE  := $(OBJS_DIR)/config.make
22CONFIG_H     := $(OBJS_DIR)/config-host.h
23
24ifeq ($(wildcard $(CONFIG_MAKE)),)
25    $(error "The configuration file '$(CONFIG_MAKE)' doesnt' exist, please run the "android-configure.sh" script)
26endif
27
28include $(CONFIG_MAKE)
29
30ifeq ($(strip $(BUILD_SYSTEM)),)
31    $(error "The BUILD_SYSTEM variable was not defined by your configuration sub-makefile. Aborting")
32endif
33
34include $(BUILD_SYSTEM)/definitions.make
35
36VPATH := $(OBJS_DIR)
37VPATH += :$(SRC_PATH)/include
38VPATH += :$(SRC_PATH)
39
40.PHONY: all libraries executables clean clean-config clean-objs-dir \
41        clean-executables clean-libraries
42
43CLEAR_VARS                := $(BUILD_SYSTEM)/clear_vars.make
44BUILD_HOST_EXECUTABLE     := $(BUILD_SYSTEM)/host_executable.make
45BUILD_HOST_STATIC_LIBRARY := $(BUILD_SYSTEM)/host_static_library.make
46
47DEPENDENCY_DIRS :=
48
49all: libraries executables
50EXECUTABLES :=
51LIBRARIES   :=
52
53clean: clean-intermediates
54
55distclean: clean clean-config
56
57# let's roll
58include Makefile.android
59
60libraries: $(LIBRARIES)
61executables: $(EXECUTABLES)
62
63clean-intermediates:
64	rm -rf $(OBJS_DIR)/intermediates $(EXECUTABLES) $(LIBRARIES)
65
66clean-config:
67	rm -f $(CONFIG_MAKE) $(CONFIG_H)
68
69# include dependency information
70DEPENDENCY_DIRS := $(sort $(DEPENDENCY_DIRS))
71-include $(wildcard $(DEPENDENCY_DIRS:%=%/*.d))
72