# Generated automatically from Makefile.in by configure.
# $Id: s.Makefile.in 1.3 01/03/24 21:46:04+01:00 neumann@somewhere.wu-wien.ac.at $
prefix = 	/usr/local
exec_prefix=	/usr/local

XOTCLSDBM=	xotclsdbm

## for bitkeeper
GET=bk get -S

#
# 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)  -DXOTCLVERSION=\\\"$(XOTCLVERSION)\\\" $(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$(XOTCLSDBM)$(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= -I. -I../../../src $(TCLINC) $(TKINC) $(XINC) 
XOTCLLIB= -L../../../src -l$(XOTCL)
LIBS= -L/home/uzdun/tcl8.3.1/unix -ltcl -lc

OBJS = o/hash.o o/pair.o o/sdbm.o o/xotclsdbm.o
#SOBJS =  so/hash.o so/pair.o so/sdbm.o so/util.o so/xotclsdbm.o
SOBJS =   so/hash.o so/pair.o so/sdbm.o so/xotclsdbm.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) $<
%.o: %.c
	$(CC) -c -o $@ $(CFLAGS) $(INCLUDES) $<

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

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

libs: $(SHLIB_DEST) lib$(XOTCLSDBM).a

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

clean:
	rm -rf $(SHLIB_DEST) lib$(XOTCLSDBM).a \
		*.o o so  \
		core so_locations gmon.out *~ \#*

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