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.
10 COMPONENT
= ..
/bin
/Scintilla.dll
11 LEXCOMPONENT
= ..
/bin
/SciLexer.dll
14 vpath
%.h ..
/src ..
/include ..
/lexlib
15 vpath
%.
cxx ..
/src ..
/lexlib ..
/lexers
17 LDFLAGS
=-shared
-static
-Wl
,--enable-runtime-pseudo-reloc-v2
-mwindows
-Wl
,--add-stdcall-alias
18 LIBS
=-lstdc
++ -limm32
-lole32
-luuid
19 # Add -MMD to get dependencies
20 INCLUDEDIRS
=-I ..
/include -I ..
/src
-I..
/lexlib
22 # Check if Direct2D headers are available by trying to compile a file that includes them.
23 # Most distributions of MinGW32 do not include Direct2D support but MinGW64 does.
24 ifneq "$(shell g++ -c CheckD2D.cxx 2>&1)" ""
25 D2DFLAGS
=-DDISABLE_D2D
28 CXXBASEFLAGS
=--std
=c
++0x
-Wall
-pedantic
$(INCLUDEDIRS
) -fno-rtti
$(D2DFLAGS
)
31 CXXFLAGS
=-DDEBUG
-g
$(CXXBASEFLAGS
)
33 CXXFLAGS
=-DNDEBUG
-Os
$(CXXBASEFLAGS
)
38 $(CXX
) $(CXXFLAGS
) -c
$<
40 ALL
: $(COMPONENT
) $(LEXCOMPONENT
) $(LEXLIB
) ScintillaWinS.o
43 $(DEL
) *.exe
*.o
*.obj
*.dll
*.res
*.map
*.plist
46 clang
--analyze
-D DISABLE_D2D
$(CXXFLAGS
) *.
cxx ..
/src
/*.
cxx ..
/lexlib
/*.
cxx ..
/lexers
/*.
cxx
49 $(CXX
) -MM
$(CXXFLAGS
) *.
cxx ..
/src
/*.
cxx ..
/lexlib
/*.
cxx ..
/lexers
/*.
cxx >deps.mak
51 LEXOBJS
:=$(addsuffix .o
,$(basename $(notdir $(wildcard ..
/lexers
/Lex
*.
cxx))))
83 SOBJS
= ScintillaWin.o ScintillaBase.o
$(BASEOBJS
)
85 $(COMPONENT
): $(SOBJS
) Scintilla.def
86 $(CXX
) $(LDFLAGS
) -o
$@
$(STRIPFLAG
) $(SOBJS
) $(CXXFLAGS
) $(LIBS
)
101 $(LEXCOMPONENT
): $(LOBJS
) Scintilla.def
102 $(CXX
) $(LDFLAGS
) -o
$@
$(STRIPFLAG
) $(LOBJS
) $(CXXFLAGS
) $(LIBS
)
104 $(LEXLIB
): $(LEXOBJS
)
108 # Automatically generate dependencies for most files with "make deps"
111 # These dependencies are maintained by hand as they do not use the default output name
113 ScintillaBaseL.o
: ScintillaBase.
cxx Platform.h \
114 ILexer.h Scintilla.h SciLexer.h PropSetSimple.h \
115 SplitVector.h Partitioning.h RunStyles.h \
116 ContractionState.h CellBuffer.h CallTip.h \
117 KeyMap.h Indicator.h XPM.h LineMarker.h \
118 Style.h ViewStyle.h AutoComplete.h \
119 CharClassify.h Decoration.h Document.h \
120 Selection.h PositionCache.h Editor.h \
121 ScintillaBase.h LexAccessor.h Accessor.h \
122 LexerModule.h Catalogue.h CaseFolder.h
124 ScintillaWinL.o
: ScintillaWin.
cxx Platform.h \
125 ILexer.h Scintilla.h SplitVector.h \
126 Partitioning.h RunStyles.h ContractionState.h \
127 CellBuffer.h CallTip.h KeyMap.h Indicator.h \
128 XPM.h LineMarker.h Style.h AutoComplete.h \
129 ViewStyle.h CharClassify.h Decoration.h \
130 Document.h Selection.h PositionCache.h \
131 Editor.h ScintillaBase.h UniConversion.h \
132 LexAccessor.h Accessor.h \
133 LexerModule.h Catalogue.h CaseConvert.h \
136 ScintillaWinS.o
: ScintillaWin.
cxx Platform.h \
137 ILexer.h Scintilla.h SplitVector.h \
138 Partitioning.h RunStyles.h ContractionState.h \
139 CellBuffer.h CallTip.h KeyMap.h Indicator.h \
140 XPM.h LineMarker.h Style.h AutoComplete.h \
141 ViewStyle.h CharClassify.h Decoration.h \
142 Document.h Selection.h PositionCache.h \
143 Editor.h ScintillaBase.h UniConversion.h \
144 CaseConvert.h CaseFolder.h
147 $(CXX
) $(CXXFLAGS
) -D SCI_LEXER
-c
$< -o
$@
150 $(CXX
) $(CXXFLAGS
) -D STATIC_BUILD
-c
$< -o
$@
153 $(CXX
) $(CXXFLAGS
) -D SCI_LEXER
-c
$< -o
$@
155 ScintRes.o
: ScintRes.rc
156 windres ScintRes.rc
$@