aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--check.mak18
-rw-r--r--win32/PlatWin.cxx6
-rw-r--r--win32/PlatWin.h6
3 files changed, 18 insertions, 12 deletions
diff --git a/check.mak b/check.mak
index e5ee2b5e9..60c9bdbf6 100644
--- a/check.mak
+++ b/check.mak
@@ -33,9 +33,10 @@ base_src_objs = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o \
PerLine.o PositionCache.o RESearch.o RunStyles.o \
ScintillaBase.o Selection.o Style.o UniConversion.o \
ViewStyle.o UniqueString.o XPM.o
-base_lexlib_objs = Accessor.o CharacterCategory.o CharacterSet.o LexerBase.o \
- LexerModule.o LexerNoExceptions.o LexerSimple.o \
- PropSetSimple.o StyleContext.o WordList.o
+base_lexlib_objs = Accessor.o CharacterCategory.o CharacterSet.o \
+ DefaultLexer.o LexerBase.o LexerModule.o \
+ LexerNoExceptions.o LexerSimple.o PropSetSimple.o \
+ StyleContext.o WordList.o
base_lexer_objs = $(addsuffix .o,$(basename $(sort $(notdir $(wildcard lexers/Lex*.cxx)))))
win32_src_objs = $(addprefix win32/, $(base_src_objs))
@@ -68,7 +69,7 @@ curses_lexer_objs_clang = $(addprefix curses/clang-, $(base_lexer_objs))
curses_plat_objs_clang = $(addprefix curses/clang-, $(notdir $(curses_plat_objs)))
all: | /tmp/scintilla
- $(MAKE) -C $| -f check.mak -j4 bin/scintilla_win32.a bin/scintilla_cocoa.a \
+ $(MAKE) -C $| -f check.mak -j4 bin/scintilla_win32.dll bin/scintilla_cocoa.a \
bin/scintilla_gtk.a bin/clang-scintilla_gtk.a bin/scintilla_curses.a \
bin/clang-scintilla_curses.a qt qt-clang
/tmp/scintilla:
@@ -82,9 +83,11 @@ all: | /tmp/scintilla
$@/gcc/4.8.4/lib/gcc/x86_64-linux-gnu/4.8.4/
# Windows platform objects.
-bin/scintilla_win32.a: $(win32_src_objs) $(win32_lexlib_objs) \
- $(win32_lexer_objs) $(win32_plat_objs)
- $(CROSS_WIN32)$(AR) rc $@ $^
+# Note: build a DLL to test linking.
+bin/scintilla_win32.dll: $(win32_src_objs) $(win32_lexlib_objs) \
+ $(win32_lexer_objs) $(win32_plat_objs)
+ $(CROSS_WIN32)$(CXX) -mwindows -shared -static -o $@ $^ -lgdi32 -luser32 \
+ -limm32 -lole32 -luuid -loleaut32 -lmsimg32 -lstdc++
touch $@
$(win32_src_objs): win32/%.o: src/%.cxx
$(win32_lexlib_objs): win32/%.o: lexlib/%.cxx
@@ -165,6 +168,7 @@ $(curses_plat_objs) $(curses_plat_objs_clang):
$(CXX) -c $(CXXFLAGS) -DCURSES -Wno-unused-parameter $< -o $@
# Qt platform objects. (Note: requires libqt4-dev qt4-qmake.)
+# Note: the Qt makefile produces shared libraries, so linking is tested.
.PHONY: qt qt-clang
qt: qt/ScintillaEditBase/Makefile
qt-clang: qt-clang/ScintillaEditBase/Makefile
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 44e758698..6553b7486 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -67,6 +67,12 @@ namespace Scintilla {
UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage);
+RECT RectFromPRectangle(PRectangle prc) noexcept {
+ RECT rc = { static_cast<LONG>(prc.left), static_cast<LONG>(prc.top),
+ static_cast<LONG>(prc.right), static_cast<LONG>(prc.bottom) };
+ return rc;
+}
+
#if defined(USE_D2D)
IDWriteFactory *pIDWriteFactory = nullptr;
ID2D1Factory *pD2DFactory = nullptr;
diff --git a/win32/PlatWin.h b/win32/PlatWin.h
index 2a1bcb649..cf357f72d 100644
--- a/win32/PlatWin.h
+++ b/win32/PlatWin.h
@@ -13,11 +13,7 @@ namespace Scintilla {
extern void Platform_Initialise(void *hInstance);
extern void Platform_Finalise(bool fromDllMain);
-RECT RectFromPRectangle(PRectangle prc) noexcept {
- RECT rc = { static_cast<LONG>(prc.left), static_cast<LONG>(prc.top),
- static_cast<LONG>(prc.right), static_cast<LONG>(prc.bottom) };
- return rc;
-}
+RECT RectFromPRectangle(PRectangle prc) noexcept;
#if defined(USE_D2D)
extern bool LoadD2D();