
#
# Tcl 8.x Library Makefile
#

NSHOME   = ..

include $(NSHOME)/include/Makefile.global


ifeq (gcc,$(CC))
    ENABLE_GCC=--enable-gcc
endif

TCLDIR   =   $(shell pwd)/unix

CFLAGS   += -DUSE_TCL8X -Dfork=ns_fork -Dreaddir=ns_readdir -Dgmtime=ns_gmtime -Dsignal=ns_signal -Dlocaltime=ns_localtime

all: $(TCLDIR)/Makefile
	(cd $(TCLDIR); $(MAKE) CFLAGS='$(CFLAGS)' $(TCL8X_LIB)) 

$(TCLDIR)/Makefile: $(TCLDIR)/Makefile.in $(TCLDIR)/configure
	(cd $(TCLDIR); ./configure $(ENABLE_GCC) --enable-symbols --disable-shared)

clean:
	(cd $(TCLDIR); $(MAKE) -f Makefile.in distclean)

install: all
