10 SH_CFLAGS ?
= @SH_CFLAGS@
11 SH_LDFLAGS ?
= @SH_LDFLAGS@
12 SHOBJ_CFLAGS ?
= @SHOBJ_CFLAGS@
13 SHOBJ_LDFLAGS ?
= @SHOBJ_LDFLAGS@
18 exec_prefix ?
= @
exec_prefix@
21 CC
+= -D_GNU_SOURCE
-Wall
$(OPTIM
) -I.
22 CXX
+= -D_GNU_SOURCE
-Wall
$(OPTIM
) -I.
25 CXXFLAGS
+= -I@
srcdir@
33 SH_LIBJIM
:= $(LIBJIM
)
36 DEF_LD_PATH
:= @LD_LIBRARY_PATH@
=`pwd`
39 @if HAVE_CXX_EXTENSIONS
40 JIMSH_CC
:= $(CXX
) $(CXXFLAGS
)
42 JIMSH_CC
:= $(CC
) $(CFLAGS
)
45 OBJS
:= _load-static-exts.o jim-subcmd.o jim-interactive.o jim-format.o jim.o utf8.o jimregexp.o \
46 @EXTRA_OBJS@ @C_EXT_OBJS@ @TCL_EXT_OBJS@
48 JIMSH
:= jimsh@EXEEXT@
50 all: $(JIMSH
) @C_EXT_SHOBJS@
52 # Create C extensions from pure Tcl extensions
55 @tclsh@ @
srcdir@
/make-c-ext.tcl
$< >_
$*.c ||
( rm _
$*.c
; exit
1)
56 $(CC
) $(CFLAGS
) -c
-o
$@ _
$*.c ||
( rm _
$*.c
; exit
1)
61 $(JIMSH
): $(LIBJIM
) jimsh.o initjimsh.o
62 $(JIMSH_CC
) @SH_LINKFLAGS@
$(LDFLAGS
) -o
$@ jimsh.o initjimsh.o
$(LIBJIM
) $(LDLIBS
)
65 install: all docs @TCL_EXTS@ install-exec
66 mkdir
-p
$(DESTDIR
)$(prefix)/lib
/jim
67 cp
$(LIBJIM
) $(DESTDIR
)$(prefix)/lib
68 cp @
srcdir@
/README.extensions @C_EXT_SHOBJS@ @TCL_EXTS@
$(DESTDIR
)$(prefix)/lib
/jim
69 mkdir
-p
$(DESTDIR
)$(prefix)/include
70 cp @
srcdir@
/jim.h @
srcdir@
/jim-eventloop.h @
srcdir@
/jim-nvp.h @
srcdir@
/jim-signal.h \
71 @
srcdir@
/jim-subcmd.h @
srcdir@
/jim-win32compat.h
$(DESTDIR
)$(prefix)/include
72 cp jim-config.h
$(DESTDIR
)$(prefix)/include
73 mkdir
-p
$(DESTDIR
)$(prefix)/doc
/jim
74 cp Tcl.html
$(DESTDIR
)$(prefix)/doc
/jim
77 mkdir
-p
$(DESTDIR
)$(prefix)/bin
78 cp
$(JIMSH
) $(DESTDIR
)$(prefix)/bin
81 rm -f
$(DESTDIR
)$(prefix)/bin
/$(JIMSH
)
82 rm -f
$(DESTDIR
)$(prefix)/lib
/$(LIBJIM
)
83 for i in README.extensions @C_EXT_SHOBJS@ @TCL_EXTS@
; do
rm -f
$(DESTDIR
)$(prefix)/lib
/jim
/$$i; done
84 rm -f
$(DESTDIR
)$(prefix)/include/jim
*.h
85 rm -f
$(DESTDIR
)$(prefix)/doc
/jim
/Tcl.html
87 install install-exec
uninstall:
91 $(DEF_LD_PATH
) $(MAKE
) -C @
srcdir@
/tests jimsh
=`pwd`/jimsh
96 # Generate the unicode case mapping
97 utf8.o
: _unicode_mapping.c
99 _unicode_mapping.c
: @
srcdir@
/UnicodeData.txt @
srcdir@
/parse-unidata.tcl
100 @tclsh@ @
srcdir@
/parse-unidata.tcl @
srcdir@
/UnicodeData.txt
>$@ ||
( rm $@
; exit
1)
103 _load-static-exts.c
: @
srcdir@
/make-load-static-exts.tcl Makefile
104 @tclsh@ @
srcdir@
/make-load-static-exts.tcl @STATIC_EXTS@
>$@ ||
( rm $@
; exit
1)
112 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SH_LDFLAGS
) -o
$@
$(OBJS
) $(LDLIBS
)
115 # Note that $> $^ is for compatibility with both GNU make and BSD make
116 readdir.so
: jim-readdir.c
117 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-readdir.o
$> $^
118 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-readdir.o
$(SH_LIBJIM
)
120 array.so
: jim-array.c
121 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-array.o
$> $^
122 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-array.o
$(SH_LIBJIM
)
124 clock.so
: jim-clock.c
125 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-clock.o
$> $^
126 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-clock.o
$(SH_LIBJIM
)
129 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-file.o
$> $^
130 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-file.o
$(SH_LIBJIM
)
132 posix.so
: jim-posix.c
133 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-posix.o
$> $^
134 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-posix.o
$(SH_LIBJIM
)
136 regexp.so
: jim-regexp.c
137 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-regexp.o
$> $^
138 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-regexp.o
$(SH_LIBJIM
)
140 syslog.so
: jim-syslog.c
141 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-syslog.o
$> $^
142 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-syslog.o
$(SH_LIBJIM
)
144 readline.so
: jim-readline.c
145 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-readline.o
$> $^
146 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-readline.o
$(SH_LIBJIM
) @LDLIBS_readline@
149 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-pack.o
$> $^
150 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-pack.o
$(SH_LIBJIM
) @LDLIBS_pack@
152 sqlite.so
: jim-sqlite.c
153 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-sqlite.o
$> $^
154 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-sqlite.o
$(SH_LIBJIM
) @LDLIBS_sqlite@
156 sqlite3.so
: jim-sqlite3.c
157 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-sqlite3.o
$> $^
158 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-sqlite3.o
$(SH_LIBJIM
) @LDLIBS_sqlite3@
160 win32.so
: jim-win32.c
161 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-win32.o
$> $^
162 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-win32.o
$(SH_LIBJIM
) @LDLIBS_win32@
165 $(CXX
) $(CXXFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-mk.o
$> $^
166 $(CXX
) $(CXXFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-mk.o
$(SH_LIBJIM
) @LDLIBS_mk@
169 $(CC
) $(CFLAGS
) $(SHOBJ_CFLAGS
) -c
-o jim-sdl.o
$> $^
170 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(SHOBJ_LDFLAGS
) -o
$@ jim-sdl.o
$(SH_LIBJIM
) @LDLIBS_sdl@
172 Tcl.html
: jim_tcl.txt
173 @tclsh@ @
srcdir@
/make-index
$> $^ | asciidoc
-o
$@
-d manpage
- || cp @
srcdir@
/Tcl_shipped.html Tcl.html
176 rm -f
*.o
*.so lib
*.a
$(JIMSH
) Tcl.html _
*.c
179 rm -f jimautoconf.h jim-config.h Makefile config.log autosetup
/jimsh0.c autosetup
/jimsh0@EXEEXT@
182 cp
$< Tcl_shipped.html
184 # automake compatibility. do nothing for all these targets
185 EMPTY_AUTOMAKE_TARGETS
:= dvi pdf ps
info html
tags ctags
mostlyclean maintainer-clean
check installcheck installdirs \
186 install-pdf install-ps install-info install-html
-install-dvi
uninstall install-data
187 .PHONY
: $(EMPTY_AUTOMAKE_TARGETS
)
188 $(EMPTY_AUTOMAKE_TARGETS
):
190 # automake compatibility - install sources from the current dir to $(distdir)
191 distdir_full
:= $(shell cd
$(distdir
); pwd
)
193 cd
"@srcdir@"; git ls-files | cpio
-pdmu
$(distdir_full
)
196 CC
='@CC@' @AUTOREMAKE@