DerivedSources.make 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions
  5. # are met:
  6. # 1. Redistributions of source code must retain the above copyright
  7. # notice, this list of conditions and the following disclaimer.
  8. # 2. Redistributions in binary form must reproduce the above copyright
  9. # notice, this list of conditions and the following disclaimer in the
  10. # documentation and/or other materials provided with the distribution.
  11. #
  12. # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
  13. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  14. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  15. # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
  16. # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  17. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  18. # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  19. # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  21. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. VPATH = \
  23. $(WebKit2) \
  24. $(WebKit2)/NetworkProcess \
  25. $(WebKit2)/NetworkProcess/mac \
  26. $(WebKit2)/PluginProcess \
  27. $(WebKit2)/PluginProcess/mac \
  28. $(WebKit2)/Shared/Plugins \
  29. $(WebKit2)/Shared \
  30. $(WebKit2)/Shared/mac \
  31. $(WebKit2)/Shared/Authentication \
  32. $(WebKit2)/Shared/Network/CustomProtocols \
  33. $(WebKit2)/SharedWorkerProcess \
  34. $(WebKit2)/OfflineStorageProcess \
  35. $(WebKit2)/WebProcess/ApplicationCache \
  36. $(WebKit2)/WebProcess/Cookies \
  37. $(WebKit2)/WebProcess/FullScreen \
  38. $(WebKit2)/WebProcess/Geolocation \
  39. $(WebKit2)/WebProcess/IconDatabase \
  40. $(WebKit2)/WebProcess/MediaCache \
  41. $(WebKit2)/WebProcess/Network \
  42. $(WebKit2)/WebProcess/Notifications \
  43. $(WebKit2)/WebProcess/Plugins \
  44. $(WebKit2)/WebProcess/ResourceCache \
  45. $(WebKit2)/WebProcess/Storage \
  46. $(WebKit2)/WebProcess/WebCoreSupport \
  47. $(WebKit2)/WebProcess/WebPage \
  48. $(WebKit2)/WebProcess \
  49. $(WebKit2)/UIProcess \
  50. $(WebKit2)/UIProcess/Downloads \
  51. $(WebKit2)/UIProcess/Network \
  52. $(WebKit2)/UIProcess/Network/CustomProtocols \
  53. $(WebKit2)/UIProcess/Notifications \
  54. $(WebKit2)/UIProcess/Plugins \
  55. $(WebKit2)/UIProcess/SharedWorkers \
  56. $(WebKit2)/UIProcess/Storage \
  57. $(WebKit2)/UIProcess/mac \
  58. #
  59. MESSAGE_RECEIVERS = \
  60. AuthenticationManager \
  61. CustomProtocolManager \
  62. CustomProtocolManagerProxy \
  63. DrawingArea \
  64. DrawingAreaProxy \
  65. DownloadProxy \
  66. EventDispatcher \
  67. NetworkProcess \
  68. NetworkProcessConnection \
  69. NetworkProcessProxy \
  70. NetworkResourceLoader \
  71. NPObjectMessageReceiver \
  72. OfflineStorageProcess \
  73. PluginControllerProxy \
  74. PluginProcess \
  75. PluginProcessConnection \
  76. PluginProcessConnectionManager \
  77. PluginProcessProxy \
  78. PluginProxy \
  79. SharedWorkerProcess \
  80. SharedWorkerProcessProxy \
  81. StorageManager \
  82. WebApplicationCacheManager \
  83. WebApplicationCacheManagerProxy \
  84. WebCookieManager \
  85. WebCookieManagerProxy \
  86. WebConnection \
  87. NetworkConnectionToWebProcess \
  88. RemoteLayerTreeHost \
  89. SecItemShim \
  90. SecItemShimProxy \
  91. StorageAreaMap \
  92. WebContext \
  93. WebDatabaseManager \
  94. WebDatabaseManagerProxy \
  95. WebFullScreenManager \
  96. WebFullScreenManagerProxy \
  97. WebGeolocationManager \
  98. WebGeolocationManagerProxy \
  99. WebIconDatabase \
  100. WebIconDatabaseProxy \
  101. WebInspector \
  102. WebInspectorProxy \
  103. WebMediaCacheManager \
  104. WebMediaCacheManagerProxy \
  105. WebNotificationManager \
  106. WebPage \
  107. WebPageGroupProxy \
  108. WebPageProxy \
  109. WebProcess \
  110. WebProcessConnection \
  111. WebProcessProxy \
  112. WebResourceCacheManager \
  113. WebResourceCacheManagerProxy \
  114. WebResourceLoader \
  115. #
  116. SCRIPTS = \
  117. $(WebKit2)/Scripts/generate-message-receiver.py \
  118. $(WebKit2)/Scripts/generate-messages-header.py \
  119. $(WebKit2)/Scripts/webkit2/__init__.py \
  120. $(WebKit2)/Scripts/webkit2/messages.py \
  121. $(WebKit2)/Scripts/webkit2/model.py \
  122. $(WebKit2)/Scripts/webkit2/parser.py \
  123. #
  124. .PHONY : all
  125. all : \
  126. $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
  127. $(MESSAGE_RECEIVERS:%=%Messages.h) \
  128. #
  129. %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
  130. @echo Generating messages header for $*...
  131. @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
  132. %Messages.h : %.messages.in $(SCRIPTS)
  133. @echo Generating message receiver for $*...
  134. @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
  135. # Mac-specific rules
  136. ifeq ($(PLATFORM_NAME),macosx)
  137. FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
  138. HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
  139. # Some versions of clang incorrectly strip out // comments in c89 code.
  140. # Use -traditional as a workaround, but only when needed since that causes
  141. # other problems with later versions of clang.
  142. ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
  143. TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
  144. else
  145. TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
  146. endif
  147. ifneq ($(SDKROOT),)
  148. SDK_FLAGS=-isysroot $(SDKROOT)
  149. endif
  150. SANDBOX_PROFILES = \
  151. com.apple.WebProcess.sb \
  152. com.apple.WebKit.NetworkProcess.sb
  153. all: $(SANDBOX_PROFILES)
  154. %.sb : %.sb.in
  155. @echo Pre-processing $* sandbox profile...
  156. $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
  157. endif # macosx
  158. # ------------------------
  159. # Windows-specific rules
  160. ifeq ($(OS),Windows_NT)
  161. all : HeaderDetection.h
  162. HeaderDetection.h : DerivedSources.make
  163. if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ] && [ ! -f "$(WEBKITLIBRARIESDIR)/include/cairo/cairo.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi
  164. if [ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi
  165. endif # Windows_NT