2 # Gnumeric's Makefile.am
3 # Author: Miguel de Icaza (miguel@kernel.org)
4 -include $(INTROSPECTION_MAKEFILE)
6 INTROSPECTION_SCANNER_ARGS = \
7 --add-include-path="${INTROSPECTION_GIRDIR}" \
8 -v --warn-all --accept-unprefixed \
9 --identifier-prefix="Gnm" --identifier-prefix="Gnumeric" \
11 -DGOFFICE_NAMESPACE_DISABLE
12 INTROSPECTION_COMPILER_ARGS = \
13 --includedir=$(srcdir) \
15 --includedir="${INTROSPECTION_GIRDIR}"
19 lib_LTLIBRARIES = libspreadsheet.la
23 noinst_PROGRAMS = sstest
25 noinst_HEADERS = dead-kittens.h compilation.h gnm-i18n.h
29 bin_PROGRAMS += gnumeric
32 bin_PROGRAMS += ssconvert ssindex ssgrep ssdiff
42 # A hint is needed to build these headers first:
50 # These also need to occur in gnm.gresource.xml
55 autofilter-expression.ui \
74 descriptive-stats.ui \
75 dialog-stf-export.ui \
101 principal-components.ui \
104 random-generation-cor.ui \
105 random-generation.ui \
112 scenario-manager.ui \
119 sheetobject-size.ui \
135 wilcoxon-mann-whitney.ui \
139 dialogs/dao-gui-utils.c \
140 dialogs/dialog-about.c \
141 dialogs/dialog-advanced-filter.c \
142 dialogs/dialog-analysis-tools.c \
143 dialogs/dialog-analysis-tool-chi-squared.c \
144 dialogs/dialog-analysis-tool-frequency.c \
145 dialogs/dialog-analysis-tool-kaplan-meier.c \
146 dialogs/dialog-analysis-tool-normality.c \
147 dialogs/dialog-analysis-tool-one-mean.c \
148 dialogs/dialog-analysis-tool-principal-components.c \
149 dialogs/dialog-analysis-tool-sign-test.c \
150 dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c \
151 dialogs/dialog-autofilter.c \
152 dialogs/dialog-autoformat.c \
153 dialogs/dialog-autosave.c \
154 dialogs/dialog-cell-comment.c \
155 dialogs/dialog-cell-format.c \
156 dialogs/dialog-cell-format-cond.c \
157 dialogs/dialog-cell-sort.c \
158 dialogs/dialog-col-width.c \
159 dialogs/dialog-col-row.c \
160 dialogs/dialog-consolidate.c \
161 dialogs/dialog-data-slicer.c \
162 dialogs/dialog-data-table.c \
163 dialogs/dialog-fill-series.c \
164 dialogs/dialog-function-select.c \
165 dialogs/dialog-formula-guru.c \
166 dialogs/dialog-goal-seek.c \
167 dialogs/dialog-goto-cell.c \
168 dialogs/dialog-hyperlink.c \
169 dialogs/dialog-insert-cells.c \
170 dialogs/dialog-define-names.c \
171 dialogs/dialog-delete-cells.c \
172 dialogs/dialog-merge.c \
173 dialogs/dialog-password.c \
174 dialogs/dialog-paste-special.c \
175 dialogs/dialog-plugin-manager.c \
176 dialogs/dialog-preferences.c \
177 dialogs/dialog-random-generator.c \
178 dialogs/dialog-random-generator-cor.c \
179 dialogs/dialog-recent.c \
180 dialogs/dialog-row-height.c \
181 dialogs/dialog-quit.c \
182 dialogs/dialog-scenarios.c \
183 dialogs/dialog-search.c \
184 dialogs/dialog-search-replace.c \
185 dialogs/dialog-sheet-compare.c \
186 dialogs/dialog-sheet-order.c \
187 dialogs/dialog-sheet-rename.c \
188 dialogs/dialog-sheet-resize.c \
189 dialogs/dialog-sheetobject-size.c \
190 dialogs/dialog-shuffle.c \
191 dialogs/dialog-simulation.c \
192 dialogs/dialog-so-list.c \
193 dialogs/dialog-so-styled.c \
194 dialogs/dialog-solver.c \
195 dialogs/dialog-stf.c \
196 dialogs/dialog-stf-main-page.c \
197 dialogs/dialog-stf-csv-page.c \
198 dialogs/dialog-stf-fixed-page.c \
199 dialogs/dialog-stf-format-page.c \
200 dialogs/dialog-stf-preview.c \
201 dialogs/dialog-stf-export.c \
202 dialogs/dialog-tabulate.c \
203 dialogs/dialog-doc-metadata.c \
204 dialogs/dialog-view.c \
205 dialogs/dialog-workbook-attr.c \
206 dialogs/dialog-zoom.c \
207 dialogs/dialog-printer-setup.c
211 dialogs/dao-gui-utils.h \
212 dialogs/dialog-stf.h \
213 dialogs/dialog-stf-preview.h \
214 dialogs/dialog-stf-export.h \
216 dialogs/tool-dialogs.h
219 # Another hint, see bugs #172211 and #172212:
220 non-intermediate: gnm-marshalers.c gnmresources.c
222 resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir) --generate-dependencies $(srcdir)/gnm.gresource.xml)
224 gnmresources.h: gnm.gresource.xml
225 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
226 --target=$@ --sourcedir=$(top_srcdir) --c-name _gnm --generate-header --manual-register
227 gnmresources.c: gnm.gresource.xml $(resource_files) Makefile
228 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
229 --target=$@ --sourcedir=$(top_srcdir) --c-name _gnm --generate-source --manual-register
232 CLEANFILES = $(BUILT_SOURCES) \
235 libspreadsheet_la_CPPFLAGS = $(AM_CPPFLAGS) -DGNUMERIC_INTERNAL
236 libspreadsheet_la_LDFLAGS = -release $(VERSION)
237 libspreadsheet_la_LIBADD = \
238 $(gnumeric_app_libs) \
242 libspreadsheet_la_SOURCES = \
247 go-data-cache-source.c \
248 go-data-cache-source.h \
249 go-data-cache-impl.h \
252 go-data-cache-field-impl.h \
253 go-data-cache-field.h \
254 go-data-cache-field.c \
255 go-data-slicer-impl.h \
258 go-data-slicer-field-impl.h \
259 go-data-slicer-field.h \
260 go-data-slicer-field.c \
262 gnm-data-cache-source.h \
263 gnm-data-cache-source.c \
266 gnm-sheet-slicer-combo.h \
267 gnm-sheet-slicer-combo.c \
282 command-context-stderr.c \
298 gnm-commands-slicer.c \
311 gnumeric-simple-canvas.c \
333 preview-grid-impl.h \
338 rangefunc-strings.c \
350 sheet-control-gui.c \
355 sheet-object-cell-comment.c \
356 sheet-object-component.c \
357 sheet-object-graph.c \
358 sheet-object-image.c \
359 sheet-object-widget.c \
380 workbook-cmd-format.c \
388 nodist_libspreadsheet_la_SOURCES = gnmresources.c gnmresources.h
390 # When we switch to subversion fix this to nest as
391 # libspreadsheet-ver/spreadsheet/header
392 # doing it now would require massive cvs surgery.
393 libspreadsheet_includedir = $(includedir)/libspreadsheet-@GNUMERIC_API_VER@/spreadsheet
394 libspreadsheet_include_HEADERS = \
404 command-context-stderr.h \
422 gnm-commands-slicer.h \
423 gnm-data-cache-source.h \
437 gnumeric-simple-canvas.h \
439 go-data-cache-field.h \
440 go-data-cache-source.h \
442 go-data-slicer-field.h \
470 rangefunc-strings.h \
483 sheet-control-gui-priv.h \
484 sheet-control-gui.h \
485 sheet-control-priv.h \
488 sheet-filter-combo.h \
491 sheet-object-cell-comment.h \
492 sheet-object-component.h \
493 sheet-object-graph.h \
494 sheet-object-image.h \
495 sheet-object-impl.h \
496 sheet-object-widget-impl.h \
497 sheet-object-widget.h \
519 workbook-cmd-format.h \
520 workbook-control-priv.h \
538 gnumeric_LDFLAGS = -export-dynamic
540 ssconvert_LDADD = $(gnumeric_LDADD)
541 ssconvert_LDFLAGS = -export-dynamic
542 ssconvert_SOURCES = \
544 ssindex_LDADD = $(gnumeric_LDADD)
545 ssindex_LDFLAGS = -export-dynamic
548 ssgrep_LDADD = $(gnumeric_LDADD)
549 ssgrep_LDFLAGS = -export-dynamic
552 sstest_LDADD = $(gnumeric_LDADD)
553 sstest_LDFLAGS = -export-dynamic
556 ssdiff_LDADD = $(gnumeric_LDADD)
557 ssdiff_LDFLAGS = -export-dynamic
562 gnumeric_LDADD += gnumeric_rc.o
563 gnumeric_LDFLAGS += -mwindows -Wl,--stack,0x4000000
564 ssconvert_LDFLAGS += -mconsole -Wl,--stack,0x4000000
565 ssindex_LDFLAGS += -mconsole
566 ssgrep_LDFLAGS += -mconsole
568 libspreadsheet_la_DEPENDENCIES = libspreadsheet.def
569 libspreadsheet_la_LDFLAGS += -no-undefined -export-symbols libspreadsheet.def
573 libspreadsheet.def: local.def
574 echo EXPORTS > $@ && \
577 local.def: stamp-local.def
580 stamp-local.def: $(libspreadsheet_include_HEADERS) Makefile $(top_srcdir)/tools/dumpdef.pl
581 hdrs='$(libspreadsheet_include_HEADERS) dialogs/dialogs.h dialogs/tool-dialogs.h tools/dao.h tools/goal-seek.h tools/analysis-tools.h tools/gnm-solver.h widgets/gnumeric-expr-entry.h'; \
583 for hdr in $$hdrs; do \
584 if test -f $(srcdir)/$$hdr; then \
585 hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \
587 hdrs_list="$$hdrs_list $$hdr"; \
590 cat $(top_builddir)/gnumeric-config.h $$hdrs_list | \
591 sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \
592 $(CPP) $(AM_CPPFLAGS) "-DGNM_VAR_DECL=__declspec(dllexport)" -P - > xgen-localdef.1 && \
593 perl $(top_srcdir)/tools/dumpdef.pl \
594 xgen-localdef.1 > xgen-localdef.2 \
595 && (cmp -s xgen-localdef.2 local.def || \
596 cp xgen-localdef.2 local.def) \
597 && rm -f xgen-localdef.1 xgen-localdef.2 \
598 && echo timestamp > $@
602 gnumeric_app_libs = \
604 widgets/libwidgets.la
607 # Rules for the marshalers code:
608 GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=gnm_
611 $(GENMARSHAL_COMMAND) --header $< >$@
614 (echo '/* This file has been automatically generated. Do not edit. */' && \
615 echo '#include "$*.h"' && \
616 $(GENMARSHAL_COMMAND) --body $< ) >$@
618 # Depends on this Makefile, because it uses make variables.
619 gnumeric-paths.h: Makefile
622 echo '/* This file has been automatically generated. Do not edit. */'; \
624 echo '#ifndef GNUMERIC_PATHS_H'; \
625 echo '#define GNUMERIC_PATHS_H'; \
627 echo '#define GNUMERIC_PREFIX "$(prefix)"'; \
628 echo '#define GNUMERIC_SYSCONFDIR "$(sysconfdir)"'; \
629 echo '#define GNUMERIC_DATADIR "$(gnumeric_datadir)"'; \
630 echo '#define GNUMERIC_LIBDIR "$(gnumeric_libdir)"'; \
631 echo '#define GNUMERIC_ICONDIR "$(gnumeric_icondir)"'; \
632 echo '#define GNUMERIC_LOCALEDIR "$(gnumeric_localedir)"'; \
633 echo '#define GNUMERIC_EXTERNPLUGINDIR "$(gnumeric_externplugindir)"'; \
635 echo '#endif /* GNUMERIC_PATHS_H */'; \
638 update-gnumeric-conf:
639 make -C ${top_srcdir}/schemas
640 rm -f gnumeric-conf.c.tmp
641 @PERL@ -pe 'if (/AUTOMATICALLY GENERATED CODE BELOW/) { print; print "\n"; last; }' <gnumeric-conf.c >gnumeric-conf.c.tmp
642 @PERL@ ${top_srcdir}/tools/handle-conf-options --cfile ${top_srcdir}/schemas/org.gnome.gnumeric*.gschema.xml.in >>gnumeric-conf.c.tmp
643 if cmp gnumeric-conf.c gnumeric-conf.c.tmp; then \
644 rm gnumeric-conf.c.tmp; \
646 mv gnumeric-conf.c.tmp gnumeric-conf.c; \
648 rm -f gnumeric-conf.h.tmp
649 @PERL@ -pe 'if (/AUTOMATICALLY GENERATED CODE BELOW/) { print; print "\n"; last; }' <gnumeric-conf.h >gnumeric-conf.h.tmp
650 @PERL@ ${top_srcdir}/tools/handle-conf-options --hfile ${top_srcdir}/schemas/org.gnome.gnumeric*.gschema.xml.in >>gnumeric-conf.h.tmp
651 echo '' >>gnumeric-conf.h.tmp
652 @PERL@ -ne '$$p=1 if (/AUTOMATICALLY GENERATED CODE ABOVE/); print if $$p;' <gnumeric-conf.h >>gnumeric-conf.h.tmp
653 if cmp gnumeric-conf.h gnumeric-conf.h.tmp; then \
654 rm gnumeric-conf.h.tmp; \
656 mv gnumeric-conf.h.tmp gnumeric-conf.h; \
660 gnumeric_rc.o: gnumeric.rc ../gnumeric-config.h
661 $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@
665 cd $(DESTDIR)$(bindir) && \
666 mv -f gnumeric$(EXEEXT) gnumeric-$(VERSION)$(EXEEXT) && \
667 $(LN_S) gnumeric-$(VERSION)$(EXEEXT) gnumeric$(EXEEXT)
671 -cd $(DESTDIR)$(bindir) && \
672 rm -f gnumeric-$(VERSION)$(EXEEXT)
674 # include conditional files to ensure everything gets distributed no matter
678 pixmaps/line_pattern_dash_dot.png \
679 pixmaps/line_pattern_dash_dot_dot.png \
680 pixmaps/line_pattern_dashed.png \
681 pixmaps/line_pattern_dotted.png \
682 pixmaps/line_pattern_double.png \
683 pixmaps/line_pattern_hair.png \
684 pixmaps/line_pattern_medium.png \
685 pixmaps/line_pattern_medium_dash.png \
686 pixmaps/line_pattern_medium_dash_dot.png \
687 pixmaps/line_pattern_medium_dash_dot_dot.png \
688 pixmaps/line_pattern_slant.png \
689 pixmaps/line_pattern_thick.png \
690 pixmaps/line_pattern_thin.png \
691 pixmaps/right-down.png \
692 pixmaps/down-right.png \
693 pixmaps/gnumeric_splash_1.4.png \
694 pixmaps/unknown_image.png \
695 pixmaps/sheet_move_marker.png \
697 gnm-marshalers.list \
700 GNOME_Gnumeric-gtk.xml \
703 if HAVE_INTROSPECTION
705 INTROSPECTION_GIRS += Gnm-@GNUMERIC_API_VER@.gir
707 Gnm-@GNUMERIC_API_VER@.gir: $(INTROSPECTION_SCANNER) libspreadsheet.la Makefile
708 Gnm_@GNUMERIC_API_VER_@_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0 \
709 Gsf-1 GOffice-@GOFFICE_API_VER@
710 Gnm_@GNUMERIC_API_VER_@_gir_CFLAGS = $(AM_CPPFLAGS)
711 Gnm_@GNUMERIC_API_VER_@_gir_LIBS = libspreadsheet.la
712 Gnm_@GNUMERIC_API_VER_@_gir_FILES = \
713 $(libspreadsheet_la_SOURCES) \
714 $(libspreadsheet_include_HEADERS) \
722 widgets/gnumeric-expr-entry.c \
723 widgets/gnumeric-expr-entry.h
727 gir_DATA = $(INTROSPECTION_GIRS)
729 typelibsdir = $(TYPELIBDIR)
730 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
732 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
734 endif # HAVE_INTROSPECTION