RANLIB ?= ranlib # Configuration jim_nofork := @JIM_NOFORK@ # 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 # Emulate tinytcl LIBJIM := libtcl6.a CFLAGS += -Wall -g -Os -I. @EXTRA_CFLAGS@ .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 tclsh make-c-ext.tcl $@ $*.tcl ifdef jim_nofork CFLAGS += -DNO_FORK endif OBJS += load_extensions.o TARGETS += jimsh $(LIBJIM) all: $(TARGETS) $(MAKE) -C doc all jimsh: $(LIBJIM) jimsh.o $(CC) $(LDFLAGS) -o $@ $^ $(LIBJIM) $(LDLIBS) $(LIBDL) $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS) $(AR) cr $@ $^ $(RANLIB) $@ load_extensions.c: make-jim-load-extensions.sh sh make-jim-load-extensions.sh $@ $(EXTENSIONS) install: clean: rm -f *.o lib*.a $(TARGETS) load_extensions.c if [ -f .clean ]; then rm -f `cat .clean` .clean; fi