# Generated automatically from Makefile.in by configure.
#
# This Makefile permits to build a subset of libtcl.a. This subset contains
# unmodified functions of the original Tcl distribution which are used in 
# the STk interpreter. Thoses functions are principally utilities functions
# such as hash tables, regexp, unix utilities
#

include ../config.make

CFLAGS= $(STKCFLAGS) -I. -I..  -DHAVE_UNISTD_H=1 -DNO_FLOAT_H=1 -DNO_STDLIB_H=1 -DNO_STRING_H=1
OBJ=panic.o tclHash.o tclGet.o tclUnixStr.o tclGlob.o regexp.o tclAsync.o  strerror.o strtoul.o strtoul.o

all: libtcl.a

libtcl.a: $(OBJ) 
	rm -f libtcl.a
	ar q libtcl.a $(OBJ)
	ranlib libtcl.a

install: all
	if [ ! -d $(STK_LIBRARY) ] ; then mkdir -p $(STK_LIBRARY); fi
	$(INSTALL) libtcl.a $(STK_LIBRARY)
	ranlib $(STK_LIBRARY)/libtcl.a
clean: 
	@rm -f *.a *.o core *~

# Files which must be generated if system does not provide the function they
# implement

getcwd.o: ./compat/getcwd.c
	$(CC) -c $(CFLAGS) ./compat/getcwd.c

opendir.o: ./compat/opendir.c
	$(CC) -c $(CFLAGS) ./compat/opendir.c

strerror.o: ./compat/strerror.c
	$(CC) -c $(CFLAGS) ./compat/strerror.c

strstr.o: ./compat/strstr.c
	$(CC) -c $(CFLAGS) ./compat/strstr.c

strtod.o: ./compat/strtod.c
	$(CC) -c $(CFLAGS) ./compat/strtod.c

strtol.o: ./compat/strtol.c
	$(CC) -c $(CFLAGS) ./compat/strtol.c

strtoul.o: ./compat/strtoul.c
	$(CC) -c $(CFLAGS) ./compat/strtoul.c

tmpnam.o: ./compat/tmpnam.c
	$(CC) -c $(CFLAGS) ./compat/tmpnam.c

waitpid.o: ./compat/waitpid.c
	$(CC) -c $(CFLAGS) ./compat/waitpid.c
	