# -*- Makefile -*-
#----------------------------------------------------------------------------
#       GNU Makefile
#
# @file GNUmakefile.C++NPv1_Iterative_Logging_Server
#
# $Id: gnu.mpd 90587 2010-06-14 14:17:55Z mitza $
#
# 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.C++NPv1_Iterative_Logging_Server
DEPENDENCY_FILE  = .depend.C++NPv1_Iterative_Logging_Server
BIN_UNCHECKED    = iterative_logging_server

FILES = \
  Iterative_Logging_Server.cpp \
  Logging_Server.cpp \
  Logging_Handler.cpp

#----------------------------------------------------------------------------
#       Include macros and targets
#----------------------------------------------------------------------------
LDLIBS = -lACE

PRJ_TYPE = rtp

ifeq ($(INSBIN),.)
  ifeq ($(CURDIR),)
    ifeq ($(PWD),)
      PWD=$(shell pwd)
    endif
  else
    PWD=$(CURDIR)
  endif
  INSBIN = $(PWD)
endif
OUTPUT_DIRECTORY = $(if $(ARCH),$(if $(INSBIN),$(INSBIN)/$(ARCH)),$(INSBIN))

include $(ACE_ROOT)/include/makeinclude/wrapper_macros.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)/C++NPv1_Iterative_Logging_Server
all: $(TEMPINCDIR)
endif

ifneq ($(OUTPUT_DIRECTORY),)
.PHONY: create_output_directory.local
all: create_output_directory.local
create_output_directory.local:
	-@$(MKDIR) "$(OUTPUT_DIRECTORY)" $(ACE_NUL_STDERR)
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,ACE,$(findstring $(lib),$(foreach libpath,. $(if $(ARCH),./$(ARCH)) ../../lib $(if $(ARCH),../../lib/$(ARCH)) /usr/lib /usr/lib64 $(INSLIB),$(wildcard $(libpath)/$(LIB_PREFIX)$(lib).* $(libpath)/$(lib).lib)))),ACE)
    ifeq ($(LIBCHECK),)
      LIBCHECK = 1
    endif
  endif
endif
ifneq ($(uses_wchar),1)
ifeq ($(LIBCHECK), 1)
BIN    = $(BIN_UNCHECKED)$(EXEEXT)
ifdef ARCH
  ARCH_BIN = $(ARCH)/$(BIN)
endif #ARCH
else
  all: lib_warning
endif
else
  all: avoid_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)/$(if $(ARCH),$(ARCH)/)%$(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../../lib
else
LDFLAGS      += -L. $(if $(ARCH),-L./$(ARCH)) -L../../lib $(if $(ARCH),-L../../lib/$(ARCH))
endif
CPPFLAGS     += -I../..
ifeq ($(static_libs),1)
  CPPFLAGS += -DACE_AS_STATIC_LIBS
  ifeq ($(link_groups), 1)
    LDLIBS := -Wl,--start-group $(LDLIBS) -Wl,--end-group
  endif
endif

#----------------------------------------------------------------------------
#       Local targets
#----------------------------------------------------------------------------
lib_warning:
	@echo C++NPv1_Iterative_Logging_Server will not be built due to the following missing library: $(LIBCHECK) >&2

ifeq ($(uses_wchar),1)
avoids_enabled_macros += uses_wchar
endif
avoid_warning:
	@echo C++NPv1_Iterative_Logging_Server will not be built due to the following enabled make macros: $(avoids_enabled_macros)>&2

## 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

SPACE = $(should_be_unset) $(should_be_unset)
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


ifneq ($(VXWORKSLINK),1)
ifeq ($(static_libs_only), 1)
  ifeq ($(use_dep_libs), 1)
    DEPLIBS = $(foreach lib, ACE , $(foreach libpath, . ../../lib, $(wildcard $(libpath)/lib$(lib).a)))
  endif
endif

$(VBIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS)
  ifneq (,$(LINK.cc.override))
	$(LINK.cc.override)
  else
	$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK)
  endif
endif

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

__prebuild__:
ifneq ($(uses_wchar),1)
	@-:
endif


.PHONY: install
install: all
INSTALL_LIB ?= lib
ifneq ($(INSTALL_PREFIX),)
ifneq ($(install_rpath),0)
LDFLAGS += -Wl,-R,$(INSTALL_PREFIX)/$(INSTALL_LIB)
endif
endif


