# -*- Makefile -*- #---------------------------------------------------------------------------- # GNU Makefile # # @file GNUmakefile.DDS_TransientDurability_Publisher # # $Id: gnu.mpd 82799 2008-09-22 11:26:41Z smcqueen $ # # This file was automatically generated by MPC. Any changes made directly to # this file will be lost the next time it is generated. # #---------------------------------------------------------------------------- MAKEFILE = GNUmakefile.DDS_TransientDurability_Publisher DEPENDENCY_FILE = .depend.DDS_TransientDurability_Publisher BIN_UNCHECKED = publisher TAO_ROOT ?= $(ACE_ROOT)/TAO FILES = \ MessengerTypeSupportImpl.cpp \ MessengerC.cpp \ MessengerS.cpp \ MessengerTypeSupportC.cpp \ MessengerTypeSupportS.cpp \ publisher.cpp \ Writer.cpp \ DataWriterListenerImpl.cpp #---------------------------------------------------------------------------- # Include macros and targets #---------------------------------------------------------------------------- LDLIBS = -lSimpleTcp -lOpenDDS_Dcps -lTAO_PortableServer -lTAO_AnyTypeCode -lTAO -lACE TAO_IDL = $(ACE_ROOT)/bin/tao_idl TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) TAO_IDLFLAGS = -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) PRJ_TYPE = rtp ifeq ($(INSBIN),.) ifeq ($(CURDIR),) ifeq ($(PWD),) PWD=$(shell pwd) endif else PWD=$(CURDIR) endif INSBIN = $(PWD) endif OUTPUT_DIRECTORY = $(INSBIN) include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU include $(DDS_ROOT)/rules.dds.GNU include $(TAO_ROOT)/rules.tao.GNU # To build multiple targets in the same directory on AIX, it works # best to have a template directory per project. # The compiler/linker isn't too smart about instantiating templates... ifdef TEMPINCDIR TEMPINCDIR := $(TEMPINCDIR)/DDS_TransientDurability_Publisher all: $(TEMPINCDIR) endif ifneq ($(OUTPUT_DIRECTORY),) all: $(OUTPUT_DIRECTORY) $(OUTPUT_DIRECTORY): -@$(MKDIR) "$(OUTPUT_DIRECTORY)" endif # turn off libcheck if doing a dry run ifeq ($(findstring n, $(MAKEFLAGS)),n) LIBCHECK = 1 else # turn off libcheck if keep going was passed too ifeq ($(findstring k, $(MAKEFLAGS)),k) LIBCHECK = 1 else LIBCHECK ?= $(filter-out $(foreach lib,SimpleTcp OpenDDS_Dcps TAO_PortableServer TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib ../../../lib /usr/lib /usr/lib64 $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),SimpleTcp OpenDDS_Dcps TAO_PortableServer TAO_AnyTypeCode TAO ACE) ifeq ($(LIBCHECK),) LIBCHECK = 1 endif endif endif ifeq ($(exceptions),1) ifeq ($(exceptions),1) ifeq ($(LIBCHECK), 1) BIN = $(BIN_UNCHECKED)$(EXEEXT) else all: lib_warning endif else all: require_warning endif else all: require_warning endif # If it contains ../ at all use notdir. OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) SRC = $(FILES) include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU ifneq ($(OUTPUT_DIRECTORY),) ifneq ($(OUTPUT_DIRECTORY),.) INSTALL = $(VBIN:%=$(INSBIN)/%) CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) endif endif include $(ACE_ROOT)/include/makeinclude/rules.local.GNU ifeq ($(VXWORKSLINK),1) include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) endif ifeq ($(VXWORKSLINK),1) LDLIBPATH = -L. -L$(ACE_ROOT)/lib -L../../../lib else LDFLAGS += -L. -L$(ACE_ROOT)/lib -L../../../lib endif CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I../../.. ifeq ($(static_libs),1) CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS ifeq ($(link_groups), 1) LDLIBS := -Wl,--start-group $(LDLIBS) -Wl,--end-group endif endif #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- lib_warning: @echo DDS_TransientDurability_Publisher will not be built due to the following missing library: @echo $(LIBCHECK) require_warning: @echo DDS_TransientDurability_Publisher will not be built due to one of the following disabled make macros: @echo exceptions exceptions ## Some OS's have /bin/test others only have /usr/bin/test ifeq ($(wildcard /bin/test), /bin/test) TEST_EXE = /bin/test else ifeq ($(wildcard /usr/bin/test), /usr/bin/test) TEST_EXE = /usr/bin/test endif endif DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib PATH := $(PATH):$(ACE_ROOT)/lib GENERATED_DIRTY += MessengerC.inl MessengerS.inl MessengerC.h MessengerS.h MessengerC.cpp MessengerS.cpp OBJS_DEPEND_ON_GENERATED = 1 ## More than one file is generated by the command and therefore ## it can not be run in parallel. Unfortunately, there is no way to ## say that only this rule can't be run in parallel. However, we can ## determine if the generated files have already been generated. If that's ## the case, then we don't need this special rule. ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) ## If we can find /bin/test, then we will continue ifneq ($(TEST_EXE),) ## If all of the generated files are there, then we need to check ## and make sure that the generated files are up-to-date. If they are not ## then we need the special rule. ifneq ($(shell $(TEST_EXE) Messenger.idl -nt MessengerC.inl 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerS.inl 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerC.h 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerS.h 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerC.cpp 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerS.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: else ## By this point, all of the generated files are here and up-to-date ## with respect to the source file. Now we need to make sure that ## they are up-to-date with respect to the generation tool. If the tool ## is newer than the generated files, then we need the special rule. ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerS.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: endif endif else .NOTPARALLEL: endif else .NOTPARALLEL: endif MessengerC.inl MessengerS.inl MessengerC.h MessengerS.h MessengerC.cpp MessengerS.cpp: Messenger.idl $(TAO_IDL_DEP) $(TAO_IDL) $(TAO_IDLFLAGS) -Sa -St -Sa -St -Gdcps -I../../.. Messenger.idl GENERATED_DIRTY += MessengerTypeSupportC.inl MessengerTypeSupportS.inl MessengerTypeSupportC.h MessengerTypeSupportS.h MessengerTypeSupportC.cpp MessengerTypeSupportS.cpp OBJS_DEPEND_ON_GENERATED = 1 ## More than one file is generated by the command and therefore ## it can not be run in parallel. Unfortunately, there is no way to ## say that only this rule can't be run in parallel. However, we can ## determine if the generated files have already been generated. If that's ## the case, then we don't need this special rule. ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) ## If we can find /bin/test, then we will continue ifneq ($(TEST_EXE),) ## If all of the generated files are there, then we need to check ## and make sure that the generated files are up-to-date. If they are not ## then we need the special rule. ifneq ($(shell $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportC.inl 2> /dev/null && $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportS.inl 2> /dev/null && $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportC.h 2> /dev/null && $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportS.h 2> /dev/null && $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportC.cpp 2> /dev/null && $(TEST_EXE) MessengerTypeSupport.idl -nt MessengerTypeSupportS.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: else ## By this point, all of the generated files are here and up-to-date ## with respect to the source file. Now we need to make sure that ## they are up-to-date with respect to the generation tool. If the tool ## is newer than the generated files, then we need the special rule. ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt MessengerTypeSupportS.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: endif endif else .NOTPARALLEL: endif else .NOTPARALLEL: endif MessengerTypeSupportC.inl MessengerTypeSupportS.inl MessengerTypeSupportC.h MessengerTypeSupportS.h MessengerTypeSupportC.cpp MessengerTypeSupportS.cpp: MessengerTypeSupport.idl $(TAO_IDL_DEP) $(TAO_IDL) $(TAO_IDLFLAGS) -Sa -St -Sa -St -Gdcps -I../../.. MessengerTypeSupport.idl GENERATED_DIRTY += MessengerTypeSupport.idl MessengerTypeSupportImpl.h MessengerTypeSupportImpl.cpp OBJS_DEPEND_ON_GENERATED = 1 ## More than one file is generated by the command and therefore ## it can not be run in parallel. Unfortunately, there is no way to ## say that only this rule can't be run in parallel. However, we can ## determine if the generated files have already been generated. If that's ## the case, then we don't need this special rule. ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) ## If we can find /bin/test, then we will continue ifneq ($(TEST_EXE),) ## If all of the generated files are there, then we need to check ## and make sure that the generated files are up-to-date. If they are not ## then we need the special rule. ifneq ($(shell $(TEST_EXE) Messenger.idl -nt MessengerTypeSupport.idl 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerTypeSupportImpl.h 2> /dev/null && $(TEST_EXE) Messenger.idl -nt MessengerTypeSupportImpl.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: else ## By this point, all of the generated files are here and up-to-date ## with respect to the source file. Now we need to make sure that ## they are up-to-date with respect to the generation tool. If the tool ## is newer than the generated files, then we need the special rule. ifneq ($(shell $(TEST_EXE) ../../../bin/dcps_ts.pl -nt MessengerTypeSupport.idl 2> /dev/null && $(TEST_EXE) ../../../bin/dcps_ts.pl -nt MessengerTypeSupportImpl.h 2> /dev/null && $(TEST_EXE) ../../../bin/dcps_ts.pl -nt MessengerTypeSupportImpl.cpp 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/CPPTemplate.pm -nt MessengerTypeSupport.idl 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/CPPTemplate.pm -nt MessengerTypeSupportImpl.h 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/CPPTemplate.pm -nt MessengerTypeSupportImpl.cpp 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/HTemplate.pm -nt MessengerTypeSupport.idl 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/HTemplate.pm -nt MessengerTypeSupportImpl.h 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/HTemplate.pm -nt MessengerTypeSupportImpl.cpp 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/IDLTemplate.pm -nt MessengerTypeSupport.idl 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/IDLTemplate.pm -nt MessengerTypeSupportImpl.h 2> /dev/null && $(TEST_EXE) ../../../bin/DCPS/IDLTemplate.pm -nt MessengerTypeSupportImpl.cpp 2> /dev/null && echo 0),) .NOTPARALLEL: endif endif else .NOTPARALLEL: endif else .NOTPARALLEL: endif MessengerTypeSupport.idl MessengerTypeSupportImpl.h MessengerTypeSupportImpl.cpp: Messenger.idl ../../../bin/dcps_ts.pl ../../../bin/DCPS/CPPTemplate.pm ../../../bin/DCPS/HTemplate.pm ../../../bin/DCPS/IDLTemplate.pm perl ../../../bin/dcps_ts.pl $(OPENDDS_DCPS_TS_FLAGS) Messenger.idl ifneq ($(GENERATED_DIRTY),) .PRECIOUS: $(GENERATED_DIRTY) ## If the generated files are anything but source files, we need to ## ensure that those files are generated before we attempt to build anything ## else. ifeq ($(OBJS_DEPEND_ON_GENERATED),1) $(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) $(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) endif endif ADDITIONAL_IDL_TARGETS += Messenger$(IDL_CLIENT_HDR_EXT) MessengerTypeSupport$(IDL_CLIENT_HDR_EXT) idl_stubs: $(ADDITIONAL_IDL_TARGETS) # This assignment forces make to run the idl_stubs # target before building any of the source files. FORCED_IDL_STUBS = MessengerTypeSupportImpl.cpp MessengerC.cpp MessengerS.cpp MessengerTypeSupportC.cpp MessengerTypeSupportS.cpp publisher.cpp Writer.cpp DataWriterListenerImpl.cpp FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:MessengerC.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:MessengerS.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:MessengerTypeSupportC.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:MessengerTypeSupportS.cpp=) FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:MessengerTypeSupportImpl.cpp=) ifneq ($(FORCED_IDL_STUBS),) $(FORCED_IDL_STUBS): idl_stubs endif ifneq ($(VXWORKSLINK),1) ifeq ($(static_libs_only), 1) ifeq ($(use_dep_libs), 1) DEPLIBS = $(foreach lib, SimpleTcp OpenDDS_Dcps TAO_PortableServer TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib ../../../lib, $(wildcard $(libpath)/lib$(lib).a))) endif endif $(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK) endif realclean: clean ifneq ($(GENERATED_DIRTY),) -$(RM) -r $(GENERATED_DIRTY) endif __prebuild__: @-: