#----------------------------------------------------------------------------
#       GNU Makefile
#----------------------------------------------------------------------------
MAKEFILE        = Makefile.melshm
DEPENDENCY_FILE = .depend.Makefile.melshm
LIB_UNCHECKED   = libmelshm.a
SHLIB_UNCHECKED = libmelshm.$(SOEXT)

static_libs_only = 0


FILES = \
  MELDeviceManager \
  MELMemory \
  MELXmlParser \
  PLCDevice \
  PLCDeviceManager \
  PLCMemory

LIB   = $(LIB_UNCHECKED)
SHLIB = $(SHLIB_UNCHECKED)

#----------------------------------------------------------------------------
#       Include macros and targets
#----------------------------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
LSRC   = $(addsuffix .cpp, $(FILES))
ACELIB = -lACE

include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU

INSTALL_CHECK = ../lib
ifeq ($(INSTALL_CHECK),)
  INSTALL = $(INSTALL_CHECK)
else
  INSLIB  = $(INSTALL_CHECK)
endif
include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU

CPPFLAGS     += -I. -I../../bee
ifeq ($(shared_libs),1)
  ifneq ($(SHLIB),)
    CPPFLAGS += -DPLC_SHARED_MEMORY
  endif
endif
ifeq ($(static_libs),1)
  ifneq ($(LIB),)
    CPPFLAGS += -DACE_AS_STATIC_LIBS
  endif
endif


LDFLAGS      += -L/usr/local/lib

ACE_SHLIBS = -lxerces-c $(ACELIB)

#----------------------------------------------------------------------------
#       Local targets
#----------------------------------------------------------------------------

realclean: clean 

