aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/makefile
blob: a428e594e28aa03ac1e190ff750cc2cc387a3860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Make file for Scintilla on Windows
# Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile assumes the mingw32 version of GCC 2.95.3 is used and changes will
# be needed to use other compilers.
# The -fvtable-thunks option is required for older (2.9*) versions of gcc but can be removed
# safely if using a newer version which may display warning messages.

.SUFFIXES: .cxx
CC = g++
DLLWRAP = dllwrap

COMPONENT = ../bin/Scintilla.dll
LEXCOMPONENT = ../bin/SciLexer.dll
LEXLIB = Lexers.a

ifndef NOTHUNKS
gversion = $(word 1,$(subst ., ,$(shell g++ --version)))
ifeq ($(gversion),2)
THUNKFLAGS=-fvtable-thunks
endif
endif

vpath %.h ../src ../include
vpath %.cxx ../src

LDFLAGS=-mwindows -lstdc++ -limm32 -lole32 -luuid
# Add -MMD to get dependencies
#CXXFLAGS = -g -pg -pedantic -Os -fno-exceptions -fvtable-thunks -fno-rtti
INCLUDEDIRS=-I ../include -I ../src
CXXBASEFLAGS = -W -Wall -pedantic $(INCLUDEDIRS) -Os -fno-exceptions $(THUNKFLAGS) -fno-rtti

ifdef DEBUG
CXXFLAGS=-DDEBUG $(CXXBASEFLAGS)
else
CXXFLAGS=-DNDEBUG $(CXXBASEFLAGS)
endif

.cxx.o:
	$(CC) $(CXXFLAGS) -c $<

ALL:	$(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o WindowAccessor.o

clean:
	del /q *.exe *.o *.obj *.dll *.res *.map

deps:
	$(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak

#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\*.o \)
LEXOBJS=\
LexAda.o LexAsm.o LexAVE.o LexBaan.o LexBullant.o LexCLW.o LexConf.o LexCPP.o \
LexCrontab.o LexCSS.o LexEiffel.o LexEScript.o LexForth.o LexFortran.o \
LexHTML.o LexLisp.o LexLout.o LexLua.o LexMatlab.o LexMetapost.o LexMMIXAL.o \
LexMPT.o LexNsis.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPOV.o LexPS.o \
LexPython.o LexRuby.o LexScriptol.o LexSQL.o LexTeX.o LexVB.o LexYAML.o 
#--Autogenerated -- end of automatically generated section

SOBJS	= ScintillaWin.o ScintillaBase.o Editor.o Document.o \
	ContractionState.o CellBuffer.o CallTip.o \
	ScintRes.o PlatWin.o KeyMap.o Indicator.o LineMarker.o RESearch.o \
	Style.o ViewStyle.o AutoComplete.o UniConversion.o PropSet.o XPM.o
$(COMPONENT): $(SOBJS) Scintilla.def
	$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(SOBJS) $(LDFLAGS) -s --relocatable

LOBJS	= ScintillaWinL.o ScintillaBaseL.o Editor.o Document.o \
	ContractionState.o CellBuffer.o CallTip.o \
	ScintRes.o PlatWin.o KeyMap.o Indicator.o LineMarker.o RESearch.o \
	Style.o ViewStyle.o AutoComplete.o UniConversion.o KeyWords.o \
	DocumentAccessor.o PropSet.o ExternalLexer.o StyleContext.o XPM.o $(LEXOBJS)
$(LEXCOMPONENT): $(LOBJS) Scintilla.def
	$(DLLWRAP) --add-stdcall-alias --target i386-mingw32 -o $@ $(LOBJS) $(LDFLAGS) -s --relocatable

$(LEXLIB): $(LEXOBJS)
	$(AR) rc $@ $^
	ranlib $@

# Automatically generate dependencies for most files with "make deps"
include deps.mak

# These dependencies are maintained by hand as they do not use the default output name
ScintillaBaseL.o: ScintillaBase.cxx Platform.h Scintilla.h SciLexer.h \
 ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
 LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
 ScintillaBase.h PropSet.h SString.h Accessor.h DocumentAccessor.h \
 KeyWords.h ExternalLexer.h
ScintillaWinL.o: ScintillaWin.cxx Platform.h Scintilla.h SciLexer.h \
 ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
 LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
 ScintillaBase.h PropSet.h SString.h Accessor.h KeyWords.h \
 ExternalLexer.h UniConversion.h
ScintillaWinS.o: ScintillaWin.cxx Platform.h Scintilla.h \
 ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
 LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
 ScintillaBase.h UniConversion.h

ScintillaBaseL.o:
	$(CC) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@

ScintillaWinS.o:
	$(CC) $(CXXFLAGS) -D STATIC_BUILD -c $< -o $@

ScintillaWinL.o:
	$(CC) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@

ScintRes.o:	ScintRes.rc PlatformRes.h
	windres ScintRes.rc $@