# Generated automatically from Makefile.in by configure.
# $Id: Makefile.in,v 1.32 2000/12/18 14:00:49 neumann Exp $
prefix = 	/usr/local
exec_prefix=	/usr/local

## for bitkeeper

#%:      SCCS/s.%
#	bk get %

## for bitkeeper
GET=bk get -S

TCLEXPAT_VERSION  = 1.1
TCLEXPAT	  = tclexpat
# Use one of the next two lines; unixfilemap is better if it works.
FILEMAP_OBJ=expat/xmlwf/unixfilemap.o
#FILEMAP_OBJ=expat/xmlwf/readfilemap.o

#
# try ./configure first to fill in all the definitions corresponding
# to your system, but you always can edit the sections below manually.
#
CC=		cc
AC_FLAGS =       -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_FCNTL_H=1  
CFLAGS=		 -O $(AC_FLAGS)  $(DMALLOC_DEFINES)
RANLIB= 	ranlib
INSTALL=	/usr/bin/install -c

#
# where to find tcl/tk source (for includes) and binaries (for libraries)
#
TCLINC=		-I/home/neumann/tcl8.0.5/generic
TCLLIB=		-L/usr/lib -ltcl8.0${TCL_DBGX}
#TKINC=		-I/usr/include
#TKLIB=		-L/usr/lib -ltk8.0

#
# X11 and other libraries from tcl/tk make as needed to link tclsh and wish
#
XINC=		-I/usr/X11R6/include
XLIB=		-L/usr/X11R6/lib -lX11
OTHER_TCL_LIBS=	-lm
OTHER_TK_LIBS=	

#
# how to compile, link, and name shared libraries
#
SHLIB_LD=	cc -shared
SHLIB_CFLAGS=	-fPIC
SHLIB_SUFFIX=	.so
SHLD_FLAGS=	
DL_LIBS=	-ldl

#
# lib destination
#
SHLIB_DEST = ../lib$(TCLEXPAT)$(SHLIB_SUFFIX)

#
# where to install shells, libraries, and includes
#
INST_XOTCLSH=	$(exec_prefix)/bin
INST_XOLIB=	$(prefix)/lib
INST_XOLIBPKG=	$(prefix)/lib/xotcl
INST_XOLIBSH=	$(prefix)/lib/xotcl

XOTCL= xotcl
XOTCLVERSION= 0.85
MAKE_XOWISH= xowish
INSTALL_XOWISH= install_xowish

# In order to use DMALLOC, uncomment the following lines
#
#DMALLOC_DEFINES = -DDMALLOC
#DMALLOC_LIB     = -ldmalloc
#
# ------------ you shouldn't need to configure below here -----------------
#
INCLUDES= -Iexpat/xmltok -Iexpat/xmlparse -I. -I../../../src \
	$(TCLINC) $(TKINC) $(XINC) 
XOTCLLIB= -L../../../src -l$(XOTCL)
LIBS= -L/home/uzdun/tcl8.3.1/unix -ltcl -lc

SOBJS = expat/xmltok/xmltok.o \
  expat/xmltok/xmlrole.o \
  expat/xmlwf/xmlwf.o \
  expat/xmlwf/codepage.o \
  expat/xmlparse/xmlparse.o \
  expat/xmlparse/hashtable.o \
  $(FILEMAP_OBJ) \
  tclexpat.o

all: libs

#o/%.o: %.c 
#	@if test ! -d o; then mkdir o; fi
#	$(CC) -c -o $@ $(CFLAGS) $(INCLUDES) $<
#so/%.o: %.c
#	@if test ! -d so; then mkdir so; fi
#	$(CC) -c -o $@ $(CFLAGS) $(SHLIB_CFLAGS) $(INCLUDES) $<

# only build shared lib
%.o: %.c
	$(CC) -c -o $@ $(CFLAGS) $(SHLIB_CFLAGS) $(INCLUDES) $<

$(SHLIB_DEST): $(SOBJS)
	$(SHLIB_LD) -o $@ $(SOBJS)

lib$(TCLEXPAT).a: $(OBJS)
	ar cr $@ $(OBJS)
	$(RANLIB) $@

libs: $(SHLIB_DEST)

install: libs
	if test ! -d $(INST_XOLIB); then mkdir $(INST_XOLIB); fi;
	$(INSTALL) lib$(TCLEXPAT).a $(INST_XOLIB)
	$(INSTALL) $(SHLIB_DEST) $(INST_XOLIB)

clean:
	rm -rf  \
		*.o o so  \
		expat/*/*.o expat/*/*.so  \
		core so_locations gmon.out *~ \#*

binclean:
	rm -rf *.o o so config.status config.log config.cache \
		core so_locations
