The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | # Copyright 2005 The Android Open Source Project |
| 2 | # |
| 3 | |
| 4 | ifeq ($(TARGET_SIMULATOR),true) |
| 5 | |
| 6 | LOCAL_PATH := $(call my-dir) |
| 7 | |
| 8 | include $(CLEAR_VARS) |
| 9 | |
| 10 | LOCAL_SRC_FILES := \ |
| 11 | DeviceManager.cpp \ |
| 12 | DeviceWindow.cpp \ |
| 13 | ExternalRuntime.cpp \ |
| 14 | LoadableImage.cpp \ |
| 15 | LocalBiChannel.cpp \ |
| 16 | LogMessage.cpp \ |
| 17 | LogPool.cpp \ |
| 18 | LogPrefsDialog.cpp \ |
| 19 | LogWindow.cpp \ |
| 20 | MainFrame.cpp \ |
| 21 | MessageStream.cpp \ |
| 22 | MyApp.cpp \ |
| 23 | PhoneButton.cpp \ |
| 24 | PhoneCollection.cpp \ |
| 25 | PhoneData.cpp \ |
| 26 | PhoneWindow.cpp \ |
Andy McFadden | 5cd6406 | 2009-05-27 16:01:13 -0700 | [diff] [blame] | 27 | Pipe.cpp \ |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 28 | Preferences.cpp \ |
| 29 | PrefsDialog.cpp \ |
| 30 | PropertyServer.cpp \ |
| 31 | Semaphore.cpp \ |
| 32 | Shmem.cpp \ |
Andy McFadden | 5cd6406 | 2009-05-27 16:01:13 -0700 | [diff] [blame] | 33 | UserEvent.cpp \ |
Mathias Agopian | f940dc6 | 2009-05-31 23:27:21 -0700 | [diff] [blame] | 34 | executablepath_linux.cpp \ |
| 35 | ported.cpp |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 36 | |
| 37 | LOCAL_STATIC_LIBRARIES := \ |
| 38 | libtinyxml |
| 39 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 40 | libutils\ |
| 41 | libcutils |
| 42 | LOCAL_MODULE := simulator |
| 43 | |
| 44 | LOCAL_LDLIBS += -lpthread |
| 45 | |
| 46 | LOCAL_CFLAGS := -UNDEBUG |
| 47 | #LOCAL_LDFLAGS := |
| 48 | |
| 49 | LOCAL_C_INCLUDES += \ |
| 50 | external/tinyxml \ |
| 51 | commands/runtime |
| 52 | |
| 53 | # wxWidgets defines |
| 54 | LOCAL_C_INCLUDES += \ |
| 55 | /usr/include/wx-2.6 \ |
| 56 | /usr/lib/wx/include/gtk2-unicode-release-2.6 |
| 57 | |
| 58 | ifeq ($(HOST_OS),linux) |
| 59 | # You can install wxWidgets with "sudo apt-get libwxgtk2.6-dev" |
| 60 | LOCAL_LDFLAGS += -lwx_baseu-2.6 \ |
| 61 | -lwx_baseu_net-2.6 \ |
| 62 | -lwx_baseu_xml-2.6 \ |
| 63 | -lwx_gtk2u_adv-2.6 \ |
| 64 | -lwx_gtk2u_core-2.6 \ |
| 65 | -lwx_gtk2u_html-2.6 \ |
| 66 | -lwx_gtk2u_qa-2.6 \ |
| 67 | -lwx_gtk2u_xrc-2.6 |
| 68 | |
| 69 | # this next line makes the simulator able to find its shared libraries |
| 70 | # without us explicitly setting the LD_LIBRARY_PATH environment variable |
| 71 | LOCAL_LDLIBS += -Wl,-z,origin |
| 72 | LOCAL_CFLAGS += -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 \ |
Patrick Scott | ed149c2 | 2010-10-08 10:11:04 -0400 | [diff] [blame^] | 73 | -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 74 | LOCAL_LDLIBS += -lrt |
| 75 | endif |
| 76 | ifeq ($(HOST_OS),darwin) |
| 77 | # NOTE: OS X is no longer supported |
| 78 | LOCAL_C_INCLUDES += prebuilt/$(HOST_PREBUILT_TAG)/wxwidgets |
| 79 | LOCAL_LDLIBS += \ |
| 80 | -framework QuickTime \ |
| 81 | -framework IOKit \ |
| 82 | -framework Carbon \ |
| 83 | -framework Cocoa \ |
| 84 | -framework System \ |
| 85 | -lwx_mac_xrc-2.6 \ |
| 86 | -lwx_mac_qa-2.6 \ |
| 87 | -lwx_mac_html-2.6 \ |
| 88 | -lwx_mac_adv-2.6 \ |
| 89 | -lwx_mac_core-2.6 \ |
| 90 | -lwx_base_carbon_xml-2.6 \ |
| 91 | -lwx_base_carbon_net-2.6 \ |
| 92 | -lwx_base_carbon-2.6 \ |
| 93 | -lwxexpat-2.6 \ |
| 94 | -lwxtiff-2.6 \ |
| 95 | -lwxjpeg-2.6 \ |
| 96 | -lwxpng-2.6 \ |
| 97 | -lz \ |
| 98 | -lpthread \ |
| 99 | -liconv |
| 100 | LOCAL_CFLAGS += \ |
| 101 | -D__WXMAC__ \ |
| 102 | -D_FILE_OFFSET_BITS=64 \ |
| 103 | -D_LARGE_FILES \ |
| 104 | -DNO_GCC_PRAGMA |
| 105 | endif |
| 106 | |
| 107 | |
| 108 | include $(BUILD_HOST_EXECUTABLE) |
| 109 | |
| 110 | ifeq ($(HOST_OS),darwin) |
| 111 | # Add the carbon resources to the executable. |
| 112 | $(LOCAL_BUILT_MODULE): PRIVATE_POST_PROCESS_COMMAND := \ |
| 113 | /Developer/Tools/Rez -d __DARWIN__ -t APPL \ |
| 114 | -d __WXMAC__ -o $(LOCAL_BUILT_MODULE) Carbon.r |
| 115 | endif |
| 116 | |
| 117 | # also, we need to copy our assets. We place these by hand now, because |
| 118 | # I'd like to clean this up as part of some pdk cleanup I want to do. |
| 119 | |
| 120 | asset_files := $(addprefix $(LOCAL_PATH)/assets/,$(call find-subdir-assets,$(LOCAL_PATH)/assets)) |
| 121 | asset_target := $(HOST_COMMON_OUT_ROOT)/sim-assets/simulator$(COMMON_PACKAGE_SUFFIX) |
| 122 | $(asset_target): PRIVATE_ASSET_ROOT := $(LOCAL_PATH)/assets |
| 123 | |
| 124 | $(asset_target) : $(asset_files) $(AAPT) |
| 125 | @echo host Package $@ |
| 126 | $(hide) mkdir -p $(dir $@) |
| 127 | $(hide) $(AAPT) package -u -A $(PRIVATE_ASSET_ROOT) -F $@ |
| 128 | |
| 129 | $(LOCAL_INSTALLED_MODULE): | $(asset_target) |
| 130 | |
| 131 | ALL_DEFAULT_INSTALLED_MODULES += $(asset_target) |
| 132 | |
| 133 | endif # $(TARGET_SIMULATOR) == true |