#----------------------------------------------------------------------------
#       GNU Makefile
#----------------------------------------------------------------------------
MAKEFILE        = Makefile.tclgem
DEPENDENCY_FILE = .depend.Makefile.tclgem
BIN_UNCHECKED   = tclgem

static_libs_only = 0


FILES = \
  TclAppInit \
  alarmCmd \
  dbCmd \
  debugCmd \
  eventCmd \
  gemCmd \
  ppCmd \
  reportCmd \
  spoolCmd \
  tclbee \
  tclgem \
  terminalCmd \
  variableCmd

#----------------------------------------------------------------------------
#       Include macros and targets
#----------------------------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU

BIN    = $(BIN_UNCHECKED)

OBJS   = $(addsuffix .o, $(notdir $(FILES)))
SRC    = $(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 = ../bin
ifeq ($(INSTALL_CHECK),)
  INSTALL = $(INSTALL_CHECK)
else
  INSBIN  = $(INSTALL_CHECK)
  INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT))
endif
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU

CPPFLAGS     += -I. -I../src -I../../bee -I../../ecm/src -I../../secs/src -I../../vmelsec/src -I/Developers/src/dtl-3.4.1/lib -I/usr/local/ActiveTcl/include -I$(ACE_ROOT)
ifeq ($(static_libs),1)
  ifneq ($(LIB),)
    CPPFLAGS += -D-L../lib -DACE_AS_STATIC_LIBS
  endif
endif


LDFLAGS      += -L/usr/local/lib -L../lib -L../../vmelsec/lib -L../../bee/lib -L../../secs/lib -L../../ecm/lib -L$(ACE_ROOT)/ace

LDLIBS = -ltcl -lmelshm -lee2 -lecm -lsecs -lgem

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

$(BIN): $(addprefix $(VDIR), $(OBJS))
	$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)

realclean: clean 

