Raphael Moll | 5abe8b2 | 2012-03-30 15:50:45 -0700 | [diff] [blame^] | 1 | # Copyright 2012 The Android Open Source Project |
| 2 | |
| 3 | LOCAL_PATH := $(call my-dir) |
| 4 | include $(CLEAR_VARS) |
| 5 | |
| 6 | LOCAL_MODULE := monitor |
| 7 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 8 | LOCAL_MODULE_TAGS := optional |
| 9 | LOCAL_IS_HOST_MODULE := true |
| 10 | include $(BUILD_SYSTEM)/base_rules.mk |
| 11 | |
| 12 | RCP_MONITOR_DIR := $(TOPDIR)out/host/eclipse/rcp/build/I.RcpBuild |
| 13 | |
| 14 | define mk-rcp-monitor-atree-file |
| 15 | srczip=$(RCP_MONITOR_DIR)/RcpBuild-$(1).$(2).zip && \ |
| 16 | dstdir=$(HOST_OUT)/eclipse/monitor-$(1).$(2) && \ |
| 17 | rm -rf $(V) $$dstdir && \ |
| 18 | mkdir -p $$dstdir && \ |
| 19 | unzip -q $$srczip -d $$dstdir |
| 20 | endef |
| 21 | |
| 22 | # The RCP monitor. It is referenced by build/target/products/sdk.mk |
| 23 | $(LOCAL_BUILT_MODULE) : $(TOPDIR)sdk/monitor/monitor \ |
| 24 | $(TOPDIR)sdk/monitor/build.xml \ |
| 25 | $(TOPDIR)sdk/monitor/build.properties \ |
| 26 | $(shell $(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -d) |
| 27 | @mkdir -p $(dir $@) |
| 28 | $(hide)$(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -c |
| 29 | $(hide)cd $(TOPDIR)sdk/monitor && \ |
| 30 | java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \ |
| 31 | org.eclipse.equinox.launcher.Main \ |
| 32 | -application org.eclipse.ant.core.antRunner \ |
| 33 | -configuration ../../out/host/eclipse/rcp/build/configuration \ |
| 34 | -DbuildFor=$(HOST_OS) |
| 35 | $(hide)$(ACP) -fpt $(V) $(TOPDIR)sdk/monitor/monitor $@ |
| 36 | $(hide)if [[ $(HOST_OS) == "linux" ]]; then \ |
| 37 | $(call mk-rcp-monitor-atree-file,linux.gtk,x86) ; \ |
| 38 | $(call mk-rcp-monitor-atree-file,linux.gtk,x86_64) ; \ |
| 39 | fi |
| 40 | $(hide)if [[ $(HOST_OS) == "darwin" ]]; then \ |
| 41 | $(call mk-rcp-monitor-atree-file,macosx.cocoa,x86_64) ; \ |
| 42 | fi |
| 43 | $(hide)if [[ $(HOST_OS) == "windows" ]]; then \ |
| 44 | $(call mk-rcp-monitor-atree-file,win32.win32,x86) ; \ |
| 45 | $(call mk-rcp-monitor-atree-file,win32.win32,x86_64) ; \ |
| 46 | fi |