make.shared.variables 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. # Helper functions
  2. doObjects= $(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. dirInPath= $(call makeObjects,$(1),$(call dirFiles,$(1)))
  7. dirMaster= $(call dirInPath,$(1))
  8. dirOs= $(call dirInPath,$(1)/$(PLATFORM_PATH))
  9. ifneq ($(strip $(PLATFORM_FALLBACK)),)
  10. dirBackList= $(filter-out $(call dirFiles,$(1)/$(PLATFORM_PATH)),$(call dirFiles,$(1)/$(PLATFORM_FALLBACK)))
  11. dirFallBack= $(call makeObjects,$(1)/$(PLATFORM_FALLBACK),$(call dirBackList,$(1)))
  12. else
  13. dirFallBack=
  14. endif
  15. dirObjects= $(call dirMaster,$(1)) $(call dirOs,$(1)) $(call dirFallBack,$(1))
  16. makePluginName= $(PLUGINS)/$(LIB_PREFIX)$(1).$(SHRLIB_EXT)
  17. # Collect all object files here
  18. AllObjects=
  19. # Common files
  20. CO1:= $(call dirObjects,common)
  21. CO2:= $(call dirObjects,common/classes)
  22. CO3:= $(call dirObjects,common/config)
  23. CO4:= $(call dirObjects,common/tomcrypt)
  24. #CO5:= $(call dirObjects,common/exceptions)
  25. #CO6:= $(call dirObjects,common/sync)
  26. Common_Objects:= $(CO1) $(CO2) $(CO3) $(CO4)
  27. # $(CO5) $(CO6)
  28. AllObjects += $(Common_Objects)
  29. # gpre
  30. GPRE_Common_Objects:= $(call dirObjects,gpre) $(call makeObjects,gpre/languages,@GPRE_LANGUAGE_MODULES@)
  31. GPRE_std:= $(call dirObjects,gpre/std)
  32. GPRE_Objects:= $(GPRE_Common_Objects) $(GPRE_std)
  33. GPRE_boot:= $(call dirObjects,gpre/boot) $(call makeObjects,yvalve,gds.cpp)
  34. GPRE_Boot_Objects:= $(GPRE_Common_Objects) $(GPRE_boot)
  35. AllObjects += $(GPRE_Common_Objects) $(GPRE_std) $(GPRE_boot)
  36. # Y-Valve
  37. YValve_Objects:= $(call dirObjects,yvalve) $(call dirObjects,yvalve/config)
  38. AllObjects += $(YValve_Objects)
  39. # Remote
  40. Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword)
  41. Remote_Server:= $(call dirObjects,remote/server) $(call dirObjects,auth/SecureRemotePassword/server)
  42. Remote_Client:= $(call dirObjects,remote/client) $(call dirObjects,auth/SecureRemotePassword/client) \
  43. $(call makeObjects,auth/SecurityDatabase,LegacyClient.cpp) \
  44. $(call dirObjects,plugins/crypt/arc4)
  45. Remote_Server_Objects:= $(Remote_Common) $(Remote_Server)
  46. Remote_Client_Objects:= $(Remote_Common) $(Remote_Client)
  47. AllObjects += $(Remote_Common) $(Remote_Server) $(Remote_Client)
  48. # Engine
  49. Engine_Objects:= $(call dirObjects,jrd) $(call dirObjects,dsql) $(call dirObjects,jrd/extds) \
  50. $(call dirObjects,jrd/recsrc) $(call dirObjects,jrd/trace) \
  51. $(call makeObjects,lock,lock.cpp)
  52. AllObjects += $(Engine_Objects)
  53. # services
  54. # gfix
  55. Svc_GFIX_Objects:= $(call dirObjects,alice)
  56. GFIX_Objects:= $(Svc_GFIX_Objects) $(call dirObjects,alice/main)
  57. AllObjects += $(GFIX_Objects)
  58. # gbak
  59. Svc_GBAK_Objects:= $(call dirObjects,burp)
  60. GBAK_Objects:= $(Svc_GBAK_Objects) $(call dirObjects,burp/main)
  61. AllObjects += $(GBAK_Objects)
  62. # gsec
  63. Svc_GSEC_Objects:= $(call dirObjects,utilities/gsec)
  64. GSEC_Objects:= $(Svc_GSEC_Objects) $(call dirObjects,utilities/gsec/main)
  65. AllObjects += $(GSEC_Objects)
  66. # gstat
  67. Svc_GSTAT_Objects:= $(call dirObjects,utilities/gstat)
  68. GSTAT_Own_Objects:= $(Svc_GSTAT_Objects) $(call dirObjects,utilities/gstat/main)
  69. GSTAT_Objects:= $(GSTAT_Own_Objects) $(call makeObjects,jrd,btn.cpp ods.cpp)
  70. AllObjects += $(GSTAT_Own_Objects)
  71. # nbackup
  72. Svc_NBACKUP_Objects:= $(call dirObjects,utilities/nbackup)
  73. NBACKUP_Own_Objects:= $(Svc_NBACKUP_Objects) $(call dirObjects,utilities/nbackup/main)
  74. NBACKUP_Objects:= $(NBACKUP_Own_Objects) $(call makeObjects,jrd,ods.cpp)
  75. AllObjects += $(NBACKUP_Own_Objects)
  76. SVC_Objects:= $(Svc_GFIX_Objects) $(Svc_GBAK_Objects) $(Svc_GSEC_Objects) $(Svc_GSTAT_Objects) \
  77. $(Svc_NBACKUP_Objects)
  78. # International support
  79. INTL_Objects:= $(call dirObjects,intl)
  80. AllObjects += $(INTL_Objects)
  81. # Lockprint
  82. LOCKPRINT_Objects:= $(call makeObjects,lock,print.cpp)
  83. AllObjects += $(LOCKPRINT_Objects)
  84. # Guardian
  85. FBGUARD_Objects:= $(call dirObjects,utilities/guard)
  86. AllObjects += $(FBGUARD_Objects)
  87. # Services manager
  88. FBSVCMGR_Objects:= $(call dirObjects,utilities/fbsvcmgr)
  89. AllObjects += $(FBSVCMGR_Objects)
  90. # Trace manager
  91. FBTRACEMGR_Objects:= $(call dirObjects,utilities/fbtracemgr) $(call makeObjects,jrd/trace,TraceCmdLine.cpp)
  92. AllObjects += $(FBTRACEMGR_Objects)
  93. # Trace plugin
  94. FBTRACE_UTIL_Objects:= $(call dirObjects,utilities/ntrace)
  95. AllObjects += $(FBTRACE_UTIL_Objects)
  96. # Split/merge backup files
  97. GSPLIT_Objects:= $(call dirObjects,burp/split)
  98. AllObjects += $(GSPLIT_Objects)
  99. # Interactive sql
  100. ISQL_Objects:= $(call dirObjects,isql)
  101. AllObjects += $(ISQL_Objects)
  102. # QLI
  103. QLI_Objects:= $(call dirObjects,qli)
  104. AllObjects += $(QLI_Objects)
  105. # Legacy users management in security database
  106. LEGACY_USERS_MANAGE_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyManagement.epp)
  107. AllObjects += $(LEGACY_USERS_MANAGE_Objects)
  108. # Legacy authentication on server
  109. LEGACY_AUTH_SERVER_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyServer.cpp)
  110. AllObjects += $(LEGACY_AUTH_SERVER_Objects)
  111. # SRP-based users management in security database
  112. SRP_USERS_MANAGE_Objects:= $(call dirObjects,auth/SecureRemotePassword/manage) \
  113. $(call dirObjects,auth/SecureRemotePassword)
  114. AllObjects += $(SRP_USERS_MANAGE_Objects)
  115. # Multihop authentication debugger
  116. AUTH_DEBUGGER_Objects:= $(call makeObjects,auth,AuthDbg.cpp)
  117. AllObjects += $(AUTH_DEBUGGER_Objects)
  118. # UDR engine
  119. UDRENG_Objects:= $(call dirObjects,plugins/udr_engine)
  120. AllObjects += $(UDRENG_Objects)
  121. # UDF support
  122. UTIL_Objects:= $(call makeObjects,extlib,ib_util.cpp)
  123. # UDR backward compatible with distributed UDFs
  124. COMPAT_Objects:= $(call makeObjects,extlib,UdfBackwardCompatibility.cpp)
  125. SRC_COMPAT_SQL:= $(SRC_ROOT)/extlib/UdfBackwardCompatibility.sql
  126. COMPAT_SQL:= $(PLUGINS)/udr/udf_compat.sql
  127. AllObjects += $(UTIL_Objects) $(COMPAT_Objects)
  128. # Regenerate error codes
  129. CODES_Objects:= $(call makeObjects,misc,codes.epp)
  130. MSG_SCRIPTS = msg.sql facilities2.sql locales.sql sqlstates.sql history2.sql messages2.sql \
  131. symbols2.sql system_errors2.sql transmsgs.fr_FR2.sql transmsgs.de_DE2.sql
  132. MSG_FILES = $(addprefix $(SRC_ROOT)/msgs/, $(MSG_SCRIPTS))
  133. AllObjects += $(CODES_Objects)
  134. # Create messages file
  135. BUILD_Objects:= $(call makeObjects,msgs,build_file.epp)
  136. AllObjects += $(BUILD_Objects)