make.shared.variables 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. # gpre
  31. GPRE_Common_Objects:= $(call dirObjects,gpre) $(call makeObjects,gpre/languages,@GPRE_LANGUAGE_MODULES@)
  32. GPRE_std:= $(call dirObjects,gpre/std)
  33. GPRE_Objects:= $(GPRE_Common_Objects) $(GPRE_std)
  34. GPRE_boot:= $(call dirObjects,gpre/boot) $(call makeObjects,yvalve,gds.cpp)
  35. GPRE_Boot_Objects:= $(GPRE_Common_Objects) $(GPRE_boot)
  36. AllObjects += $(GPRE_Common_Objects) $(GPRE_std) $(GPRE_boot)
  37. # Y-Valve
  38. YValve_Objects:= $(call dirObjects,yvalve) $(call dirObjects,yvalve/config)
  39. AllObjects += $(YValve_Objects)
  40. # Authentication database connections cache
  41. SecDbCache:= $(call makeObjects,auth,SecDbCache.cpp)
  42. # Remote
  43. Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword)
  44. Remote_Server:= $(call dirObjects,remote/server) $(call dirObjects,auth/SecureRemotePassword/server) \
  45. $(call makeObjects,jrd/replication,Config.cpp Utils.cpp) $(SecDbCache)
  46. Remote_Client:= $(call dirObjects,remote/client) $(call dirObjects,auth/SecureRemotePassword/client) \
  47. $(call makeObjects,auth/SecurityDatabase,LegacyClient.cpp) \
  48. $(call dirObjects,plugins/crypt/arc4)
  49. Remote_Server_Objects:= $(Remote_Common) $(Remote_Server)
  50. Remote_Client_Objects:= $(Remote_Common) $(Remote_Client)
  51. AllObjects += $(Remote_Common) $(Remote_Server) $(Remote_Client)
  52. # Chacha plugin
  53. Chacha_Objects:= $(call dirObjects,plugins/crypt/chacha)
  54. AllObjects += $(Chacha_Objects)
  55. # Engine
  56. Engine_Objects:= $(call dirObjects,jrd) $(call dirObjects,dsql) $(call dirObjects,jrd/extds) \
  57. $(call dirObjects,jrd/recsrc) $(call dirObjects,jrd/replication) $(call dirObjects,jrd/trace) \
  58. $(call makeObjects,lock,lock.cpp)
  59. AllObjects += $(Engine_Objects)
  60. # services
  61. # gfix
  62. Svc_GFIX_Objects:= $(call dirObjects,alice)
  63. GFIX_Objects:= $(Svc_GFIX_Objects) $(call dirObjects,alice/main)
  64. AllObjects += $(GFIX_Objects)
  65. # gbak
  66. Svc_GBAK_Objects:= $(call dirObjects,burp)
  67. GBAK_Objects:= $(Svc_GBAK_Objects) $(call dirObjects,burp/main)
  68. AllObjects += $(GBAK_Objects)
  69. # gsec
  70. Svc_GSEC_Objects:= $(call dirObjects,utilities/gsec)
  71. GSEC_Objects:= $(Svc_GSEC_Objects) $(call dirObjects,utilities/gsec/main)
  72. AllObjects += $(GSEC_Objects)
  73. # gstat
  74. Svc_GSTAT_Objects:= $(call dirObjects,utilities/gstat)
  75. GSTAT_Own_Objects:= $(Svc_GSTAT_Objects) $(call dirObjects,utilities/gstat/main)
  76. GSTAT_Objects:= $(GSTAT_Own_Objects) $(call makeObjects,jrd,btn.cpp ods.cpp)
  77. AllObjects += $(GSTAT_Own_Objects)
  78. # nbackup
  79. Svc_NBACKUP_Objects:= $(call dirObjects,utilities/nbackup)
  80. NBACKUP_Own_Objects:= $(Svc_NBACKUP_Objects) $(call dirObjects,utilities/nbackup/main)
  81. NBACKUP_Objects:= $(NBACKUP_Own_Objects) $(call makeObjects,jrd,ods.cpp)
  82. AllObjects += $(NBACKUP_Own_Objects)
  83. SVC_Objects:= $(Svc_GFIX_Objects) $(Svc_GBAK_Objects) $(Svc_GSEC_Objects) $(Svc_GSTAT_Objects) \
  84. $(Svc_NBACKUP_Objects)
  85. # International support
  86. INTL_Objects:= $(call dirObjects,intl)
  87. AllObjects += $(INTL_Objects)
  88. # Lockprint
  89. LOCKPRINT_Objects:= $(call makeObjects,lock,print.cpp)
  90. AllObjects += $(LOCKPRINT_Objects)
  91. # Guardian
  92. FBGUARD_Objects:= $(call dirObjects,utilities/guard)
  93. AllObjects += $(FBGUARD_Objects)
  94. # Services manager
  95. FBSVCMGR_Objects:= $(call dirObjects,utilities/fbsvcmgr)
  96. AllObjects += $(FBSVCMGR_Objects)
  97. # Trace manager
  98. FBTRACEMGR_Objects:= $(call dirObjects,utilities/fbtracemgr) $(call makeObjects,jrd/trace,TraceCmdLine.cpp)
  99. AllObjects += $(FBTRACEMGR_Objects)
  100. # Trace plugin
  101. FBTRACE_UTIL_Objects:= $(call dirObjects,utilities/ntrace)
  102. AllObjects += $(FBTRACE_UTIL_Objects)
  103. # Split/merge backup files
  104. GSPLIT_Objects:= $(call dirObjects,burp/split)
  105. AllObjects += $(GSPLIT_Objects)
  106. # Interactive sql
  107. ISQL_Objects:= $(call dirObjects,isql)
  108. AllObjects += $(ISQL_Objects)
  109. # QLI
  110. QLI_Objects:= $(call dirObjects,qli)
  111. AllObjects += $(QLI_Objects)
  112. # Legacy users management in security database
  113. LEGACY_USERS_MANAGE_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyManagement.epp)
  114. AllObjects += $(LEGACY_USERS_MANAGE_Objects)
  115. # Legacy authentication on server
  116. LEGACY_AUTH_SERVER_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyServer.cpp) $(SecDbCache)
  117. AllObjects += $(LEGACY_AUTH_SERVER_Objects)
  118. # SRP-based users management in security database
  119. SRP_USERS_MANAGE_Objects:= $(call dirObjects,auth/SecureRemotePassword/manage) \
  120. $(call dirObjects,auth/SecureRemotePassword)
  121. AllObjects += $(SRP_USERS_MANAGE_Objects)
  122. # Multihop authentication debugger
  123. AUTH_DEBUGGER_Objects:= $(call makeObjects,auth,AuthDbg.cpp)
  124. AllObjects += $(AUTH_DEBUGGER_Objects)
  125. # UDR engine
  126. UDRENG_Objects:= $(call dirObjects,plugins/udr_engine)
  127. AllObjects += $(UDRENG_Objects)
  128. # UDF support
  129. UTIL_Objects:= $(call makeObjects,extlib,ib_util.cpp)
  130. # UDR backward compatible with distributed UDFs
  131. COMPAT_Objects:= $(call makeObjects,extlib,UdfBackwardCompatibility.cpp)
  132. SRC_COMPAT_SQL:= $(SRC_ROOT)/extlib/UdfBackwardCompatibility.sql
  133. COMPAT_SQL:= $(PLUGINS)/udr/udf_compat.sql
  134. AllObjects += $(UTIL_Objects) $(COMPAT_Objects)
  135. # Regenerate error codes
  136. CODES_Objects:= $(call makeObjects,misc,codes.epp)
  137. MSG_SCRIPTS = msg.sql facilities2.sql locales.sql sqlstates.sql history2.sql messages2.sql \
  138. symbols2.sql system_errors2.sql transmsgs.fr_FR2.sql transmsgs.de_DE2.sql
  139. MSG_FILES = $(addprefix $(SRC_ROOT)/msgs/, $(MSG_SCRIPTS))
  140. AllObjects += $(CODES_Objects)
  141. # Create messages file
  142. BUILD_Objects:= $(call makeObjects,msgs,build_file.epp)
  143. AllObjects += $(BUILD_Objects)