# -*- Makefile -*-
#----------------------------------------------------------------------------
#       GNU Makefile
#
# @file GNUmakefile.AMI_Iterator_IDL
#
# gnu.mpd,v 1.151 2006/06/07 12:29:49 elliott_c Exp
#
# 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.AMI_Iterator_IDL
DEPENDENCY_FILE  = .depend.AMI_Iterator_IDL

TAO_ROOT  ?= $(ACE_ROOT)/TAO

FILES = \

#----------------------------------------------------------------------------
#       Include macros and targets
#----------------------------------------------------------------------------
TAO_IDL = ../../../../bin/tao_idl
TAO_IDL_DEP = ../../../../bin/tao_idl$(EXEEXT)
TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT)

PRJ_TYPE = library

INSLIB ?= ../../../../lib
ifeq ($(INSLIB),.)
  ifeq ($(PWD),)
    PWD=$(shell pwd)
  endif
  INSLIB = $(PWD)
endif
OUTPUT_DIRECTORY = $(INSLIB)

include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
## We don't need the ACELIB setting from wrapper_macros.GNU
ACELIB =
tao_dont_use_idl_make_rule = 1
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)/AMI_Iterator_IDL
all: $(TEMPINCDIR)
endif

ifneq ($(OUTPUT_DIRECTORY),)
all: $(OUTPUT_DIRECTORY)
$(OUTPUT_DIRECTORY):
	-@$(MKDIR) "$(OUTPUT_DIRECTORY)"
endif

LIBCHECK = 1
ifeq ($(corba_messaging),1)
ifeq ($(ami),1)
ifneq ($(LIBCHECK), 1)
  all: lib_warning
endif
else
  all: require_warning
endif
else
  all: require_warning
endif

ifeq ($(corba_messaging),1)
ifeq ($(ami),1)
else
  all: require_warning
endif
else
  all: require_warning
endif

include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
ifeq ($(VXWORKSLINK),true)
include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE)
endif

ifeq ($(VXWORKSLINK),true)
LDLIBPATH     = -L. -L../../../../lib
else
LDFLAGS      += -L. -L../../../../lib
endif
CPPFLAGS     += -I../../../.. -I$(TAO_ROOT)
ifeq ($(static_libs),1)
  CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS
endif

#----------------------------------------------------------------------------
#       Local targets
#----------------------------------------------------------------------------
lib_warning:
	@echo AMI_Iterator_IDL will not be built due to the following missing library:
	@echo $(LIBCHECK)

require_warning:
	@echo AMI_Iterator_IDL will not be built due to one of the following disabled features:
	@echo corba_messaging ami

## 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):../../../../lib
LD_LIBRARY_PATH   := $(LD_LIBRARY_PATH):../../../../lib
SHLIB_PATH        := $(SHLIB_PATH):../../../../lib
LIBPATH           := $(LIBPATH):../../../../lib
PATH              := $(PATH):../../../../lib

GENERATED_DIRTY += Web_ServerS.inl Web_ServerC.inl Web_ServerC.h Web_ServerS.h Web_ServerC.cpp Web_ServerS.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) Web_Server.idl -nt Web_ServerS.inl 2> /dev/null && $(TEST_EXE) Web_Server.idl -nt Web_ServerC.inl 2> /dev/null && $(TEST_EXE) Web_Server.idl -nt Web_ServerC.h 2> /dev/null && $(TEST_EXE) Web_Server.idl -nt Web_ServerS.h 2> /dev/null && $(TEST_EXE) Web_Server.idl -nt Web_ServerC.cpp 2> /dev/null && $(TEST_EXE) Web_Server.idl -nt Web_ServerS.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 Web_ServerS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt Web_ServerC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt Web_ServerC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt Web_ServerS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt Web_ServerC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt Web_ServerS.cpp 2> /dev/null && echo 0),)
        .NOTPARALLEL:
      endif
    endif
  else
    .NOTPARALLEL:
  endif
else
.NOTPARALLEL:
endif
Web_ServerS.inl Web_ServerC.inl Web_ServerC.h Web_ServerS.h Web_ServerC.cpp Web_ServerS.cpp: Web_Server.idl $(TAO_IDL_DEP)
	$(TAO_IDL) $(TAO_IDLFLAGS) -GC Web_Server.idl

ifneq ($(GENERATED_DIRTY),)
.PRECIOUS: $(GENERATED_DIRTY)
ifeq ($(corba_messaging),1)
ifeq ($(ami),1)
all: $(GENERATED_DIRTY)
endif
endif
endif

ADDITIONAL_IDL_TARGETS += Web_Server$(IDL_CLIENT_HDR_EXT)
idl_stubs: $(ADDITIONAL_IDL_TARGETS)

realclean: clean
ifneq ($(GENERATED_DIRTY),)
	-$(RM) -r $(GENERATED_DIRTY)
endif

