RANLIB ?= ranlib # Configuration jim_libtype := @JIM_LIBTYPE@ SH_CFLAGS ?= @SH_CFLAGS@ SH_LDFLAGS ?= @SH_LDFLAGS@ # Defines the extensions to include EXTENSIONS := @JIM_EXTENSIONS@ # Set an initial, default library and auto_path CFLAGS += -DTCL_LIBRARY=\"/lib/tcl6\" CFLAGS += -DJIM_TCL_COMPAT -DJIM_REFERENCES CFLAGS += -Wall -g $(OPTIM) -I@SRCDIR@ -I. @EXTRA_CFLAGS@ VPATH := @SRCDIR@ ifeq ($(jim_libtype),static) # Emulate tinytcl LIBJIM := libtcl6.a else LIBJIM := libtcl6.so CFLAGS += $(SH_CFLAGS) endif .EXPORT_ALL_VARIABLES: OBJS := jim-subcmd.o jim-interactive.o jim.o SDKHDRS := jim.h jim-subcmd.h EXTENSIONS_OBJS := $(patsubst %,jim-%.o,$(EXTENSIONS)) .PRECIOUS: jim-%.c # Create C extensions from pure Tcl extensions jim-%.c: %.tcl echo $@ >>.clean sh @SRCDIR@/make-c-ext.sh $< >$@ OBJS += jim-load-static-exts.o all: jimsh docs: Tcl.html jimsh: $(LIBJIM) jimsh.o $(CC) $(LDFLAGS) -o $@ jimsh.o $(LIBJIM) $(LDLIBS) @LIBDL@ -lm ifeq ($(jim_libtype),static) $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS) $(AR) cr $@ $^ $(RANLIB) $@ else $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS) $(CC) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $^ endif Tcl.html: jim_tcl.txt asciidoc -o $@ -d manpage $^ clean: rm -f *.o lib*.a jimsh Tcl.html if [ -f .clean ]; then rm -f `cat .clean` .clean; fi distclean: clean rm -f autoconf.h Makefile config.status config.log rm -rf autom4te.cache