aio recvfrom was not null terminating the result
[jimtcl.git] / Makefile.in
blobb280621d167dd6e6262f28a81dff8f154e7c14dc
1 RANLIB ?= ranlib
3 # Configuration
5 jim_libtype := @JIM_LIBTYPE@
6 SH_CFLAGS ?= @SH_CFLAGS@
7 SH_LDFLAGS ?= @SH_LDFLAGS@
9 # Defines the extensions to include
10 EXTENSIONS := @JIM_EXTENSIONS@
12 # Set an initial, default library and auto_path
13 CFLAGS += -DTCL_LIBRARY=\"/lib/tcl6\"
15 CFLAGS += -DJIM_TCL_COMPAT -DJIM_REFERENCES
17 CFLAGS += -Wall -g $(OPTIM) -I@SRCDIR@ -I. @EXTRA_CFLAGS@
18 VPATH := @SRCDIR@
20 ifeq ($(jim_libtype),static)
21 # Emulate tinytcl
22 LIBJIM := libtcl6.a
23 else
24 LIBJIM := libtcl6.so
25 CFLAGS += $(SH_CFLAGS)
26 endif
28 .EXPORT_ALL_VARIABLES:
30 OBJS := jim-subcmd.o jim-interactive.o jim.o
32 SDKHDRS := jim.h jim-subcmd.h
34 EXTENSIONS_OBJS := $(patsubst %,jim-%.o,$(EXTENSIONS))
36 .PRECIOUS: jim-%.c
38 # Create C extensions from pure Tcl extensions
39 jim-%.c: %.tcl
40 echo $@ >>.clean
41 sh @SRCDIR@/make-c-ext.sh $< >$@
43 OBJS += jim-load-static-exts.o
45 all: jimsh
47 docs: Tcl.html
49 jimsh: $(LIBJIM) jimsh.o
50 $(CC) $(LDFLAGS) -o $@ jimsh.o $(LIBJIM) $(LDLIBS) @LIBDL@ -lm
52 ifeq ($(jim_libtype),static)
53 $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS)
54 $(AR) cr $@ $^
55 $(RANLIB) $@
56 else
57 $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS)
58 $(CC) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $^
59 endif
61 Tcl.html: jim_tcl.txt
62 asciidoc -o $@ -d manpage $^
64 clean:
65 rm -f *.o lib*.a jimsh Tcl.html
66 if [ -f .clean ]; then rm -f `cat .clean` .clean; fi
68 distclean: clean
69 rm -f autoconf.h Makefile config.status config.log
70 rm -rf autom4te.cache