appveyor.yml: explicitly build with ssl
[jimtcl.git] / Makefile.in
blob67d503c4d867bb5247b42836ebc15e6efd3693d6
1 @if NO_SILENT_RULES
2 Q :=
3 ECHO := @:
4 @else
5 # make V=1 for verbose make output
6 Q := @
7 ECHO := @echo
8 ifeq ($(V),1)
9 ifeq ("$(origin V)", "command line")
10 Q :=
11 ECHO := @:
12 endif
13 endif
14 @endif
16 # Tools
17 CC = @CCACHE@ @CC@
18 CXX = @CCACHE@ @CXX@
19 RANLIB = @RANLIB@
20 AR = @AR@
21 STRIP = @STRIP@
23 # Configuration
25 SH_CFLAGS ?= @SH_CFLAGS@
26 SH_LDFLAGS ?= @SH_LDFLAGS@
27 @if SH_SOPREFIX
28 SH_LDFLAGS += @SH_SOPREFIX@libjim@LIBSOEXT@
29 @endif
30 SHOBJ_CFLAGS ?= @SHOBJ_CFLAGS@
31 @if JIM_STATICLIB
32 SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS@
33 @else
34 SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS_R@
35 @endif
36 CFLAGS = @CFLAGS@ @CCOPTS@ @CPPFLAGS@
37 CXXFLAGS = @CXXFLAGS@ @CXXOPTS@
38 LDFLAGS = @LDFLAGS@
39 LDLIBS += @LDLIBS@
40 LIBS += @LIBS@
41 exec_prefix ?= @exec_prefix@
42 prefix ?= @prefix@
43 docdir = @docdir@
45 CC += -Wall $(OPTIM) -I.
46 CXX += -Wall $(OPTIM) -I.
47 @if [get-define srcdir] ne "."
48 CFLAGS += -I@srcdir@
49 CXXFLAGS += -I@srcdir@
50 VPATH := @srcdir@
51 @endif
53 @if JIM_STATICLIB
54 LIBJIM := libjim.a
55 @else
56 LIBJIM := libjim@LIBSOEXT@
57 SH_LIBJIM := $(LIBJIM)
58 CC += $(SH_CFLAGS)
59 CXX += $(SH_CFLAGS)
60 DEF_LD_PATH := @LD_LIBRARY_PATH@="@builddir@:$(@LD_LIBRARY_PATH@)"
61 @endif
63 @if HAVE_CXX_EXTENSIONS
64 JIMSH_CC := $(CXX) $(CXXFLAGS)
65 @else
66 JIMSH_CC := $(CC) $(CFLAGS)
67 @endif
69 OBJS := _load-static-exts.o jim-subcmd.o jim-interactive.o jim-format.o jim.o utf8.o jimregexp.o jimiocompat.o \
70 @EXTRA_OBJS@ @C_EXT_OBJS@ @TCL_EXT_OBJS@
72 JIMSH := jimsh@EXEEXT@
74 @if JIM_INSTALL
75 INSTALL_DATA_DIR ?= mkdir -p
76 INSTALL_DATA ?= cp
77 INSTALL_PROGRAM ?= cp
78 @endif
80 all: $(JIMSH) @C_EXT_SHOBJS@
82 # Create C extensions from pure Tcl extensions
83 .SUFFIXES: .tcl
84 .tcl.o:
85 $(ECHO) " TCLEXT _$*.c"
86 $(Q)@tclsh@ @srcdir@/make-c-ext.tcl $< >_$*.c
87 $(ECHO) " CC $@"
88 $(Q)$(CC) $(CFLAGS) -c -o $@ _$*.c
90 .c.o:
91 $(ECHO) " CC $@"
92 $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
94 $(JIMSH): $(LIBJIM) jimsh.o initjimsh.o
95 $(ECHO) " LINK $@"
96 $(Q)$(JIMSH_CC) @SH_LINKRPATH_FLAGS@ @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o $(LIBJIM) $(LDLIBS) $(LIBS)
98 @if JIM_INSTALL
99 install: all @TCL_EXTS@ install-exec install-docs
100 $(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim
101 $(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@
102 $(INSTALL_DATA) @srcdir@/README.extensions @C_EXT_SHOBJS@ $(DESTDIR)@libdir@/jim
103 for i in tcltest.tcl @TCL_EXTS@; do $(INSTALL_DATA) @srcdir@/$$i $(DESTDIR)@libdir@/jim; done
104 $(INSTALL_DATA_DIR) $(DESTDIR)@includedir@
105 $(INSTALL_DATA) @srcdir@/jim.h @srcdir@/jim-eventloop.h @srcdir@/jim-signal.h \
106 @srcdir@/jim-subcmd.h @srcdir@/jim-win32compat.h $(DESTDIR)@includedir@
107 $(INSTALL_DATA) jim-config.h $(DESTDIR)@includedir@
108 $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
109 $(INSTALL_DATA) build-jim-ext $(DESTDIR)@bindir@
110 $(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/pkgconfig
111 $(INSTALL_DATA) jimtcl.pc $(DESTDIR)@libdir@/pkgconfig
113 install-exec: all
114 $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
115 $(INSTALL_PROGRAM) $(JIMSH) $(DESTDIR)@bindir@
117 uninstall:
118 rm -f $(DESTDIR)@bindir@/$(JIMSH)
119 rm -f $(DESTDIR)@bindir@/build-jim-ext
120 rm -f $(DESTDIR)@libdir@/$(LIBJIM)
121 for i in README.extensions @C_EXT_SHOBJS@ @TCL_EXTS@; do rm -f $(DESTDIR)@libdir@/jim/$$i; done
122 rm -f $(DESTDIR)@includedir@/jim*.h
123 rm -f $(DESTDIR)@datadir@/doc/jim/Tcl.html
124 @else
125 install install-exec: all
126 uninstall:
127 @endif
129 test check: $(JIMSH)
130 cd @srcdir@/tests; $(DEF_LD_PATH) $(MAKE) jimsh=@builddir@/jimsh TOPSRCDIR=..
132 $(OBJS) jimsh.o initjimsh.o: Makefile $(wildcard *.h)
134 @if JIM_UTF8
135 # Generate the unicode case mapping
136 utf8.o: _unicode_mapping.c
138 _unicode_mapping.c: @srcdir@/UnicodeData.txt @srcdir@/parse-unidata.tcl
139 $(ECHO) " UNIDATA $@"
140 $(Q)@tclsh@ @srcdir@/parse-unidata.tcl @PARSE_UNIDATA_FLAGS@ @srcdir@/UnicodeData.txt @srcdir@/EastAsianWidth.txt >$@ || ( rm $@; exit 1)
141 @endif
143 _load-static-exts.c: @srcdir@/make-load-static-exts.tcl Makefile
144 $(ECHO) " MKLDEXT $@"
145 $(Q)@tclsh@ @srcdir@/make-load-static-exts.tcl @STATIC_EXTS@ >$@ || ( rm $@; exit 1)
147 $(LIBJIM): $(OBJS)
148 @if JIM_STATICLIB
149 $(ECHO) " AR $@"
150 $(Q)$(AR) cr $@ $(OBJS)
151 $(Q)$(RANLIB) $@
152 @else
153 $(ECHO) " LDSO $@"
154 $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $(OBJS) $(LDLIBS) $(LIBS)
155 @endif
157 @BUILD_SHOBJS@
159 docs: Tcl.html
161 @if INSTALL_DOCS eq "nodocs"
162 install-docs:
163 @endif
165 @if INSTALL_DOCS eq "docs"
166 install-docs: docs
167 $(INSTALL_DATA_DIR) $(DESTDIR)$(docdir)
168 $(INSTALL_DATA) Tcl.html $(DESTDIR)$(docdir)
169 @endif
171 @if INSTALL_DOCS eq "shipped"
172 install-docs:
173 $(INSTALL_DATA_DIR) $(DESTDIR)$(docdir)
174 @echo "Warning: asciidoc not available - installing Tcl_shipped.html"
175 $(INSTALL_DATA) Tcl_shipped.html $(DESTDIR)$(docdir)/Tcl.html
176 @endif
178 Tcl.html: jim_tcl.txt @srcdir@/make-index
179 @if HAVE_ASCIIDOC
180 @tclsh@ @srcdir@/make-index $> $^ | @ASCIIDOC@ -d manpage - | @SED@ -e '/^<div.*id="footer-text"/,/<\/div>/d' >$@
181 @else
182 @echo "asciidoc is not available"; false
183 @endif
185 clean:
186 rm -f *.o *.so *.dll *.exe lib*.a $(JIMSH) $(LIBJIM) Tcl.html _*.c
188 distclean: clean
189 rm -f jimautoconf.h jim-config.h Makefile config.log @srcdir@/autosetup/jimsh0@EXEEXT@ build-jim-ext
190 rm -f jimtcl.pc tests/Makefile
192 ship: Tcl.html
193 cp $< Tcl_shipped.html
195 # automake compatibility. do nothing for all these targets
196 EMPTY_AUTOMAKE_TARGETS := dvi pdf ps info html tags ctags mostlyclean maintainer-clean check installcheck installdirs \
197 install-pdf install-ps install-info install-html -install-dvi uninstall install-data
198 .PHONY: $(EMPTY_AUTOMAKE_TARGETS)
199 $(EMPTY_AUTOMAKE_TARGETS):
201 # automake compatibility - install sources from the current dir to $(distdir)
202 distdir_full := $(shell cd $(distdir); pwd)
203 distdir:
204 cd "@srcdir@"; git ls-files | cpio -pdmu $(distdir_full)
206 reconfig:
207 CC='@CC@' @AUTOREMAKE@