annotate src/module.mk @ 21374:1487a68a496a

untangle configuration of OpenGL, FLTK, and Qt (bug #47263) * configure.ac: Disentangle checks for FLTK, Qt, OpenGL, freetype, fontconfig, etc. * configure.ac (AMCOND_BUILD_QT_GRAPHICS): New automake conditional. * libgui/graphics/module.mk: Use it. * configure.ac (AMCOND_BUILD_QT_GUI): Rename from AMCOND_BUILD_GUI. Change all uses. (HAVE_OCTAVE_QT_GUI): Rename from HAVE_OCTAVE_GUI. Change all uses. * octave-gui.cc: Only initialize qt graphics toolkit if it is available. * __init_fltk__.cc: Only initialize fltk graphics toolkit if it is available. Allow compilation to succeed if FTLk widgets are availble but OpenGL is not. * __osmesa_print__.cc: Build even if OpenGL is not available. * acinclude.m4 (OCTAVE_CHECK_LIB_OPENGL): Move AC_DEFINE for HAVE_OPENGL here. * libinterp/link-deps.mk (LIBOCTINTERP_LINK_DEPS): Include $(FONTCONFIG_LIBS) and $(FREETYPE_LIBS) in the list.
author John W. Eaton <jwe@octave.org>
date Sun, 28 Feb 2016 23:03:54 -0500
parents 1309edb344e1
children 7e8a410e6124
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
1 src_EXTRA_DIST =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
2
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
3 src_CLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
4 src_DISTCLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
5 src_MAINTAINERCLEANFILES =
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
6
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ## Search local directories before those specified by the user.
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 SRC_DIR_CPPFLAGS = \
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
10 -I$(srcdir)/liboctave/array \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
11 -I$(srcdir)/liboctave/cruft/misc \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
12 -I$(srcdir)/liboctave/numeric \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
13 -I$(srcdir)/liboctave/system \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
14 -I$(srcdir)/liboctave/util \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
15 -I$(srcdir)/libinterp \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
16 -Ilibinterp/corefcn -I$(srcdir)/libinterp/corefcn \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
17 -I$(srcdir)/src \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
18 -Ilibgnu -I$(srcdir)/libgnu
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 EXTRA_DIST += \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 src/main.in.cc \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 src/mkoctfile.in.cc \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 src/octave-config.in.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 DISTCLEANFILES += \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 src/main.cc \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 src/mkoctfile.cc \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 src/octave-config.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 bin_PROGRAMS += \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 src/mkoctfile \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 src/octave \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 src/octave-cli \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 src/octave-config
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35
20329
110005dcf8a1 create correct version links in build tree
John W. Eaton <jwe@octave.org>
parents: 20326
diff changeset
36 OCTAVE_INTERPRETER_TARGETS += \
20365
0932426e3866 Fix dependency of built images on the interpreter
Mike Miller <mtmiller@octave.org>
parents: 20334
diff changeset
37 $(bin_PROGRAMS) \
20329
110005dcf8a1 create correct version links in build tree
John W. Eaton <jwe@octave.org>
parents: 20326
diff changeset
38 $(OCTAVE_VERSION_LINKS)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 noinst_HEADERS += \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 src/display-available.h \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 src/shared-fcns.h
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 OCTAVE_VERSION_LINKS += src/octave-cli-$(version)$(EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45
21374
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21290
diff changeset
46 if AMCOND_BUILD_QT_GUI
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 archlib_PROGRAMS += src/octave-gui
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 OCTAVE_VERSION_LINKS += src/octave-gui-$(version)$(EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49
20402
be6720faab96 update of targets for cross build
John D
parents: 20367
diff changeset
50 OCTAVE_INTERPRETER_TARGETS += src/octave-gui$(EXEEXT)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 endif
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 OCTAVE_CORE_LIBS = \
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
54 libinterp/liboctinterp.la \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
55 liboctave/liboctave.la
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 nodist_src_octave_SOURCES = src/main.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58 src_octave_SOURCES = src/display-available.c
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60 src_octave_LDADD = \
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
61 libgnu/libgnu.la \
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
62 $(X11_LIBS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
63 $(CARBON_LIBS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 $(GNULIB_LINK_DEPS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
66 src_octave_LDFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67 $(NO_UNDEFINED_LDFLAG) \
20712
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
68 $(OCTAVE_LINK_OPTS) \
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
69 $(WARN_LDFLAGS)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
70
21374
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21290
diff changeset
71 if AMCOND_BUILD_QT_GUI
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21290
diff changeset
72 OCTAVE_CPPFLAGS = -DHAVE_OCTAVE_QT_GUI
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
73 endif
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
74
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
75 src_octave_CPPFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
76 $(SRC_DIR_CPPFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 $(OCTAVE_CPPFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
78
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
79 src_octave_CXXFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80 $(AM_CXXFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 $(WARN_CXXFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
83 src_octave_cli_SOURCES = src/main-cli.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
84
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
85 src_octave_cli_LDADD = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
86 $(OCTAVE_CORE_LIBS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87 $(OCTAVE_LINK_DEPS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89 src_octave_cli_LDFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
90 $(NO_UNDEFINED_LDFLAG) \
20712
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
91 $(OCTAVE_LINK_OPTS) \
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
92 $(WARN_LDFLAGS)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
93
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
94 src_octave_cli_CPPFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
95 $(SRC_DIR_CPPFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
96 $(OCTAVE_CPPFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
97
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
98 src_octave_cli_CXXFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
99 $(AM_CXXFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
100 $(WARN_CXXFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
101
21374
1487a68a496a untangle configuration of OpenGL, FLTK, and Qt (bug #47263)
John W. Eaton <jwe@octave.org>
parents: 21290
diff changeset
102 if AMCOND_BUILD_QT_GUI
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
103 src_octave_gui_SOURCES = src/main-gui.cc
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
104 OCTAVE_GUI_LIBS = libgui/liboctgui.la
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
105 OCTAVE_GUI_CPPFLAGS = -I$(srcdir)/libgui/src
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
106 endif
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
107
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
108 src_octave_gui_CPPFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
109 $(SRC_DIR_CPPFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
110 $(OCTAVE_GUI_CPPFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
111
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
112 src_octave_gui_LDADD = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
113 $(OCTAVE_GUI_LIBS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
114 $(OCTAVE_CORE_LIBS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
115 $(OCTAVE_GUI_LINK_DEPS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
116
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
117 src_octave_gui_LDFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
118 $(NO_UNDEFINED_LDFLAG) \
20712
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
119 $(OCTAVE_GUI_LINK_OPTS) \
4a25c398ffa2 configure option to build with address sanitizer (bugg #46449)
John W. Eaton <jwe@octave.org>
parents: 20461
diff changeset
120 $(WARN_LDFLAGS)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
121
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
122 src_octave_gui_CXXFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
123 $(AM_CXXFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
124 $(WARN_CXXFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
125
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
126 src_mkoctfile_SOURCES =
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
127
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
128 nodist_src_mkoctfile_SOURCES = src/mkoctfile.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
129
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
130 src_mkoctfile_LDADD = libgnu/libgnu.la $(LIBS)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
131
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
132 src_mkoctfile_CPPFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
133 $(SRC_DIR_CPPFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
134 $(OCTAVE_CPPFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
135
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
136 src_mkoctfile_CXXFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
137 $(AM_CXXFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
138 $(WARN_CXXFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
139
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
140 src_octave_config_SOURCES =
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
141
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
142 nodist_src_octave_config_SOURCES = src/octave-config.cc
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
143
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
144 src_octave_config_LDADD = \
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
145 libinterp/corefcn/libcorefcn.la \
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
146 libgnu/libgnu.la \
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
147 $(LIBS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
148
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
149 src_octave_config_CPPFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
150 $(SRC_DIR_CPPFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
151 $(OCTAVE_CPPFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
152
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
153 src_octave_config_CXXFLAGS = \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
154 $(AM_CXXFLAGS) \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
155 $(WARN_CXXFLAGS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
156
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
157 DIRSTAMP_FILES += src/$(octave_dirstamp)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
158
20461
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
159 mostlyclean-local: src-mostlyclean-local
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
160 .PHONY: src-mostlyclean-local
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
161
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
162 if AMCOND_CROSS_TOOLS
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
163
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
164 ## Building cross mkoctfile.
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
165
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
166 OCTAVE_CROSS_TOOLS += src/$(host_triplet)-mkoctfile$(BUILD_EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
167
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
168 src/$(host_triplet)-mkoctfile$(BUILD_EXEEXT): src/$(host_triplet)-mkoctfile.cc
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
169 $(BUILD_CXX) -o src/$(host_triplet)-mkoctfile$(BUILD_EXEEXT) -Dgnulib='' -Doctave_idx_type=int $(DEFAULT_INCLUDES) $(BUILD_CXXFLAGS) $(BUILD_LDFLAGS) -I$(srcdir)/src src/$(host_triplet)-mkoctfile.cc
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
170
20367
6b7c10920dfe make interpreter targets and dirstamp files order-only prerequisites
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
171 src/$(host_triplet)-mkoctfile.cc: src/mkoctfile.in.cc Makefile | src/$(octave_dirstamp)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
172 $(AM_V_GEN)$(do_subst_cross_config_vals)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
173
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
174 ## Building cross octave-config.
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
175
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
176 OCTAVE_CROSS_TOOLS += src/$(host_triplet)-octave-config$(BUILD_EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
177
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
178 src/$(host_triplet)-octave-config$(BUILD_EXEEXT): src/$(host_triplet)-octave-config.cc
21290
1309edb344e1 use top_srcdir, top_builddir, abs_top_srcdir or abs_top_builddir only if needed
John W. Eaton <jwe@octave.org>
parents: 20713
diff changeset
179 $(BUILD_CXX) -o src/$(host_triplet)-octave-config$(BUILD_EXEEXT) -Dgnulib='' -Doctave_idx_type=int $(DEFAULT_INCLUDES) $(BUILD_CXXFLAGS) $(BUILD_LDFLAGS) -I$(srcdir)/src src/$(host_triplet)-octave-config.cc
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
180
20367
6b7c10920dfe make interpreter targets and dirstamp files order-only prerequisites
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
181 src/$(host_triplet)-octave-config.cc: src/octave-config.in.cc Makefile | src/$(octave_dirstamp)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
182 $(AM_V_GEN)$(do_subst_default_vals)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
183
20461
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
184 src-mostlyclean-local:
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
185 -rm -f $(OCTAVE_CROSS_TOOLS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
186
20461
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
187 else
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
188
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
189 src-mostlyclean-local:
0fe7133da8ce don't define mostlyclean-local target in module.mk file
John W. Eaton <jwe@octave.org>
parents: 20402
diff changeset
190
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
191 endif
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
192
20367
6b7c10920dfe make interpreter targets and dirstamp files order-only prerequisites
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
193 src/octave-config.cc: src/octave-config.in.cc Makefile | src/$(octave_dirstamp)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
194 $(AM_V_GEN)$(do_subst_default_vals)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
195
20367
6b7c10920dfe make interpreter targets and dirstamp files order-only prerequisites
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
196 src/mkoctfile.cc: src/mkoctfile.in.cc Makefile | src/$(octave_dirstamp)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
197 $(AM_V_GEN)$(do_subst_config_vals)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
198
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
199 ## main.cc must depend on Makefile. Calling configure may change
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
200 ## default/config values. However, calling configure will also
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
201 ## regenerate the Makefiles from Makefile.am and trigger the rules below.
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
202
20367
6b7c10920dfe make interpreter targets and dirstamp files order-only prerequisites
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
203 src/main.cc: src/main.in.cc Makefile | src/$(octave_dirstamp)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
204 $(AM_V_GEN)$(do_subst_default_vals)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
205
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
206 ALL_LOCAL_TARGETS += $(OCTAVE_VERSION_LINKS) $(OCTAVE_CROSS_TOOLS)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
207
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
208 install-exec-hook: make-version-links
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
209
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
210 uninstall-local: remove-version-links
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
211
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
212 make-version-links:
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
213 cd $(DESTDIR)$(bindir) && \
20333
23172e987766 Fix 'make install' errors for non-recursive build
Mike Miller <mtmiller@octave.org>
parents: 20329
diff changeset
214 for f in $(notdir $(basename $(bin_PROGRAMS))); do \
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
215 mv $$f$(EXEEXT) $$f-$(version)$(EXEEXT) && \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
216 $(LN_S) $$f-$(version)$(EXEEXT) $$f$(EXEEXT); \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
217 done
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
218
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
219 remove-version-links:
20333
23172e987766 Fix 'make install' errors for non-recursive build
Mike Miller <mtmiller@octave.org>
parents: 20329
diff changeset
220 for f in $(notdir $(basename $(bin_PROGRAMS))); do \
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
221 rm -f $(DESTDIR)$(bindir)/$$f-$(version)$(EXEEXT); \
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
222 done
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
223
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
224 .PHONY: make-version-links remove-version-links
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
225
20713
2469d78a1d8b Consistently use 'filename' rather than 'file name' throughout code base.
Rik <rik@octave.org>
parents: 20712
diff changeset
226 ## We need these filenames in the build tree because the wrapper
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
227 ## program (main.cc) will try to invoke the versioned binaries.
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
228
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
229 src/octave-cli-$(version)$(EXEEXT): src/octave-cli$(EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
230 $(AM_V_GEN)rm -f $@ && \
20334
07dd8e602f4e Portably create version links in build tree
Mike Miller <mtmiller@octave.org>
parents: 20333
diff changeset
231 cd $(@D) && $(LN_S) $(<F) $(@F)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
232
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
233 src/octave-gui-$(version)$(EXEEXT): src/octave-gui$(EXEEXT)
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
234 $(AM_V_GEN)rm -f $@ && \
20334
07dd8e602f4e Portably create version links in build tree
Mike Miller <mtmiller@octave.org>
parents: 20333
diff changeset
235 cd $(@D) && $(LN_S) $(<F) $(@F)
20325
2d84d27dc9f0 eliminate recursive make invocation in src directory
John W. Eaton <jwe@octave.org>
parents:
diff changeset
236
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
237 src_CLEANFILES += $(OCTAVE_VERSION_LINKS)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
238
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
239 CLEANFILES += $(src_CLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
240 DISTCLEANFILES += $(src_DISTCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
241 MAINTAINERCLEANFILES += $(src_MAINTAINERCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
242
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
243 src-clean:
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
244 rm -f $(src_CLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
245
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
246 src-distclean: src-clean
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
247 rm -f $(src_DISTCLEANFILES)
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
248
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
249 src-maintainer-clean: src-distclean
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20365
diff changeset
250 rm -f $(src_MAINTAINERCLEANFILES)