servlib/Makefile
changeset 0 2b3e5ec03512
child 3 c244287035f5
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 #
       
     2 #    Copyright 2004-2006 Intel Corporation
       
     3 # 
       
     4 #    Licensed under the Apache License, Version 2.0 (the "License");
       
     5 #    you may not use this file except in compliance with the License.
       
     6 #    You may obtain a copy of the License at
       
     7 # 
       
     8 #        http://www.apache.org/licenses/LICENSE-2.0
       
     9 # 
       
    10 #    Unless required by applicable law or agreed to in writing, software
       
    11 #    distributed under the License is distributed on an "AS IS" BASIS,
       
    12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    13 #    See the License for the specific language governing permissions and
       
    14 #    limitations under the License.
       
    15 #
       
    16 
       
    17 #
       
    18 # Makefile for DTN2/servlib
       
    19 #
       
    20 
       
    21 #
       
    22 # Source and object rules
       
    23 #
       
    24 
       
    25 BUNDLING_SRCS := 				\
       
    26         bundling/APIBlockProcessor.cc           \
       
    27 	bundling/BlockInfo.cc			\
       
    28 	bundling/BlockProcessor.cc		\
       
    29 	bundling/Bundle.cc			\
       
    30 	bundling/BundleActions.cc		\
       
    31 	bundling/BundleDaemon.cc		\
       
    32 	bundling/BundleEventHandler.cc		\
       
    33 	bundling/BundleInfoCache.cc		\
       
    34 	bundling/BundleList.cc			\
       
    35 	bundling/BundleMappings.cc		\
       
    36 	bundling/BundlePayload.cc		\
       
    37 	bundling/BundleProtocol.cc		\
       
    38 	bundling/BundleStatusReport.cc		\
       
    39 	bundling/BundleTimestamp.cc		\
       
    40 	bundling/CustodySignal.cc		\
       
    41 	bundling/CustodyTimer.cc		\
       
    42 	bundling/Dictionary.cc          	\
       
    43 	bundling/ForwardingInfo.cc		\
       
    44 	bundling/ForwardingLog.cc		\
       
    45 	bundling/FragmentManager.cc		\
       
    46 	bundling/FragmentState.cc		\
       
    47 	bundling/ExpirationTimer.cc		\
       
    48 	bundling/GbofId.cc  		        \
       
    49 	bundling/MetadataBlock.cc		\
       
    50 	bundling/MetadataBlockProcessor.cc	\
       
    51 	bundling/PayloadBlockProcessor.cc	\
       
    52 	bundling/PreviousHopBlockProcessor.cc	\
       
    53 	bundling/PrimaryBlockProcessor.cc	\
       
    54 	bundling/SDNV.cc			\
       
    55 	bundling/SessionBlockProcessor.cc	\
       
    56 	bundling/SequenceID.cc			\
       
    57 	bundling/SequenceIDBlockProcessor.cc	\
       
    58 	bundling/UnknownBlockProcessor.cc	\
       
    59 	bundling/S10Logger.cc	\
       
    60 
       
    61 CONTACT_SRCS :=					\
       
    62 	contacts/AlwaysOnLink.cc		\
       
    63 	contacts/Contact.cc			\
       
    64 	contacts/ContactManager.cc		\
       
    65 	contacts/Interface.cc			\
       
    66 	contacts/InterfaceTable.cc		\
       
    67 	contacts/Link.cc			\
       
    68 	contacts/OndemandLink.cc		\
       
    69 	contacts/OpportunisticLink.cc		\
       
    70 	contacts/ScheduledLink.cc		\
       
    71 
       
    72 CONV_LAYER_SRCS :=				\
       
    73 	conv_layers/AX25CMConvergenceLayer.cc \
       
    74 	conv_layers/BluetoothConvergenceLayer.cc  \
       
    75 	conv_layers/ConnectionConvergenceLayer.cc \
       
    76 	conv_layers/CLConnection.cc 		\
       
    77 	conv_layers/ConvergenceLayer.cc		\
       
    78 	conv_layers/EthConvergenceLayer.cc	\
       
    79 	conv_layers/FileConvergenceLayer.cc	\
       
    80 	conv_layers/IPConvergenceLayer.cc	\
       
    81 	conv_layers/IPConvergenceLayerUtils.cc	\
       
    82 	conv_layers/NullConvergenceLayer.cc	\
       
    83 	conv_layers/SeqpacketConvergenceLayer.cc \
       
    84 	conv_layers/SerialConvergenceLayer.cc   \
       
    85 	conv_layers/StreamConvergenceLayer.cc   \
       
    86 	conv_layers/TCPConvergenceLayer.cc	\
       
    87 	conv_layers/UDPConvergenceLayer.cc	\
       
    88 	conv_layers/LTPConvergenceLayer.cc	\
       
    89 	conv_layers/NORMConvergenceLayer.cc	\
       
    90 	conv_layers/NORMReceiver.cc		\
       
    91 	conv_layers/NORMSender.cc		\
       
    92 	conv_layers/NORMSessionManager.cc	\
       
    93 	conv_layers/ExternalConvergenceLayer.cc	\
       
    94 	conv_layers/ECLModule.cc \
       
    95 	conv_layers/CLEventHandler.cc \
       
    96 	conv_layers/clevent.cc \
       
    97 
       
    98 DISCOVERY_SRCS :=				\
       
    99 	discovery/Announce.cc			\
       
   100 	discovery/BluetoothAnnounce.cc		\
       
   101 	discovery/BluetoothDiscovery.cc		\
       
   102 	discovery/BonjourDiscovery.cc		\
       
   103 	discovery/Discovery.cc			\
       
   104 	discovery/DiscoveryTable.cc		\
       
   105 	discovery/IPAnnounce.cc			\
       
   106 	discovery/IPDiscovery.cc		\
       
   107 
       
   108 CMD_SRCS :=					\
       
   109 	cmd/APICommand.cc			\
       
   110 	cmd/BundleCommand.cc			\
       
   111 	cmd/CompletionNotifier.cc		\
       
   112 	cmd/InterfaceCommand.cc			\
       
   113 	cmd/LinkCommand.cc          		\
       
   114 	cmd/ParamCommand.cc			\
       
   115 	cmd/RegistrationCommand.cc		\
       
   116 	cmd/RouteCommand.cc			\
       
   117 	cmd/ShutdownCommand.cc			\
       
   118 	cmd/StorageCommand.cc			\
       
   119 	cmd/TestCommand.cc			\
       
   120 	cmd/DiscoveryCommand.cc			\
       
   121 	cmd/ProphetCommand.cc			\
       
   122 	cmd/ECLACommand.cc			\
       
   123 	cmd/SecurityCommand.cc			\
       
   124 
       
   125 NAMING_SRCS :=					\
       
   126 	naming/EndpointID.cc			\
       
   127 	naming/EndpointIDOpt.cc			\
       
   128 	naming/Scheme.cc			\
       
   129 	naming/SchemeTable.cc			\
       
   130 	naming/SessionScheme.cc			\
       
   131 	naming/DTNScheme.cc			\
       
   132 	naming/EthernetScheme.cc		\
       
   133         naming/IPNScheme.cc                     \
       
   134 	naming/SessionScheme.cc			\
       
   135 	naming/StringScheme.cc			\
       
   136 	naming/WildcardScheme.cc		\
       
   137 	naming/TCAScheme.cc			\
       
   138 
       
   139 PROPHET_SRCS :=					\
       
   140 	prophet/AckList.cc			\
       
   141 	prophet/BundleOffer.cc			\
       
   142 	prophet/BundleTLV.cc			\
       
   143 	prophet/Controller.cc			\
       
   144 	prophet/Decider.cc			\
       
   145 	prophet/Dictionary.cc			\
       
   146 	prophet/Encounter.cc			\
       
   147 	prophet/HelloTLV.cc			\
       
   148 	prophet/Node.cc				\
       
   149 	prophet/ProphetTLV.cc			\
       
   150 	prophet/Repository.cc			\
       
   151 	prophet/RIBDTLV.cc			\
       
   152 	prophet/RIBTLV.cc			\
       
   153 	prophet/Stats.cc			\
       
   154 	prophet/Table.cc			\
       
   155 	prophet/OfferTLV.cc			\
       
   156 	prophet/ResponseTLV.cc			\
       
   157 
       
   158 REGISTRATION_SRCS :=				\
       
   159 	reg/AdminRegistration.cc		\
       
   160 	reg/APIRegistration.cc			\
       
   161 	reg/Registration.cc			\
       
   162 	reg/RegistrationTable.cc		\
       
   163 	reg/LoggingRegistration.cc		\
       
   164 	reg/PingRegistration.cc			\
       
   165 	reg/TclRegistration.cc			\
       
   166 
       
   167 ROUTING_SRCS :=					\
       
   168 	routing/router.cc			\
       
   169 	routing/router-custom.cc		\
       
   170 	routing/DTLSR.cc			\
       
   171 	routing/DTLSRConfig.cc			\
       
   172 	routing/DTLSRRouter.cc			\
       
   173 	routing/ExternalRouter.cc		\
       
   174 	routing/BundleRouter.cc			\
       
   175 	routing/FloodBundleRouter.cc		\
       
   176 	routing/LinkScheduleEstimator.cc	\
       
   177 	routing/ProphetBundleCore.cc		\
       
   178 	routing/ProphetBundleList.cc		\
       
   179 	routing/ProphetLinkList.cc		\
       
   180 	routing/ProphetNode.cc			\
       
   181 	routing/ProphetNodeList.cc		\
       
   182 	routing/ProphetRouter.cc		\
       
   183 	routing/RouteEntry.cc			\
       
   184 	routing/RouteTable.cc			\
       
   185 	routing/RouterInfo.cc			\
       
   186 	routing/TableBasedRouter.cc		\
       
   187 	routing/TcaEndpointID.cc                \
       
   188 	routing/TcaControlBundle.cc             \
       
   189 	routing/TcaRouter.cc                    \
       
   190 
       
   191 SESSION_SRCS :=					\
       
   192 	session/Session.cc			\
       
   193 	session/SessionTable.cc			\
       
   194 	session/Subscriber.cc			\
       
   195 
       
   196 OLD_STORAGE_SRCS :=				\
       
   197 	storage/PersistentStore.cc		\
       
   198 	storage/StorageConfig.cc		\
       
   199 	storage/BerkeleyDBStore.cc		\
       
   200 	storage/SQLStore.cc			\
       
   201         storage/PostgresSQLImplementation.cc    \
       
   202         storage/MysqlSQLImplementation.cc       \
       
   203 
       
   204 STORAGE_SRCS :=					\
       
   205 	storage/BundleStore.cc			\
       
   206 	storage/ProphetStore.cc			\
       
   207 	storage/LinkStore.cc			\
       
   208 	storage/GlobalStore.cc			\
       
   209 	storage/RegistrationStore.cc		\
       
   210 
       
   211 SECURITY_SRCS :=				\
       
   212 	security/Ciphersuite.cc			\
       
   213 	security/BA_BlockProcessor.cc		\
       
   214 	security/PI_BlockProcessor.cc		\
       
   215 	security/PC_BlockProcessor.cc		\
       
   216 	security/Ciphersuite_BA1.cc		\
       
   217 	security/Ciphersuite_PI2.cc		\
       
   218 	security/Ciphersuite_PC3.cc		\
       
   219 	security/BP_Tag.cc			\
       
   220 	security/KeyDB.cc			\
       
   221 	security/SPD.cc				\
       
   222 	security/KeySteward.cc			\
       
   223 	gcm/gcm_aes.c				\
       
   224 	gcm/gcm.cc				\
       
   225 	gcm/gf128mul.cc				\
       
   226 
       
   227 SERVLIB_SRCS := 				\
       
   228 	DTNServer.cc				\
       
   229 	$(BUNDLING_SRCS) 			\
       
   230 	$(CONTACT_SRCS)				\
       
   231 	$(CONV_LAYER_SRCS)			\
       
   232 	$(DISCOVERY_SRCS)			\
       
   233 	$(CMD_SRCS) 				\
       
   234 	$(NAMING_SRCS) 				\
       
   235 	$(PROPHET_SRCS) 			\
       
   236 	$(REGISTRATION_SRCS)			\
       
   237 	$(ROUTING_SRCS)				\
       
   238 	$(SESSION_SRCS)				\
       
   239 	$(STORAGE_SRCS)				\
       
   240 	$(SECURITY_SRCS)			\
       
   241 
       
   242 SERVLIB_OBJS := $(SERVLIB_SRCS:.cc=.o)
       
   243 SERVLIB_OBJS := $(SERVLIB_OBJS:.c=.o)
       
   244 SERVLIB_OBJS := $(SERVLIB_OBJS) ../dtn-version.o
       
   245 
       
   246 ALLSRCS := $(SERVLIB_SRCS)
       
   247 
       
   248 #
       
   249 # Other makefiles include this one so they can link with the object
       
   250 # files directly and not use the servlib, but in that case, all we
       
   251 # want are the object lists, not the rules below
       
   252 #
       
   253 ifeq ($(SERVLIB_MAKEFILE_INCLUDE),)
       
   254 
       
   255 #
       
   256 # Default target is to build the library
       
   257 #
       
   258 LIBFILES := libdtnserv.a
       
   259 all: $(LIBFILES)
       
   260 
       
   261 servlib: libdtnserv.a
       
   262 libdtnserv.a: $(SERVLIB_OBJS)
       
   263 	rm -f $@
       
   264 	$(AR) ruc $@ $^
       
   265 	$(RANLIB) $@ || true
       
   266 
       
   267 #
       
   268 # Make sure SRCDIR is set (.. by default)
       
   269 #
       
   270 ifeq ($(SRCDIR),)
       
   271 SRCDIR   := ..
       
   272 BUILDDIR := ..
       
   273 endif
       
   274 
       
   275 #
       
   276 # Include the common rules.
       
   277 #
       
   278 include ../Rules.make
       
   279 
       
   280 #
       
   281 # Rules to regenerate XML bindings if the 'xsd' tool is present.
       
   282 #
       
   283 
       
   284 # Arguments used to generate both the ECLA and external router bindings.
       
   285 XSD_TOOL_COMMON_ARGS := \
       
   286 	--generate-serialization \
       
   287 	--generate-default-ctor \
       
   288 	--morph-anonymous \
       
   289 	--hxx-suffix .h \
       
   290 	--cxx-suffix .cc \
       
   291 
       
   292 # Arguments used to regenerate the ECLA bindings.
       
   293 XSD_TOOL_CLA_ARGS := \
       
   294 	--root-element cl_message \
       
   295 	--namespace-map =dtn::clmessage \
       
   296 	--output-dir conv_layers \
       
   297 	--cxx-prologue '\#ifdef HAVE_CONFIG_H' \
       
   298 	--cxx-prologue '\#  include <config.h>' \
       
   299 	--cxx-prologue '\#endif' \
       
   300 	--cxx-prologue '\#if defined(XERCES_C_ENABLED) && defined(EXTERNAL_CL_ENABLED)' \
       
   301 	--cxx-epilogue '\#endif' \
       
   302 
       
   303 # Arguments used to regenerate the external router bindings.
       
   304 XSD_TOOL_RTR_ARGS := \
       
   305 	--root-element bpa \
       
   306 	--namespace-map =dtn::rtrmessage \
       
   307 	--output-dir routing \
       
   308 	--custom-type linkType=/linkType_base \
       
   309 	--custom-type bundleType=/bundleType_base \
       
   310 	--custom-type contactType=/contactType_base \
       
   311 	--custom-type eidType=/eidType_base \
       
   312 	--custom-type gbofIdType=/gbofIdType_base \
       
   313 	--custom-type key_value_pair=/key_value_pair_base \
       
   314 	--custom-type routeEntryType=/routeEntryType_base \
       
   315 	--custom-type registrationType=/registrationType_base \
       
   316 	--hxx-epilogue '\#include "router-custom.h"' \
       
   317 	--cxx-prologue '\#ifdef HAVE_CONFIG_H' \
       
   318 	--cxx-prologue '\#  include <config.h>' \
       
   319 	--cxx-prologue '\#endif' \
       
   320 	--cxx-prologue '\#if defined(XERCES_C_ENABLED) && defined(EXTERNAL_DP_ENABLED)' \
       
   321 	--cxx-epilogue '\#endif' \
       
   322 
       
   323 # Regenerate XML bindings. 
       
   324 xsdbindings: conv_layers/clevent.xsd routing/router.xsd
       
   325 ifdef XSD_TOOL
       
   326 	$(XSD_TOOL) cxx-tree $(XSD_TOOL_COMMON_ARGS) $(XSD_TOOL_CLA_ARGS) conv_layers/clevent.xsd
       
   327 	$(XSD_TOOL) cxx-tree $(XSD_TOOL_COMMON_ARGS) $(XSD_TOOL_RTR_ARGS) routing/router.xsd
       
   328 else
       
   329 	@echo "ERROR:   configure was unable to find the xsd tool needed to"
       
   330 	@echo "         regenerate the XML bindings."
       
   331 	@echo "         Use the --with-xsd-tool=(name) option with configure"
       
   332 	@echo "         specify the location of this tool."
       
   333 endif
       
   334 
       
   335 endif