1 # Make file for Scintilla on Windows
2 # Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
3 # The License.txt file describes the conditions under which this software may be distributed.
4 # This makefile assumes the MinGW32 version of GCC 4.x is used and changes will
5 # be needed to use other compilers.
8 ifeq ($(OS
),Windows_NT
)
16 COMPONENT
= ..
/bin
/Scintilla.dll
17 LEXCOMPONENT
= ..
/bin
/SciLexer.dll
20 vpath
%.h ..
/src ..
/include ..
/lexlib
21 vpath
%.
cxx ..
/src ..
/lexlib ..
/lexers
23 LDFLAGS
=-shared
-static
-Wl
,--enable-runtime-pseudo-reloc-v2
-mwindows
-Wl
,--add-stdcall-alias
24 LIBS
=-lstdc
++ -limm32
-lole32
-luuid
25 # Add -MMD to get dependencies
26 INCLUDEDIRS
=-I ..
/include -I ..
/src
-I..
/lexlib
28 # Check if Direct2D headers are available by trying to compile a file that includes them.
29 # Most distributions of MinGW32 do not include Direct2D support but MinGW64 does.
30 ifneq "$(shell g++ -c CheckD2D.cxx 2>&1)" ""
31 D2DFLAGS
=-DDISABLE_D2D
34 CXXBASEFLAGS
=--std
=c
++0x
-Wall
-pedantic
$(INCLUDEDIRS
) -fno-rtti
$(D2DFLAGS
)
41 CXXFLAGS
=-DDEBUG
-g
$(CXXBASEFLAGS
)
43 CXXFLAGS
=-DNDEBUG
-Os
$(CXXBASEFLAGS
)
48 $(CXX
) $(CXXFLAGS
) $(REFLAGS
) -c
$<
50 ALL
: $(COMPONENT
) $(LEXCOMPONENT
) $(LEXLIB
) ScintillaWinS.o
53 $(DEL
) *.exe
*.o
*.obj
*.dll
*.res
*.map
*.plist
56 clang
--analyze
-D DISABLE_D2D
$(CXXFLAGS
) *.
cxx ..
/src
/*.
cxx ..
/lexlib
/*.
cxx ..
/lexers
/*.
cxx
59 $(CXX
) -MM
$(CXXFLAGS
) *.
cxx ..
/src
/*.
cxx ..
/lexlib
/*.
cxx ..
/lexers
/*.
cxx >deps.mak
61 LEXOBJS
:=$(addsuffix .o
,$(basename $(notdir $(wildcard ..
/lexers
/Lex
*.
cxx))))
96 SOBJS
= ScintillaWin.o ScintillaBase.o
$(BASEOBJS
)
98 $(COMPONENT
): $(SOBJS
) Scintilla.def
99 $(CXX
) $(LDFLAGS
) -o
$@
$(STRIPFLAG
) $(SOBJS
) $(CXXFLAGS
) $(LIBS
)
114 $(LEXCOMPONENT
): $(LOBJS
) Scintilla.def
115 $(CXX
) $(LDFLAGS
) -o
$@
$(STRIPFLAG
) $(LOBJS
) $(CXXFLAGS
) $(LIBS
)
117 $(LEXLIB
): $(LEXOBJS
)
121 # Automatically generate dependencies for most files with "make deps"
124 # These dependencies are maintained by hand as they do not use the default output name
126 ScintillaBaseL.o
: ScintillaBase.
cxx Platform.h \
127 ILexer.h Scintilla.h SciLexer.h PropSetSimple.h \
128 SplitVector.h Partitioning.h RunStyles.h \
129 ContractionState.h CellBuffer.h CallTip.h \
130 KeyMap.h Indicator.h XPM.h LineMarker.h \
131 Style.h ViewStyle.h AutoComplete.h \
132 CharClassify.h Decoration.h Document.h \
133 Selection.h PositionCache.h EditModel.h Editor.h EditView.h \
134 ScintillaBase.h LexAccessor.h Accessor.h \
135 LexerModule.h Catalogue.h CaseFolder.h
137 ScintillaWinL.o
: ScintillaWin.
cxx Platform.h \
138 ILexer.h Scintilla.h SplitVector.h \
139 Partitioning.h RunStyles.h ContractionState.h \
140 CellBuffer.h CallTip.h KeyMap.h Indicator.h \
141 XPM.h LineMarker.h Style.h AutoComplete.h \
142 ViewStyle.h CharClassify.h Decoration.h \
143 Document.h Selection.h PositionCache.h \
144 EditModel.h Editor.h EditView.h ScintillaBase.h UniConversion.h \
145 LexAccessor.h Accessor.h \
146 LexerModule.h Catalogue.h CaseConvert.h \
149 ScintillaWinS.o
: ScintillaWin.
cxx Platform.h \
150 ILexer.h Scintilla.h SplitVector.h \
151 Partitioning.h RunStyles.h ContractionState.h \
152 CellBuffer.h CallTip.h KeyMap.h Indicator.h \
153 XPM.h LineMarker.h Style.h AutoComplete.h \
154 ViewStyle.h CharClassify.h Decoration.h \
155 Document.h Selection.h PositionCache.h \
156 EditModel.h Editor.h EditView.h ScintillaBase.h UniConversion.h \
157 CaseConvert.h CaseFolder.h
160 $(CXX
) $(CXXFLAGS
) -D SCI_LEXER
-c
$< -o
$@
163 $(CXX
) $(CXXFLAGS
) -D STATIC_BUILD
-c
$< -o
$@
166 $(CXX
) $(CXXFLAGS
) -D SCI_LEXER
-c
$< -o
$@
168 ScintRes.o
: ScintRes.rc
169 $(WINDRES
) ScintRes.rc
$@