diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 11:12:50 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:41 +1000 |
commit | 571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb (patch) | |
tree | 407ada47686556fb16198c99b3c61ea595bdb6bd /Makefile.in | |
parent | 2d8564100c86466b71408b24a4c6932ec942e7c5 (diff) | |
download | jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.zip jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.gz jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.bz2 |
Build improvements, bug fixes and compiler warnings
Remove unimplemented 'after restart|expire' from eventloop
Allow libjim to be build as a shared library
On some platforms, regex.h needs stdlib.h first
Use ualarm() only for times < 1 second
Fix warnings found by clang static analyser
*: printf/syslog %m isn't portable
*: some variables set but never read
*: some possible null pointer references (although mostly impossible)
*: also minor fixes to jim unit tests
Fix 'syslog -options <n>'
Must null terminate readlink() result
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in index cb8480e..f82ee4b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,6 +3,9 @@ RANLIB ?= ranlib # Configuration jim_nofork := @JIM_NOFORK@ +jim_libtype := @JIM_LIBTYPE@ +SH_CFLAGS ?= @SH_CFLAGS@ +SH_LDFLAGS ?= @SH_LDFLAGS@ # Defines the extensions to include EXTENSIONS := @JIM_EXTENSIONS@ @@ -12,12 +15,22 @@ CFLAGS += -DTCL_LIBRARY=\"/lib/tcl6\" CFLAGS += -DJIM_TCL_COMPAT -# Emulate tinytcl -LIBJIM := libtcl6.a - CFLAGS += -Wall -g -Os $(OPTIM) -I@SRCDIR@ @EXTRA_CFLAGS@ VPATH := @SRCDIR@ +ifdef jim_nofork + CFLAGS += -DNO_FORK +endif +ifeq ($(jim_libtype),static) + # Emulate tinytcl + LIBJIM := libtcl6.a +else + #LIBJIM := libjim_shared.so + LIBJIM := libtcl6.so + #CFLAGS += -fPIC + CFLAGS += $(SH_CFLAGS) +endif + .EXPORT_ALL_VARIABLES: OBJS := jim-subcmd.o jim-interactive.o jim.o @@ -33,23 +46,24 @@ jim-%.c: %.tcl echo $@ >>.clean sh @SRCDIR@/make-c-ext.sh $@ $< -ifdef jim_nofork - CFLAGS += -DNO_FORK -endif - OBJS += load_extensions.o TARGETS += $(LIBJIM) jimsh all: $(TARGETS) - $(MAKE) -C doc all + if [ -d doc ]; then $(MAKE) -C doc all; fi jimsh: $(LIBJIM) jimsh.o $(CC) $(LDFLAGS) -o $@ jimsh.o $(LIBJIM) $(LDLIBS) $(LIBDL) +ifeq ($(jim_libtype),static) $(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS) $(AR) cr $@ $^ $(RANLIB) $@ +else +$(LIBJIM): $(OBJS) $(EXTENSIONS_OBJS) + $(CC) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $^ +endif load_extensions.c: @SRCDIR@/make-jim-load-extensions.sh sh @SRCDIR@/make-jim-load-extensions.sh $@ $(EXTENSIONS) |