ARCH    = hpux-sl
APPNAME = TCL/TK CDEV Interface
include $(CDEV)/examples/Makefile.common

TCLINC		= -I../../../src/itcl2.1/tcl7.5/generic
TCLLIB		= -L../../../lib/itcl -ltcl7.5i
DEF_INIT        = -DCDEVLIBRARY=\"$(CDEVROOT)/lib/$(TARGET)/libcdev.sl\" -DCDEV_VERSION=\"$(CDEVVERSION)\"
CXXEXTRA	= -I$(CDEVROOT)/include $(TCLINC) $(DEF_INIT)
CDEVLIBRARY	= $(CDEVROOT)/lib/$(TARGET)/libcdev.sl

OBJS = tcl_cdev.o 
SRCS = tcl_cdev.cc

targets: libtclcdev.sl libtclcdevcollections.sl libtclvector.sl

libtclcdev.sl: tcl_cdev.o
	rm -f $@
	ld -b -o $@ tcl_cdev.o -L$(CDEV)/lib/$(TARGETDIR) -lcdev -ll -ly

libtclcdevcollections.sl: tcl_cdevcollections.o
	rm -f $@
	ld -b -o $@ tcl_cdevcollections.o  -ll -ly

libtclvector.sl: tcl_cdevvector.o
	rm -f $@
	ld -b -o $@ tcl_cdevvector.o  -ll -ly

install: libtclcdev.sl
	mv libtclcdev.sl ../../../lib/itcl
	cat pkgIndex.tcl >> ../../../lib/itcl/pkgIndex.tcl

clean:
	@rm -rf *.o *.a *.sl *~ core ish


breakit: breakit.o
		CC -o $@ breakit.o -L$(CDEV)/lib/$(TARGETDIR) -lcdev -ll -ly -lm
