aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-01-31 05:04:50 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-01-31 05:04:50 +0100
commitea0179e342343f5fbefb265bde4dea0d475f0781 (patch)
tree70af3013fe80707c802e88cae93bb5d504da2f55 /src/Makefile.am
parent2951f147ad24737e2c40a5fa4ace611a9b3fb829 (diff)
downloadsciteco-ea0179e342343f5fbefb265bde4dea0d475f0781.tar.gz
interfaces have their own automake subdirectories and convenience libraries now
* use libtool convenience libraries as much as possible (for all static libraries except Scintilla) * improves separation of language and user interface implementations (e.g. the Gtk widgets are not interesting for the rest of SciTECO) * the Curses popup widget can now be factored out of interface-curses.cpp * some common CPPFLAGS are now defined by ./configure via AM_CPPFLAGS, so they don't have to be repeated in each submodule. * fixed building the Curses UI: GTK_FLOW_BOX_FALLBACK conditional must always be defined.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am93
1 files changed, 36 insertions, 57 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3c60ba0..306bfb2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,21 +1,21 @@
+# The Gtk and Curses UIs have their own subdirectories.
+# Either of them will build libsciteco-interface.a
+if INTERFACE_GTK
+SUBDIRS = interface-gtk
+LIBSCITECO_INTERFACE = interface-gtk/libsciteco-interface.la
+else
+SUBDIRS = interface-curses
+LIBSCITECO_INTERFACE = interface-curses/libsciteco-interface.la
+endif
+
include $(top_srcdir)/bootstrap.am
include $(top_srcdir)/scintilla.am
-AM_CFLAGS = -Wall -std=c99
AM_CXXFLAGS = -Wall -Wno-char-subscripts
if CLANG
AM_CXXFLAGS += -Wno-mismatched-tags
endif
-# These paths can be changed at install-time and
-# should not be written into config.h:
-AM_CPPFLAGS = -D'SCITECODATADIR="$(pkgdatadir)"' \
- -D'SCITECOLIBDIR="@scitecolibdir@"'
-
-if NEED_COMPAT
-AM_CPPFLAGS += -I@top_srcdir@/compat
-endif
-
if STATIC_EXECUTABLES
# AM_LDFLAGS are libtool flags, NOT compiler/linker flags
AM_LDFLAGS = -all-static
@@ -23,61 +23,43 @@ endif
BUILT_SOURCES =
-EXTRA_DIST = gtk-info-popup.gob \
- symbols-extract.tes \
+EXTRA_DIST = symbols-extract.tes \
sciteco.html
-noinst_LIBRARIES = libsciteco-base.a
-libsciteco_base_a_SOURCES = main.cpp sciteco.h \
- string-utils.cpp string-utils.h \
- error.cpp error.h \
- cmdline.cpp cmdline.h \
- undo.cpp undo.h \
- expressions.cpp expressions.h \
- document.cpp document.h \
- ioview.cpp ioview.h \
- qregisters.cpp qregisters.h \
- ring.cpp ring.h \
- parser.cpp parser.h \
- search.cpp search.h \
- spawn.cpp spawn.h \
- glob.cpp glob.h \
- goto.cpp goto.h \
- rbtree.cpp rbtree.h \
- symbols.cpp symbols.h \
- interface.cpp interface.h
-nodist_libsciteco_base_a_SOURCES =
-
-if INTERFACE_GTK
-
-BUILT_SOURCES += gtk-info-popup.c \
- gtk-info-popup.h gtk-info-popup-private.h
-nodist_libsciteco_base_a_SOURCES += gtk-info-popup.c
-
-libsciteco_base_a_SOURCES += interface-gtk.cpp interface-gtk.h
-if GTK_FLOW_BOX_FALLBACK
-libsciteco_base_a_SOURCES += gtkflowbox.c gtkflowbox.h
-endif
-
-else
-# else must be Curses interface
-
-libsciteco_base_a_SOURCES += interface-curses.cpp interface-curses.h
-
-endif
+noinst_LTLIBRARIES = libsciteco-base.la
+libsciteco_base_la_SOURCES = main.cpp sciteco.h \
+ string-utils.cpp string-utils.h \
+ error.cpp error.h \
+ cmdline.cpp cmdline.h \
+ undo.cpp undo.h \
+ expressions.cpp expressions.h \
+ document.cpp document.h \
+ ioview.cpp ioview.h \
+ qregisters.cpp qregisters.h \
+ ring.cpp ring.h \
+ parser.cpp parser.h \
+ search.cpp search.h \
+ spawn.cpp spawn.h \
+ glob.cpp glob.h \
+ goto.cpp goto.h \
+ rbtree.cpp rbtree.h \
+ symbols.cpp symbols.h \
+ interface.cpp interface.h
+# NOTE: We cannot link in Scintilla (static library) into
+# a libtool convenience library
+libsciteco_base_la_LIBADD = $(LIBSCITECO_INTERFACE)
if BOOTSTRAP
noinst_PROGRAMS = sciteco-minimal
symbols-scintilla.cpp symbols-scilexer.cpp : sciteco-minimal$(EXEEXT)
endif
sciteco_minimal_SOURCES = symbols-minimal.cpp
-sciteco_minimal_LDADD = libsciteco-base.a \
- @SCINTILLA_PATH@/bin/scintilla.a
+sciteco_minimal_LDADD = libsciteco-base.la \
+ @SCINTILLA_PATH@/bin/scintilla.a
bin_PROGRAMS = sciteco
sciteco_SOURCES =
-nodist_sciteco_SOURCES = $(nodist_sciteco_minimal_SOURCES) \
- symbols-scintilla.cpp symbols-scilexer.cpp
+nodist_sciteco_SOURCES = symbols-scintilla.cpp symbols-scilexer.cpp
sciteco_LDADD = $(sciteco_minimal_LDADD)
# For MinGW: Compile in resource (contains the icon)
@@ -90,9 +72,6 @@ endif
CLEANFILES = $(BUILT_SOURCES) \
symbols-scintilla.cpp symbols-scilexer.cpp
-%.c %.h %-private.h : %.gob
- @GOB2@ --gtk3 $<
-
symbols-scintilla.cpp : @SCINTILLA_PATH@/include/Scintilla.h \
symbols-extract.tes
$(BOOTSTRAP_SCITECO) -m @srcdir@/symbols-extract.tes \