2
0

make.shared.variables 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. # Helper functions
  2. doObjects= $(patsubst %.m,%.o,$(patsubst %.cc,%.o,$(patsubst %.y,%.o,$(patsubst %.epp,%.o,$(patsubst %.c,%.o,$(1:.cpp=.o))))))
  3. makeObjects= $(addprefix $(OBJ)/$(patsubst ../%,%,$(1))/,$(call doObjects,$2))
  4. dirFiles= $(sort $(notdir $(wildcard ../src/$(1)/*.cpp)) $(notdir $(wildcard ../src/$(1)/*.c)) \
  5. $(notdir $(wildcard ../src/$(1)/*.epp)) $(notdir $(wildcard ../src/$(1)/*.y)) \
  6. $(notdir $(wildcard ../src/$(1)/*.cc)) $(notdir $(wildcard ../src/$(1)/*.m)))
  7. dirInPath= $(call makeObjects,$(1),$(call dirFiles,$(1)))
  8. dirMaster= $(call dirInPath,$(1))
  9. dirOs= $(call dirInPath,$(1)/$(PLATFORM_PATH))
  10. ifneq ($(strip $(PLATFORM_FALLBACK)),)
  11. dirBackList= $(filter-out $(call dirFiles,$(1)/$(PLATFORM_PATH)),$(call dirFiles,$(1)/$(PLATFORM_FALLBACK)))
  12. dirFallBack= $(call makeObjects,$(1)/$(PLATFORM_FALLBACK),$(call dirBackList,$(1)))
  13. else
  14. dirFallBack=
  15. endif
  16. dirObjects= $(call dirMaster,$(1)) $(call dirOs,$(1)) $(call dirFallBack,$(1))
  17. makePluginName= $(PLUGINS)/$(LIB_PREFIX)$(1).$(SHRLIB_EXT)
  18. # Collect all object files here
  19. AllObjects=
  20. # Common files
  21. CO1:= $(call dirObjects,common)
  22. CO2:= $(call dirObjects,common/classes)
  23. CO3:= $(call dirObjects,common/config)
  24. CO4:= $(call dirObjects,common/sha2)
  25. #CO5:= $(call dirObjects,common/exceptions)
  26. #CO6:= $(call dirObjects,common/sync)
  27. Common_Objects:= $(CO1) $(CO2) $(CO3) $(CO4)
  28. # $(CO5) $(CO6)
  29. AllObjects += $(Common_Objects)
  30. # Common test files
  31. COT1:= $(call dirObjects,common/tests)
  32. COT2:= $(call dirObjects,common/classes/tests)
  33. COT3:= $(call dirObjects,common/ipc/tests)
  34. Common_Test_Objects:= $(COT1) $(COT2) $(COT3) $(call makeObjects,yvalve,gds.cpp)
  35. AllObjects += $(Common_Test_Objects)
  36. # gpre
  37. GPRE_Common_Objects:= $(call dirObjects,gpre) $(call makeObjects,gpre/languages,@GPRE_LANGUAGE_MODULES@)
  38. GPRE_std:= $(call dirObjects,gpre/std)
  39. GPRE_Objects:= $(GPRE_Common_Objects) $(GPRE_std)
  40. GPRE_boot:= $(call dirObjects,gpre/boot) $(call makeObjects,yvalve,gds.cpp)
  41. GPRE_Boot_Objects:= $(GPRE_Common_Objects) $(GPRE_boot)
  42. AllObjects += $(GPRE_Common_Objects) $(GPRE_std) $(GPRE_boot)
  43. # Y-Valve
  44. YValve_Objects:= $(call dirObjects,yvalve) $(call dirObjects,yvalve/config)
  45. AllObjects += $(YValve_Objects)
  46. # Authentication database connections cache
  47. SecDbCache:= $(call makeObjects,auth,SecDbCache.cpp)
  48. # Remote
  49. Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword)
  50. Remote_Server:= $(call dirObjects,remote/server) $(call dirObjects,auth/SecureRemotePassword/server) \
  51. $(call makeObjects,jrd/replication,Config.cpp Utils.cpp) $(SecDbCache)
  52. Remote_Client:= $(call dirObjects,remote/client) $(call dirObjects,auth/SecureRemotePassword/client) \
  53. $(call makeObjects,auth/SecurityDatabase,LegacyClient.cpp) \
  54. $(call dirObjects,plugins/crypt/arc4)
  55. Remote_Server_Objects:= $(Remote_Common) $(Remote_Server)
  56. Remote_Client_Objects:= $(Remote_Common) $(Remote_Client)
  57. AllObjects += $(Remote_Common) $(Remote_Server) $(Remote_Client)
  58. # Chacha plugin
  59. Chacha_Objects:= $(call dirObjects,plugins/crypt/chacha)
  60. AllObjects += $(Chacha_Objects)
  61. # Profiler plugin
  62. Profiler_Objects:= $(call dirObjects,plugins/profiler)
  63. AllObjects += $(Profiler_Objects)
  64. # Engine
  65. Engine_Objects:= $(call dirObjects,jrd) $(call dirObjects,dsql) $(call dirObjects,jrd/extds) \
  66. $(call dirObjects,jrd/optimizer) $(call dirObjects,jrd/recsrc) $(call dirObjects,jrd/replication) \
  67. $(call dirObjects,jrd/sys-packages) $(call dirObjects,jrd/trace) \
  68. $(call makeObjects,lock,lock.cpp)
  69. Engine_Test_Objects:= $(call dirObjects,jrd/tests) $(call dirObjects,lock/tests)
  70. AllObjects += $(Engine_Objects) $(Engine_Test_Objects)
  71. # services
  72. # gfix
  73. Svc_GFIX_Objects:= $(call dirObjects,alice)
  74. GFIX_Objects:= $(Svc_GFIX_Objects) $(call dirObjects,alice/main)
  75. AllObjects += $(GFIX_Objects)
  76. # gbak
  77. Svc_GBAK_Objects:= $(call dirObjects,burp)
  78. GBAK_Objects:= $(Svc_GBAK_Objects) $(call dirObjects,burp/main)
  79. AllObjects += $(GBAK_Objects)
  80. # gsec
  81. Svc_GSEC_Objects:= $(call dirObjects,utilities/gsec)
  82. GSEC_Objects:= $(Svc_GSEC_Objects) $(call dirObjects,utilities/gsec/main)
  83. AllObjects += $(GSEC_Objects)
  84. # gstat
  85. Svc_GSTAT_Objects:= $(call dirObjects,utilities/gstat)
  86. GSTAT_Own_Objects:= $(Svc_GSTAT_Objects) $(call dirObjects,utilities/gstat/main)
  87. GSTAT_Objects:= $(GSTAT_Own_Objects) $(call makeObjects,jrd,btn.cpp ods.cpp)
  88. AllObjects += $(GSTAT_Own_Objects)
  89. # nbackup
  90. Svc_NBACKUP_Objects:= $(call dirObjects,utilities/nbackup)
  91. NBACKUP_Own_Objects:= $(Svc_NBACKUP_Objects) $(call dirObjects,utilities/nbackup/main)
  92. NBACKUP_Objects:= $(NBACKUP_Own_Objects) $(call makeObjects,jrd,ods.cpp)
  93. AllObjects += $(NBACKUP_Own_Objects)
  94. SVC_Objects:= $(Svc_GFIX_Objects) $(Svc_GBAK_Objects) $(Svc_GSEC_Objects) $(Svc_GSTAT_Objects) \
  95. $(Svc_NBACKUP_Objects)
  96. # International support
  97. INTL_Objects:= $(call dirObjects,intl)
  98. AllObjects += $(INTL_Objects)
  99. # Lockprint
  100. LOCKPRINT_Objects:= $(call makeObjects,lock,print.cpp)
  101. AllObjects += $(LOCKPRINT_Objects)
  102. # Guardian
  103. FBGUARD_Objects:= $(call dirObjects,utilities/guard)
  104. AllObjects += $(FBGUARD_Objects)
  105. # Services manager
  106. FBSVCMGR_Objects:= $(call dirObjects,utilities/fbsvcmgr)
  107. AllObjects += $(FBSVCMGR_Objects)
  108. # Trace manager
  109. FBTRACEMGR_Objects:= $(call dirObjects,utilities/fbtracemgr) $(call makeObjects,jrd/trace,TraceCmdLine.cpp)
  110. AllObjects += $(FBTRACEMGR_Objects)
  111. # Trace plugin
  112. FBTRACE_UTIL_Objects:= $(call dirObjects,utilities/ntrace)
  113. AllObjects += $(FBTRACE_UTIL_Objects)
  114. # Split/merge backup files
  115. GSPLIT_Objects:= $(call dirObjects,burp/split)
  116. AllObjects += $(GSPLIT_Objects)
  117. # Interactive sql
  118. ISQL_Objects:= $(call dirObjects,isql)
  119. ISQL_Test_Objects:= $(call dirObjects,isql/tests)
  120. AllObjects += $(ISQL_Objects) $(ISQL_Test_Objects)
  121. # Legacy users management in security database
  122. LEGACY_USERS_MANAGE_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyManagement.epp)
  123. AllObjects += $(LEGACY_USERS_MANAGE_Objects)
  124. # Legacy authentication on server
  125. LEGACY_AUTH_SERVER_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyServer.cpp) $(SecDbCache)
  126. AllObjects += $(LEGACY_AUTH_SERVER_Objects)
  127. # SRP-based users management in security database
  128. SRP_USERS_MANAGE_Objects:= $(call dirObjects,auth/SecureRemotePassword/manage) \
  129. $(call dirObjects,auth/SecureRemotePassword)
  130. AllObjects += $(SRP_USERS_MANAGE_Objects)
  131. # Multihop authentication debugger
  132. AUTH_DEBUGGER_Objects:= $(call makeObjects,auth,AuthDbg.cpp)
  133. AllObjects += $(AUTH_DEBUGGER_Objects)
  134. # UDR engine
  135. UDRENG_Objects:= $(call dirObjects,plugins/udr_engine)
  136. AllObjects += $(UDRENG_Objects)
  137. # UDF support
  138. UTIL_Objects:= $(call makeObjects,extlib,ib_util.cpp)
  139. # UDR backward compatible with distributed UDFs
  140. COMPAT_Objects:= $(call makeObjects,extlib,UdfBackwardCompatibility.cpp)
  141. SRC_COMPAT_SQL:= $(SRC_ROOT)/extlib/UdfBackwardCompatibility.sql
  142. COMPAT_SQL?= $(call buildSubDirectory,plugins/udr)/udf_compat.sql
  143. AllObjects += $(UTIL_Objects) $(COMPAT_Objects)
  144. # Create messages file
  145. BUILD_Objects:= $(call makeObjects,msgs,build_file.cpp)
  146. AllObjects += $(BUILD_Objects)