#
# Makefile for tclIR
#
# This makefile currently assumes you are using GNU make
#

#
# Install Location
#
# Specify the directory you wish tclIR to be installed in.
# Binaries will be placed in $(INSTALL_DIR)/bin
#
INSTALL_DIR = /opt/OrbixMT

#
# Location of tcl.h
#
TCL_INCLUDE = /opt/include

#
# Location of Orbix includes
#
ORBIX_INCLUDE = /opt/OrbixMT/include

#
# Location of tcl library
#
TCL_LIBDIR = /opt/lib

#
# Location of Orbix library
#
ORBIX_LIBDIR = /opt/OrbixMT/lib

#
# Change this if you use OrbixMT
#
#ORBIX_LIBS = -lITcltmt -lIRcltmt -mt
ORBIX_LIBS = -lITclt -lIRclt

#
# additonal libs
#
# For example, Solaris needs these:
#
EXTRA_LIBS = -lsocket -lnsl

#
# Specify the C++ compiler to use, it must be the same compiler you use
# to build Orbix programs
#
CXX = CC

#
# Specify the C compiler to use
#
CC = cc

#
# Specify any additional C/C++ compiler flags
#
#CFLAGS = -g
CFLAGS = -O2

#
# Uncomment this line if you want to put the tclIR package in its own
# namespace (assumes you have the itcl version of tcl)
#
#NAMESPACE = -DUSE_ITCL_NAMESPACES

#
# You should not need to change anything below this line.
#

CPPFLAGS = -I$(ORBIX_INCLUDE) -I$(TCL_INCLUDE) $(NAMESPACE)
LDFLAGS = -L$(ORBIX_LIBDIR) -L$(TCL_LIBDIR) -ltcl $(ORBIX_LIBS) $(EXTRA_LIBS)

all: orbsh

install: orbsh
	/bin/cp orbsh $(INSTALL_DIR)/bin

orbsh: tclIR.o tclAppInit.o
	$(CXX) $(CXXFLAGS) -o orbsh tclIR.o tclAppInit.o $(LDFLAGS) $(LIBS)

clean:
	rm -rf *.o core

tclIR.o: tclIR.cc tclIR.h



