2 param CFLAGS = "-g -O2 -ansi -Wall -Wextra"
4 param MAKE_C_EXT = "jimtcl/jimsh jimtcl/make-c-ext.tcl"
6 param JIMFLAGS = [options { --disable-lineedit
9 --without-ext="eventloop history load syslog"
10 --with-ext="binary tclprefix"
16 exec $CC {*}$CFLAGS {*}$args
19 proc make-c-ext {tclfile cfile} {
22 exec -flags @ echo "#define JIM_EMBEDDED" > $cfile
23 exec {*}$MAKE_C_EXT $tclfile >> $cfile
28 if {[defined NO_BUILD_JIMTCL]} {
36 exec ./configure {*}$JIMFLAGS
40 exec $CC -o sqlite3.o -c sqlite3.c \
41 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 \
42 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 \
43 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_OMIT_INCRBLOB
49 set H_SRC "tmake.h tm_crypto.h tm_target.h tm_update.h tm_core_cmds.h tm_ext_cmds.h"
50 set C_SRC "tmake.c tm_crypto.c tm_target.c tm_update.c tm_core_cmds.c tm_ext_cmds.c"
52 rule tm_ext_cmds.c {tm_ext_cmds.tcl} {
53 make-c-ext $INPUTS $TARGET
56 rule tmake {jim $C_SRC $H_SRC} {
59 set OPSYS [tcl::exec uname -s]
60 set ARCH [tcl::exec uname -m]
62 cc -o $TARGET -Ijimtcl -Ijimtcl/sqlite3 \
63 -DTM_OPSYS="$OPSYS" -DTM_MACHINE_ARCH="$ARCH" \
64 {*}$C_SRC jimtcl/libjim.a jimtcl/sqlite3/sqlite3.o -lm
69 # ----------------------------------------------------------------------------
71 set DOCS {jimtcl/Tcl_shipped.html doc/refman.md}
74 file copy jimtcl/Tcl_shipped.html doc/Jim_Tcl.html
75 exec pandoc -f markdown_github -t html -o doc/refman.html doc/refman.md
79 exec pandoc -f html -t latex -o doc/Jim_Tcl.pdf jimtcl/Tcl_shipped.html
80 exec pandoc -f markdown_github -t latex -o doc/refman.pdf doc/refman.md
83 rule doc-all {doc-html doc-pdf}
85 #-----------------------------------------------------------------------------