2009-04-24 23:35:41 +00:00
|
|
|
# Make file for Scintilla on Windows
|
2010-07-12 22:19:51 +00:00
|
|
|
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
2009-04-24 23:35:41 +00:00
|
|
|
# The License.txt file describes the conditions under which this software may be distributed.
|
2010-07-12 22:19:51 +00:00
|
|
|
# This makefile assumes the mingw32 version of GCC 3.x or 4.x is used and changes will
|
2009-04-24 23:35:41 +00:00
|
|
|
# be needed to use other compilers.
|
|
|
|
|
|
|
|
.SUFFIXES: .cxx
|
|
|
|
CC = g++
|
|
|
|
DEL = del /q
|
|
|
|
|
|
|
|
COMPONENT = ../bin/Scintilla.dll
|
|
|
|
LEXCOMPONENT = ../bin/SciLexer.dll
|
|
|
|
LEXLIB = Lexers.a
|
|
|
|
|
2010-08-21 23:59:56 +00:00
|
|
|
vpath %.h ../src ../include ../lexlib
|
|
|
|
vpath %.cxx ../src ../lexlib ../lexers
|
2009-04-24 23:35:41 +00:00
|
|
|
|
2010-09-05 22:56:27 +00:00
|
|
|
LDFLAGS=-shared -static -Wl,--enable-runtime-pseudo-reloc-v2 -mno-cygwin -mwindows --relocatable -Wl,--add-stdcall-alias
|
|
|
|
LIBS=-lstdc++ -limm32 -lole32 -luuid
|
2009-04-24 23:35:41 +00:00
|
|
|
# Add -MMD to get dependencies
|
2010-08-21 23:59:56 +00:00
|
|
|
INCLUDEDIRS=-I ../include -I ../src -I../lexlib
|
2010-07-12 22:19:51 +00:00
|
|
|
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -Wno-strict-overflow -pedantic $(INCLUDEDIRS) -fno-rtti -mno-cygwin
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
ifdef DEBUG
|
2009-08-23 02:24:48 +00:00
|
|
|
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
|
2009-04-24 23:35:41 +00:00
|
|
|
else
|
2009-08-23 02:24:48 +00:00
|
|
|
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
|
|
|
|
STRIPFLAG=-s
|
2009-04-24 23:35:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
.cxx.o:
|
|
|
|
$(CC) $(CXXFLAGS) -c $<
|
|
|
|
|
2010-08-21 23:59:56 +00:00
|
|
|
ALL: $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(DEL) *.exe *.o *.obj *.dll *.res *.map
|
|
|
|
|
|
|
|
deps:
|
2010-08-21 23:59:56 +00:00
|
|
|
$(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx >deps.mak
|
|
|
|
|
|
|
|
LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
|
|
|
|
|
|
|
|
|
|
|
|
BASEOBJS = \
|
|
|
|
AutoComplete.o \
|
|
|
|
CallTip.o \
|
|
|
|
CellBuffer.o \
|
|
|
|
CharacterSet.o \
|
|
|
|
CharClassify.o \
|
|
|
|
ContractionState.o \
|
|
|
|
Decoration.o \
|
|
|
|
Document.o \
|
|
|
|
Editor.o \
|
|
|
|
KeyMap.o \
|
|
|
|
Indicator.o \
|
|
|
|
LineMarker.o \
|
|
|
|
PerLine.o \
|
|
|
|
PlatWin.o \
|
|
|
|
PositionCache.o \
|
|
|
|
PropSetSimple.o \
|
|
|
|
RESearch.o \
|
|
|
|
RunStyles.o \
|
|
|
|
ScintRes.o \
|
|
|
|
Selection.o \
|
|
|
|
Style.o \
|
|
|
|
UniConversion.o \
|
|
|
|
ViewStyle.o \
|
|
|
|
XPM.o
|
|
|
|
|
|
|
|
SOBJS = ScintillaWin.o ScintillaBase.o $(BASEOBJS)
|
2009-04-24 23:35:41 +00:00
|
|
|
|
2010-08-21 23:59:56 +00:00
|
|
|
$(COMPONENT): $(SOBJS) Scintilla.def
|
2010-09-05 22:56:27 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS)
|
2010-08-21 23:59:56 +00:00
|
|
|
|
|
|
|
LOBJS = \
|
|
|
|
Accessor.o \
|
|
|
|
Catalogue.o \
|
|
|
|
ExternalLexer.o \
|
|
|
|
LexerBase.o \
|
|
|
|
LexerModule.o \
|
|
|
|
LexerSimple.o \
|
|
|
|
ScintillaWinL.o \
|
|
|
|
ScintillaBaseL.o \
|
|
|
|
StyleContext.o \
|
|
|
|
WordList.o \
|
|
|
|
$(BASEOBJS) \
|
|
|
|
$(LEXOBJS)
|
2009-04-24 23:35:41 +00:00
|
|
|
$(LEXCOMPONENT): $(LOBJS) Scintilla.def
|
2010-09-05 22:56:27 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(STRIPFLAG) $(LOBJS) $(CXXFLAGS) $(LIBS)
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
$(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
|
2010-08-21 23:59:56 +00:00
|
|
|
|
|
|
|
ScintillaBaseL.o: ScintillaBase.cxx Platform.h \
|
|
|
|
ILexer.h Scintilla.h SciLexer.h PropSetSimple.h \
|
|
|
|
SplitVector.h Partitioning.h RunStyles.h \
|
|
|
|
ContractionState.h CellBuffer.h CallTip.h \
|
|
|
|
KeyMap.h Indicator.h XPM.h LineMarker.h \
|
|
|
|
Style.h ViewStyle.h AutoComplete.h \
|
|
|
|
CharClassify.h Decoration.h Document.h \
|
|
|
|
Selection.h PositionCache.h Editor.h \
|
|
|
|
ScintillaBase.h LexAccessor.h Accessor.h \
|
|
|
|
LexerModule.h Catalogue.h
|
|
|
|
|
|
|
|
ScintillaWinL.o: ScintillaWin.cxx Platform.h \
|
|
|
|
ILexer.h Scintilla.h SplitVector.h \
|
|
|
|
Partitioning.h RunStyles.h ContractionState.h \
|
|
|
|
CellBuffer.h CallTip.h KeyMap.h Indicator.h \
|
|
|
|
XPM.h LineMarker.h Style.h AutoComplete.h \
|
|
|
|
ViewStyle.h CharClassify.h Decoration.h \
|
|
|
|
Document.h Selection.h PositionCache.h \
|
|
|
|
Editor.h ScintillaBase.h UniConversion.h \
|
|
|
|
LexAccessor.h Accessor.h \
|
|
|
|
LexerModule.h Catalogue.h
|
|
|
|
|
|
|
|
ScintillaWinS.o: ScintillaWin.cxx Platform.h \
|
|
|
|
ILexer.h Scintilla.h SplitVector.h \
|
|
|
|
Partitioning.h RunStyles.h ContractionState.h \
|
|
|
|
CellBuffer.h CallTip.h KeyMap.h Indicator.h \
|
|
|
|
XPM.h LineMarker.h Style.h AutoComplete.h \
|
|
|
|
ViewStyle.h CharClassify.h Decoration.h \
|
|
|
|
Document.h Selection.h PositionCache.h \
|
|
|
|
Editor.h ScintillaBase.h UniConversion.h
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
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 $@
|
|
|
|
|