# Helper functions doObjects= $(patsubst %.m,%.o,$(patsubst %.cc,%.o,$(patsubst %.y,%.o,$(patsubst %.epp,%.o,$(patsubst %.c,%.o,$(1:.cpp=.o)))))) makeObjects= $(addprefix $(OBJ)/$(patsubst ../%,%,$(1))/,$(call doObjects,$2)) dirFiles= $(sort $(notdir $(wildcard ../src/$(1)/*.cpp)) $(notdir $(wildcard ../src/$(1)/*.c)) \ $(notdir $(wildcard ../src/$(1)/*.epp)) $(notdir $(wildcard ../src/$(1)/*.y)) \ $(notdir $(wildcard ../src/$(1)/*.cc)) $(notdir $(wildcard ../src/$(1)/*.m))) dirInPath= $(call makeObjects,$(1),$(call dirFiles,$(1))) dirMaster= $(call dirInPath,$(1)) dirOs= $(call dirInPath,$(1)/$(PLATFORM_PATH)) ifneq ($(strip $(PLATFORM_FALLBACK)),) dirBackList= $(filter-out $(call dirFiles,$(1)/$(PLATFORM_PATH)),$(call dirFiles,$(1)/$(PLATFORM_FALLBACK))) dirFallBack= $(call makeObjects,$(1)/$(PLATFORM_FALLBACK),$(call dirBackList,$(1))) else dirFallBack= endif dirObjects= $(call dirMaster,$(1)) $(call dirOs,$(1)) $(call dirFallBack,$(1)) makePluginName= $(PLUGINS)/$(LIB_PREFIX)$(1).$(SHRLIB_EXT) # Collect all object files here AllObjects= # Common files CO1:= $(call dirObjects,common) CO2:= $(call dirObjects,common/classes) CO3:= $(call dirObjects,common/config) CO4:= $(call dirObjects,common/sha2) #CO5:= $(call dirObjects,common/exceptions) #CO6:= $(call dirObjects,common/sync) Common_Objects:= $(CO1) $(CO2) $(CO3) $(CO4) # $(CO5) $(CO6) AllObjects += $(Common_Objects) # Common test files COT1:= $(call dirObjects,common/tests) COT2:= $(call dirObjects,common/classes/tests) Common_Test_Objects:= $(COT1) $(COT2) $(call makeObjects,yvalve,gds.cpp) AllObjects += $(Common_Test_Objects) # gpre GPRE_Common_Objects:= $(call dirObjects,gpre) $(call makeObjects,gpre/languages,@GPRE_LANGUAGE_MODULES@) GPRE_std:= $(call dirObjects,gpre/std) GPRE_Objects:= $(GPRE_Common_Objects) $(GPRE_std) GPRE_boot:= $(call dirObjects,gpre/boot) $(call makeObjects,yvalve,gds.cpp) GPRE_Boot_Objects:= $(GPRE_Common_Objects) $(GPRE_boot) AllObjects += $(GPRE_Common_Objects) $(GPRE_std) $(GPRE_boot) # Y-Valve YValve_Objects:= $(call dirObjects,yvalve) $(call dirObjects,yvalve/config) AllObjects += $(YValve_Objects) # Authentication database connections cache SecDbCache:= $(call makeObjects,auth,SecDbCache.cpp) # Remote Remote_Common:= $(call dirObjects,remote) $(call dirObjects,auth/SecureRemotePassword) Remote_Server:= $(call dirObjects,remote/server) $(call dirObjects,auth/SecureRemotePassword/server) \ $(call makeObjects,jrd/replication,Config.cpp Utils.cpp) $(SecDbCache) Remote_Client:= $(call dirObjects,remote/client) $(call dirObjects,auth/SecureRemotePassword/client) \ $(call makeObjects,auth/SecurityDatabase,LegacyClient.cpp) \ $(call dirObjects,plugins/crypt/arc4) Remote_Server_Objects:= $(Remote_Common) $(Remote_Server) Remote_Client_Objects:= $(Remote_Common) $(Remote_Client) AllObjects += $(Remote_Common) $(Remote_Server) $(Remote_Client) # Chacha plugin Chacha_Objects:= $(call dirObjects,plugins/crypt/chacha) AllObjects += $(Chacha_Objects) # Profiler plugin Profiler_Objects:= $(call dirObjects,plugins/profiler) AllObjects += $(Profiler_Objects) # Engine Engine_Objects:= $(call dirObjects,jrd) $(call dirObjects,dsql) $(call dirObjects,jrd/extds) \ $(call dirObjects,jrd/optimizer) $(call dirObjects,jrd/recsrc) $(call dirObjects,jrd/replication) \ $(call dirObjects,jrd/sys-packages) $(call dirObjects,jrd/trace) \ $(call makeObjects,lock,lock.cpp) Engine_Test_Objects:= $(call dirObjects,jrd/tests) AllObjects += $(Engine_Objects) $(Engine_Test_Objects) # services # gfix Svc_GFIX_Objects:= $(call dirObjects,alice) GFIX_Objects:= $(Svc_GFIX_Objects) $(call dirObjects,alice/main) AllObjects += $(GFIX_Objects) # gbak Svc_GBAK_Objects:= $(call dirObjects,burp) GBAK_Objects:= $(Svc_GBAK_Objects) $(call dirObjects,burp/main) AllObjects += $(GBAK_Objects) # gsec Svc_GSEC_Objects:= $(call dirObjects,utilities/gsec) GSEC_Objects:= $(Svc_GSEC_Objects) $(call dirObjects,utilities/gsec/main) AllObjects += $(GSEC_Objects) # gstat Svc_GSTAT_Objects:= $(call dirObjects,utilities/gstat) GSTAT_Own_Objects:= $(Svc_GSTAT_Objects) $(call dirObjects,utilities/gstat/main) GSTAT_Objects:= $(GSTAT_Own_Objects) $(call makeObjects,jrd,btn.cpp ods.cpp) AllObjects += $(GSTAT_Own_Objects) # nbackup Svc_NBACKUP_Objects:= $(call dirObjects,utilities/nbackup) NBACKUP_Own_Objects:= $(Svc_NBACKUP_Objects) $(call dirObjects,utilities/nbackup/main) NBACKUP_Objects:= $(NBACKUP_Own_Objects) $(call makeObjects,jrd,ods.cpp) AllObjects += $(NBACKUP_Own_Objects) SVC_Objects:= $(Svc_GFIX_Objects) $(Svc_GBAK_Objects) $(Svc_GSEC_Objects) $(Svc_GSTAT_Objects) \ $(Svc_NBACKUP_Objects) # International support INTL_Objects:= $(call dirObjects,intl) AllObjects += $(INTL_Objects) # Lockprint LOCKPRINT_Objects:= $(call makeObjects,lock,print.cpp) AllObjects += $(LOCKPRINT_Objects) # Guardian FBGUARD_Objects:= $(call dirObjects,utilities/guard) AllObjects += $(FBGUARD_Objects) # Services manager FBSVCMGR_Objects:= $(call dirObjects,utilities/fbsvcmgr) AllObjects += $(FBSVCMGR_Objects) # Trace manager FBTRACEMGR_Objects:= $(call dirObjects,utilities/fbtracemgr) $(call makeObjects,jrd/trace,TraceCmdLine.cpp) AllObjects += $(FBTRACEMGR_Objects) # Trace plugin FBTRACE_UTIL_Objects:= $(call dirObjects,utilities/ntrace) AllObjects += $(FBTRACE_UTIL_Objects) # Split/merge backup files GSPLIT_Objects:= $(call dirObjects,burp/split) AllObjects += $(GSPLIT_Objects) # Interactive sql ISQL_Objects:= $(call dirObjects,isql) ISQL_Test_Objects:= $(call dirObjects,isql/tests) AllObjects += $(ISQL_Objects) $(ISQL_Test_Objects) # Legacy users management in security database LEGACY_USERS_MANAGE_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyManagement.epp) AllObjects += $(LEGACY_USERS_MANAGE_Objects) # Legacy authentication on server LEGACY_AUTH_SERVER_Objects:= $(call makeObjects,auth/SecurityDatabase,LegacyServer.cpp) $(SecDbCache) AllObjects += $(LEGACY_AUTH_SERVER_Objects) # SRP-based users management in security database SRP_USERS_MANAGE_Objects:= $(call dirObjects,auth/SecureRemotePassword/manage) \ $(call dirObjects,auth/SecureRemotePassword) AllObjects += $(SRP_USERS_MANAGE_Objects) # Multihop authentication debugger AUTH_DEBUGGER_Objects:= $(call makeObjects,auth,AuthDbg.cpp) AllObjects += $(AUTH_DEBUGGER_Objects) # UDR engine UDRENG_Objects:= $(call dirObjects,plugins/udr_engine) AllObjects += $(UDRENG_Objects) # UDF support UTIL_Objects:= $(call makeObjects,extlib,ib_util.cpp) # UDR backward compatible with distributed UDFs COMPAT_Objects:= $(call makeObjects,extlib,UdfBackwardCompatibility.cpp) SRC_COMPAT_SQL:= $(SRC_ROOT)/extlib/UdfBackwardCompatibility.sql COMPAT_SQL?= $(call buildSubDirectory,plugins/udr)/udf_compat.sql AllObjects += $(UTIL_Objects) $(COMPAT_Objects) # Create messages file BUILD_Objects:= $(call makeObjects,msgs,build_file.cpp) AllObjects += $(BUILD_Objects)