aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaDoc.html7
-rw-r--r--gtk/makefile13
-rw-r--r--win32/makefile50
-rw-r--r--win32/scintilla.mak29
4 files changed, 57 insertions, 42 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index f9bc4259e..633508035 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -8285,8 +8285,8 @@ EM_SETTARGETDEVICE
<p>To build Scintilla or SciTE, see the README file present in both the Scintilla and SciTE
directories.
- The compiler must support C++14.
- For Windows, GCC 7.1 or Microsoft Visual C++ 2017 can be used
+ The compiler must support C++17.
+ For Windows, GCC 7.1 or Microsoft Visual C++ 2017.5 can be used
for building. For GTK+, GCC 7.1 or newer should be used. GTK+ 2.24 and 3.x are
supported with glib 2.22+. The version of GTK+ installed should be detected automatically.
When both GTK+ 2 and GTK+ 3 are present, building for GTK+ 3.x requires defining GTK3
@@ -8295,7 +8295,8 @@ EM_SETTARGETDEVICE
<h3>Static linking</h3>
<p>On Windows, Scintilla is normally used as a dynamic library as a .DLL file. If you want to
- link Scintilla directly into your application .EXE or .DLL file, then the
+ link Scintilla directly into your application .EXE or .DLL file, then you can link to the static library
+ bin/libscintilla.lib (or .a if using GCC) and call <code>Scintilla_RegisterClasses</code>. Otherwise, if using an IDE or other build system, then the
<code>STATIC_BUILD</code> preprocessor symbol should be defined and
<code>Scintilla_RegisterClasses</code> called. <code>STATIC_BUILD</code> prevents compiling the
<code>DllMain</code> function which will conflict with any <code>DllMain</code> defined in your
diff --git a/gtk/makefile b/gtk/makefile
index 37ed063c5..f2dd23736 100644
--- a/gtk/makefile
+++ b/gtk/makefile
@@ -6,9 +6,10 @@
# Builds for GTK+ 2 and no longer supports GTK+ 1.
# Also works with ming32-make on Windows.
+.SUFFIXES: .cxx .c .o .h .a .list
+
srcdir ?= .
-.SUFFIXES: .cxx .c .o .h .a .list
ifdef CLANG
CXX = clang++
CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register -Wno-missing-braces
@@ -86,6 +87,11 @@ CXXTFLAGS:=--std=gnu++17 $(CTFLAGS) $(REFLAGS)
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
MARSHALLER=scintilla-marshal.o
+all: $(COMPLIB)
+
+clean:
+ $(DEL) *.o $(COMPLIB) *.plist
+
.cxx.o:
$(CXX) $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) -c $<
.c.o:
@@ -101,11 +107,6 @@ GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal
LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard $(srcdir)/../lexers/Lex*.cxx)))))
-all: $(COMPLIB)
-
-clean:
- $(DEL) *.o $(COMPLIB) *.plist
-
analyze:
clang --analyze $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(srcdir)/../src/*.cxx $(srcdir)/../lexlib/*.cxx $(srcdir)/../lexers/*.cxx
diff --git a/win32/makefile b/win32/makefile
index 9849ebf89..1550484dc 100644
--- a/win32/makefile
+++ b/win32/makefile
@@ -4,6 +4,14 @@
# This makefile assumes the Mingw-w64 version of GCC 7.1+ is used and changes will
# be needed to use other compilers.
+.SUFFIXES: .cxx
+
+DIR_BIN=../bin
+
+COMPONENT = $(DIR_BIN)/Scintilla.dll
+LEXCOMPONENT = $(DIR_BIN)/SciLexer.dll
+LIBSCI = $(DIR_BIN)/libscintilla.a
+
ifdef CLANG
# Common location for 32-bit clang on Windows
CXX = "C:\Program Files (x86)\LLVM\bin\clang++"
@@ -16,7 +24,6 @@ STRIPOPTION = -s
CXXSTD = gnu++17
endif
-.SUFFIXES: .cxx
ifeq ($(OS),Windows_NT)
DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
else
@@ -25,10 +32,6 @@ endif
RANLIB ?= ranlib
WINDRES ?= windres
-COMPONENT = ../bin/Scintilla.dll
-LEXCOMPONENT = ../bin/SciLexer.dll
-LEXLIB = Lexers.a
-
vpath %.h ../src ../include ../lexlib
vpath %.cxx ../src ../lexlib ../lexers
@@ -60,13 +63,13 @@ CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
STRIPFLAG=$(STRIPOPTION)
endif
-.cxx.o:
- $(CXX) $(CXXFLAGS) $(REFLAGS) -c $<
-
-ALL: $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o
+all: $(COMPONENT) $(LEXCOMPONENT) $(LIBSCI)
clean:
- $(DEL) *.exe *.o *.obj *.dll *.res *.map *.plist
+ $(DEL) *.exe *.o *.a *.obj *.dll *.res *.map *.plist
+
+.cxx.o:
+ $(CXX) $(CXXFLAGS) $(REFLAGS) -c $<
analyze:
$(CXX) --analyze $(D2DFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx
@@ -76,7 +79,7 @@ deps:
LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard ../lexers/Lex*.cxx)))))
-
+# Required for base Scintilla
BASEOBJS = \
AutoComplete.o \
CallTip.o \
@@ -113,10 +116,8 @@ BASEOBJS = \
SOBJS = ScintillaWin.o ScintillaBase.o $(BASEOBJS)
-$(COMPONENT): $(SOBJS) Scintilla.def
- $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS)
-
-LOBJS = \
+# Required by lexers
+LEXLIBOBJS=\
Accessor.o \
Catalogue.o \
ExternalLexer.o \
@@ -124,16 +125,23 @@ LOBJS = \
LexerBase.o \
LexerModule.o \
LexerSimple.o \
- ScintillaWinL.o \
- ScintillaBaseL.o \
StyleContext.o \
WordList.o \
+
+# Required by libraries and DLLs that include lexing
+SCILEXOBJS=\
$(BASEOBJS) \
- $(LEXOBJS)
-$(LEXCOMPONENT): $(LOBJS) Scintilla.def
- $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(LOBJS) $(CXXFLAGS) $(LIBS)
+ $(LEXLIBOBJS) \
+ $(LEXOBJS) \
+ ScintillaBaseL.o
+
+$(COMPONENT): $(SOBJS) Scintilla.def
+ $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS)
+
+$(LEXCOMPONENT): ScintillaWinL.o $(SCILEXOBJS) Scintilla.def
+ $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) ScintillaWinL.o $(SCILEXOBJS) $(CXXFLAGS) $(LIBS)
-$(LEXLIB): $(LEXOBJS)
+$(LIBSCI): ScintillaWinS.o $(SCILEXOBJS)
$(AR) rc $@ $^
$(RANLIB) $@
diff --git a/win32/scintilla.mak b/win32/scintilla.mak
index 38755602d..29f882032 100644
--- a/win32/scintilla.mak
+++ b/win32/scintilla.mak
@@ -15,7 +15,7 @@ DIR_BIN=..\bin
COMPONENT=$(DIR_BIN)\Scintilla.dll
LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll
-LEXLIB=Lexers.lib
+LIBSCI=$(DIR_BIN)\libscintilla.lib
LD=link
@@ -63,13 +63,14 @@ CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)
INCLUDEDIRS=-I../include -I../src -I../lexlib
CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS)
-ALL: $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) $(DIR_O)\ScintillaWinS.obj
+all: $(COMPONENT) $(LEXCOMPONENT) $(LIBSCI)
clean:
-del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) \
$(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb $(DIR_BIN)\*.lib
-SHAREDOBJS=\
+# Required for base Scintilla
+BASEOBJS=\
$(DIR_O)\AutoComplete.obj \
$(DIR_O)\CallTip.obj \
$(DIR_O)\CaseConvert.obj \
@@ -103,7 +104,7 @@ SHAREDOBJS=\
$(DIR_O)\HanjaDic.obj \
SOBJS=\
- $(SHAREDOBJS) \
+ $(BASEOBJS) \
$(DIR_O)\ScintillaBase.obj \
$(DIR_O)\ScintillaWin.obj
@@ -219,8 +220,8 @@ LEXOBJS=\
#--Autogenerated -- end of automatically generated section
-LOBJS=\
- $(SHAREDOBJS) \
+# Required by lexers
+LEXLIBOBJS=\
$(DIR_O)\Accessor.obj \
$(DIR_O)\Catalogue.obj \
$(DIR_O)\ExternalLexer.obj \
@@ -230,9 +231,13 @@ LOBJS=\
$(DIR_O)\LexerSimple.obj \
$(DIR_O)\StyleContext.obj \
$(DIR_O)\WordList.obj \
- $(DIR_O)\ScintillaBaseL.obj \
- $(DIR_O)\ScintillaWinL.obj \
- $(LEXOBJS)
+
+# Required by libraries and DLLs that include lexing
+SCILEXOBJS=\
+ $(BASEOBJS) \
+ $(LEXLIBOBJS) \
+ $(LEXOBJS) \
+ $(DIR_O)\ScintillaBaseL.obj
$(DIR_O)\ScintRes.res : ScintRes.rc
$(RC) -fo$@ $**
@@ -240,11 +245,11 @@ $(DIR_O)\ScintRes.res : ScintRes.rc
$(COMPONENT): $(SOBJS) $(DIR_O)\ScintRes.res
$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)
-$(LEXCOMPONENT): $(LOBJS) $(DIR_O)\ScintRes.res
+$(LEXCOMPONENT): $(SCILEXOBJS) $(DIR_O)\ScintillaWinL.obj $(DIR_O)\ScintRes.res
$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)
-$(LEXLIB): $(LEXOBJS)
- LIB /OUT:$@ $(LEXOBJS)
+$(LIBSCI): $(SCILEXOBJS) $(DIR_O)\ScintillaWinS.obj
+ LIB /OUT:$@ $**
# Define how to build all the objects and what they depend on