aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
blob: 314faa45e14dd250a5e13bb735374cae55219bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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_CXXFLAGS = -std=c++11 -Wall -Wno-char-subscripts
if CLANG
AM_CXXFLAGS += -Wno-mismatched-tags
endif

if STATIC_EXECUTABLES
# AM_LDFLAGS are libtool flags, NOT compiler/linker flags
AM_LDFLAGS = -all-static
endif

BUILT_SOURCES =

EXTRA_DIST = symbols-extract.tes \
	     sciteco.html

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 \
                             eol.cpp eol.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 \
                             help.cpp help.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.la \
                        @SCINTILLA_PATH@/bin/scintilla.a

bin_PROGRAMS = sciteco
sciteco_SOURCES =
nodist_sciteco_SOURCES = symbols-scintilla.cpp symbols-scilexer.cpp
sciteco_LDADD = $(sciteco_minimal_LDADD)

# For MinGW: Compile in resource (contains the icon)
if WIN32
sciteco_SOURCES += sciteco.rc
.rc.o:
	@RC@ $< $@
endif

CLEANFILES = $(BUILT_SOURCES) \
	     symbols-scintilla.cpp symbols-scilexer.cpp

symbols-scintilla.cpp : @SCINTILLA_PATH@/include/Scintilla.h \
			symbols-extract.tes
	$(SCITECO_MINIMAL) -m @srcdir@/symbols-extract.tes \
	                   $< $@ "SCI_" scintilla

symbols-scilexer.cpp : @SCINTILLA_PATH@/include/SciLexer.h \
		       symbols-extract.tes
	$(SCITECO_MINIMAL) -m @srcdir@/symbols-extract.tes \
	                   $< $@ "SCLEX_,SCE_" scilexer