• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2008 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
20BUILD_SYSTEM := android/build
21OBJS_DIR     := objs
22CONFIG_MAKE  := $(OBJS_DIR)/config.make
23CONFIG_H     := $(OBJS_DIR)/config-host.h
24
25ifeq ($(wildcard $(CONFIG_MAKE)),)
26    $(error "The configuration file '$(CONFIG_MAKE)' doesnt' exist, please run the "rebuilt.sh" script)
27endif
28
29include $(CONFIG_MAKE)
30include $(BUILD_SYSTEM)/definitions.make
31
32VPATH := $(OBJS_DIR)
33VPATH += :$(SRC_PATH)/android/config
34VPATH += :$(SRC_PATH):$(SRC_PATH)/target-$(TARGET_ARCH)
35
36.PHONY: all libraries executables clean clean-config clean-objs-dir \
37        clean-executables clean-libraries
38
39CLEAR_VARS                := $(BUILD_SYSTEM)/clear_vars.make
40BUILD_HOST_EXECUTABLE     := $(BUILD_SYSTEM)/host_executable.make
41BUILD_HOST_STATIC_LIBRARY := $(BUILD_SYSTEM)/host_static_library.make
42
43DEPENDENCY_DIRS :=
44
45all: libraries executables
46EXECUTABLES :=
47LIBRARIES   :=
48
49SDL_CONFIG ?= $(PREBUILT)/sdl/bin/sdl-config
50SDL_LIBS   := $(filter %.a,$(shell $(SDL_CONFIG) --static-libs))
51$(foreach lib,$(SDL_LIBS), \
52    $(eval $(call copy-prebuilt-lib,$(lib))) \
53)
54
55clean: clean-intermediates
56
57distclean: clean clean-config
58
59# let's roll
60include Makefile.android
61
62libraries: $(LIBRARIES)
63executables: $(EXECUTABLES)
64
65clean-intermediates:
66	rm -rf $(OBJS_DIR)/intermediates $(EXECUTABLES) $(LIBRARIES)
67
68clean-config:
69	rm -f $(CONFIG_MAKE) $(CONFIG_H)
70
71# include dependency information
72DEPENDENCY_DIRS := $(sort $(DEPENDENCY_DIRS))
73-include $(wildcard $(DEPENDENCY_DIRS:%=%/*.d))