Update Scintilla to version 3.4.4
[TortoiseGit.git] / ext / scintilla / win32 / makefile
blob20ec9d8a3b725a8d09e7e08203f0d8f83b3c06a8
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.
7 .SUFFIXES: .cxx
8 DEL ?= del /q
10 COMPONENT = ../bin/Scintilla.dll
11 LEXCOMPONENT = ../bin/SciLexer.dll
12 LEXLIB = Lexers.a
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
26 endif
28 CXXBASEFLAGS=--std=c++0x -Wall -pedantic $(INCLUDEDIRS) -fno-rtti $(D2DFLAGS)
30 ifdef DEBUG
31 CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
32 else
33 CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
34 STRIPFLAG=-s
35 endif
37 .cxx.o:
38 $(CXX) $(CXXFLAGS) -c $<
40 ALL: $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o
42 clean:
43 $(DEL) *.exe *.o *.obj *.dll *.res *.map *.plist
45 analyze:
46 clang --analyze -D DISABLE_D2D $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx
48 deps:
49 $(CXX) -MM $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx >deps.mak
51 LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
54 BASEOBJS = \
55 AutoComplete.o \
56 CallTip.o \
57 CaseConvert.o \
58 CaseFolder.o \
59 CellBuffer.o \
60 CharacterCategory.o \
61 CharacterSet.o \
62 CharClassify.o \
63 ContractionState.o \
64 Decoration.o \
65 Document.o \
66 Editor.o \
67 KeyMap.o \
68 Indicator.o \
69 LineMarker.o \
70 PerLine.o \
71 PlatWin.o \
72 PositionCache.o \
73 PropSetSimple.o \
74 RESearch.o \
75 RunStyles.o \
76 ScintRes.o \
77 Selection.o \
78 Style.o \
79 UniConversion.o \
80 ViewStyle.o \
81 XPM.o
83 SOBJS = ScintillaWin.o ScintillaBase.o $(BASEOBJS)
85 $(COMPONENT): $(SOBJS) Scintilla.def
86 $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS)
88 LOBJS = \
89 Accessor.o \
90 Catalogue.o \
91 ExternalLexer.o \
92 LexerBase.o \
93 LexerModule.o \
94 LexerSimple.o \
95 ScintillaWinL.o \
96 ScintillaBaseL.o \
97 StyleContext.o \
98 WordList.o \
99 $(BASEOBJS) \
100 $(LEXOBJS)
101 $(LEXCOMPONENT): $(LOBJS) Scintilla.def
102 $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(LOBJS) $(CXXFLAGS) $(LIBS)
104 $(LEXLIB): $(LEXOBJS)
105 $(AR) rc $@ $^
106 ranlib $@
108 # Automatically generate dependencies for most files with "make deps"
109 include deps.mak
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 \
134 CaseFolder.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
146 ScintillaBaseL.o:
147 $(CXX) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@
149 ScintillaWinS.o:
150 $(CXX) $(CXXFLAGS) -D STATIC_BUILD -c $< -o $@
152 ScintillaWinL.o:
153 $(CXX) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@
155 ScintRes.o: ScintRes.rc
156 windres ScintRes.rc $@