# -*- Makefile -*-
#----------------------------------------------------------------------------
#       GNU Makefile
#
# @file GNUmakefile.SV_Shared_Memory_Test
#
# gnu.mpd,v 1.95 2004/07/01 19:00:58 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.SV_Shared_Memory_Test
DEPENDENCY_FILE  = .depend.SV_Shared_Memory_Test
BIN_UNCHECKED    = SV_Shared_Memory_Test

FILES = \
  ../tests/Main \
  SV_Shared_Memory_Test

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

include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
## We don't need the ACELIB setting from wrapper_macros.GNU
ACELIB =

# 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)/SV_Shared_Memory_Test

all: $(TEMPINCDIR)

endif

INSBIN ?= .
OUTPUT_DIRECTORY = $(INSBIN)
all: $(OUTPUT_DIRECTORY)

$(OUTPUT_DIRECTORY):
	-@mkdir -p "$(OUTPUT_DIRECTORY)"

# 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,Test_Output ACE,$(findstring $(lib),$(foreach libpath,../lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),Test_Output ACE)
    ifeq ($(LIBCHECK),)
      LIBCHECK = 1
    endif
  endif
endif
ifeq ($(LIBCHECK), 1)
BIN    = $(BIN_UNCHECKED)
else
  all: lib_warning
endif

OBJS   = $(addsuffix .o, $(notdir $(FILES)))
SRC    = $(addsuffix .cpp, $(FILES))
ifneq (,$(RC))
  FILES += $(RESOURCES)
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

LDFLAGS      += -L../lib
CPPFLAGS     += -I..
ifeq ($(static_libs),1)
  CPPFLAGS += -DACE_AS_STATIC_LIBS
endif

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


ifndef kylix
$(BIN): $(addprefix $(VDIR), $(OBJS))
	$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
else
$(BIN): $(addprefix $(VDIR), $(OBJS))
	$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,,
endif

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

