92bad0a60a
Fix #5822
294 lines
7.9 KiB
Makefile
294 lines
7.9 KiB
Makefile
# Make file for Scintilla on Windows Visual C++ version
|
|
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
|
# The License.txt file describes the conditions under which this software may be distributed.
|
|
# This makefile is for using Visual C++ with nmake.
|
|
# Usage for Microsoft:
|
|
# nmake -f scintilla.mak
|
|
# For debug versions define DEBUG on the command line:
|
|
# nmake DEBUG=1 -f scintilla.mak
|
|
# The main makefile uses mingw32 gcc and may be more current than this file.
|
|
|
|
.SUFFIXES: .cxx
|
|
|
|
DIR_O=.
|
|
DIR_BIN=..\bin
|
|
|
|
COMPONENT=$(DIR_BIN)\Scintilla.dll
|
|
LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll
|
|
LIBSCI=$(DIR_BIN)\libscintilla.lib
|
|
|
|
LD=link
|
|
|
|
!IFDEF SUPPORT_XP
|
|
XP_DEFINE=-D_USING_V110_SDK71_
|
|
XP_LINK=-SUBSYSTEM:WINDOWS,5.01
|
|
!ENDIF
|
|
|
|
CRTFLAGS=-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_DEPRECATE=1 -D_SCL_SECURE_NO_WARNINGS=1 $(XP_DEFINE)
|
|
CXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 $(CRTFLAGS)
|
|
CXXDEBUG=-Od -MTd -DDEBUG
|
|
CXXNDEBUG=-O1 -MT -DNDEBUG -GL
|
|
NAME=-Fo
|
|
LDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(XP_LINK)
|
|
LDDEBUG=
|
|
LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.lib OLEAUT32.lib MSIMG32.lib
|
|
NOLOGO=-nologo
|
|
|
|
!IFDEF QUIET
|
|
CXX=@$(CXX)
|
|
CXXFLAGS=$(CXXFLAGS) $(NOLOGO)
|
|
LDFLAGS=$(LDFLAGS) $(NOLOGO)
|
|
!ENDIF
|
|
|
|
!IFDEF NO_CXX11_REGEX
|
|
CXXFLAGS=$(CXXFLAGS) -DNO_CXX11_REGEX
|
|
!ENDIF
|
|
|
|
!IFDEF DEBUG
|
|
CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
|
|
LDFLAGS=$(LDDEBUG) $(LDFLAGS)
|
|
!ELSE
|
|
CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)
|
|
!ENDIF
|
|
|
|
INCLUDEDIRS=-I../include -I../src -I../lexlib
|
|
CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS)
|
|
|
|
all: $(COMPONENT) $(LEXCOMPONENT) $(LIBSCI)
|
|
|
|
clean:
|
|
-del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(DIR_O)\*.asm $(COMPONENT) $(LEXCOMPONENT) \
|
|
$(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb $(DIR_BIN)\*.lib
|
|
|
|
depend:
|
|
python DepGen.py
|
|
|
|
# Required for base Scintilla
|
|
BASEOBJS=\
|
|
$(DIR_O)\AutoComplete.obj \
|
|
$(DIR_O)\CallTip.obj \
|
|
$(DIR_O)\CaseConvert.obj \
|
|
$(DIR_O)\CaseFolder.obj \
|
|
$(DIR_O)\CellBuffer.obj \
|
|
$(DIR_O)\CharacterCategory.obj \
|
|
$(DIR_O)\CharacterSet.obj \
|
|
$(DIR_O)\CharClassify.obj \
|
|
$(DIR_O)\ContractionState.obj \
|
|
$(DIR_O)\DBCS.obj \
|
|
$(DIR_O)\Decoration.obj \
|
|
$(DIR_O)\Document.obj \
|
|
$(DIR_O)\EditModel.obj \
|
|
$(DIR_O)\Editor.obj \
|
|
$(DIR_O)\EditView.obj \
|
|
$(DIR_O)\Indicator.obj \
|
|
$(DIR_O)\KeyMap.obj \
|
|
$(DIR_O)\LineMarker.obj \
|
|
$(DIR_O)\MarginView.obj \
|
|
$(DIR_O)\PerLine.obj \
|
|
$(DIR_O)\PlatWin.obj \
|
|
$(DIR_O)\PositionCache.obj \
|
|
$(DIR_O)\PropSetSimple.obj \
|
|
$(DIR_O)\RESearch.obj \
|
|
$(DIR_O)\RunStyles.obj \
|
|
$(DIR_O)\Selection.obj \
|
|
$(DIR_O)\Style.obj \
|
|
$(DIR_O)\UniConversion.obj \
|
|
$(DIR_O)\UniqueString.obj \
|
|
$(DIR_O)\ViewStyle.obj \
|
|
$(DIR_O)\XPM.obj \
|
|
$(DIR_O)\HanjaDic.obj \
|
|
|
|
SOBJS=\
|
|
$(BASEOBJS) \
|
|
$(DIR_O)\ScintillaBase.obj \
|
|
$(DIR_O)\ScintillaWin.obj \
|
|
$(DIR_O)\ScintillaDLL.obj
|
|
|
|
#++Autogenerated -- run scripts/LexGen.py to regenerate
|
|
#**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\)
|
|
LEXOBJS=\
|
|
$(DIR_O)\LexA68k.obj \
|
|
$(DIR_O)\LexAbaqus.obj \
|
|
$(DIR_O)\LexAda.obj \
|
|
$(DIR_O)\LexAPDL.obj \
|
|
$(DIR_O)\LexAsm.obj \
|
|
$(DIR_O)\LexAsn1.obj \
|
|
$(DIR_O)\LexASY.obj \
|
|
$(DIR_O)\LexAU3.obj \
|
|
$(DIR_O)\LexAVE.obj \
|
|
$(DIR_O)\LexAVS.obj \
|
|
$(DIR_O)\LexBaan.obj \
|
|
$(DIR_O)\LexBash.obj \
|
|
$(DIR_O)\LexBasic.obj \
|
|
$(DIR_O)\LexBatch.obj \
|
|
$(DIR_O)\LexBibTeX.obj \
|
|
$(DIR_O)\LexBullant.obj \
|
|
$(DIR_O)\LexCaml.obj \
|
|
$(DIR_O)\LexCIL.obj \
|
|
$(DIR_O)\LexCLW.obj \
|
|
$(DIR_O)\LexCmake.obj \
|
|
$(DIR_O)\LexCOBOL.obj \
|
|
$(DIR_O)\LexCoffeeScript.obj \
|
|
$(DIR_O)\LexConf.obj \
|
|
$(DIR_O)\LexCPP.obj \
|
|
$(DIR_O)\LexCrontab.obj \
|
|
$(DIR_O)\LexCsound.obj \
|
|
$(DIR_O)\LexCSS.obj \
|
|
$(DIR_O)\LexD.obj \
|
|
$(DIR_O)\LexDataflex.obj \
|
|
$(DIR_O)\LexDiff.obj \
|
|
$(DIR_O)\LexDMAP.obj \
|
|
$(DIR_O)\LexDMIS.obj \
|
|
$(DIR_O)\LexECL.obj \
|
|
$(DIR_O)\LexEDIFACT.obj \
|
|
$(DIR_O)\LexEiffel.obj \
|
|
$(DIR_O)\LexErlang.obj \
|
|
$(DIR_O)\LexErrorList.obj \
|
|
$(DIR_O)\LexEScript.obj \
|
|
$(DIR_O)\LexFlagship.obj \
|
|
$(DIR_O)\LexForth.obj \
|
|
$(DIR_O)\LexFortran.obj \
|
|
$(DIR_O)\LexGAP.obj \
|
|
$(DIR_O)\LexGui4Cli.obj \
|
|
$(DIR_O)\LexHaskell.obj \
|
|
$(DIR_O)\LexHex.obj \
|
|
$(DIR_O)\LexHTML.obj \
|
|
$(DIR_O)\LexIndent.obj \
|
|
$(DIR_O)\LexInno.obj \
|
|
$(DIR_O)\LexJSON.obj \
|
|
$(DIR_O)\LexKix.obj \
|
|
$(DIR_O)\LexKVIrc.obj \
|
|
$(DIR_O)\LexLaTeX.obj \
|
|
$(DIR_O)\LexLisp.obj \
|
|
$(DIR_O)\LexLout.obj \
|
|
$(DIR_O)\LexLua.obj \
|
|
$(DIR_O)\LexMagik.obj \
|
|
$(DIR_O)\LexMake.obj \
|
|
$(DIR_O)\LexMarkdown.obj \
|
|
$(DIR_O)\LexMatlab.obj \
|
|
$(DIR_O)\LexMaxima.obj \
|
|
$(DIR_O)\LexMetapost.obj \
|
|
$(DIR_O)\LexMMIXAL.obj \
|
|
$(DIR_O)\LexModula.obj \
|
|
$(DIR_O)\LexMPT.obj \
|
|
$(DIR_O)\LexMSSQL.obj \
|
|
$(DIR_O)\LexMySQL.obj \
|
|
$(DIR_O)\LexNim.obj \
|
|
$(DIR_O)\LexNimrod.obj \
|
|
$(DIR_O)\LexNsis.obj \
|
|
$(DIR_O)\LexObjC.obj \
|
|
$(DIR_O)\LexNull.obj \
|
|
$(DIR_O)\LexOpal.obj \
|
|
$(DIR_O)\LexOScript.obj \
|
|
$(DIR_O)\LexPascal.obj \
|
|
$(DIR_O)\LexPB.obj \
|
|
$(DIR_O)\LexPerl.obj \
|
|
$(DIR_O)\LexPLM.obj \
|
|
$(DIR_O)\LexPO.obj \
|
|
$(DIR_O)\LexPOV.obj \
|
|
$(DIR_O)\LexPowerPro.obj \
|
|
$(DIR_O)\LexPowerShell.obj \
|
|
$(DIR_O)\LexProgress.obj \
|
|
$(DIR_O)\LexProps.obj \
|
|
$(DIR_O)\LexPS.obj \
|
|
$(DIR_O)\LexPython.obj \
|
|
$(DIR_O)\LexR.obj \
|
|
$(DIR_O)\LexRebol.obj \
|
|
$(DIR_O)\LexRegistry.obj \
|
|
$(DIR_O)\LexRuby.obj \
|
|
$(DIR_O)\LexRust.obj \
|
|
$(DIR_O)\LexSAS.obj \
|
|
$(DIR_O)\LexScriptol.obj \
|
|
$(DIR_O)\LexSearchResult.obj \
|
|
$(DIR_O)\LexSmalltalk.obj \
|
|
$(DIR_O)\LexSML.obj \
|
|
$(DIR_O)\LexSorcus.obj \
|
|
$(DIR_O)\LexSpecman.obj \
|
|
$(DIR_O)\LexSpice.obj \
|
|
$(DIR_O)\LexSQL.obj \
|
|
$(DIR_O)\LexStata.obj \
|
|
$(DIR_O)\LexSTTXT.obj \
|
|
$(DIR_O)\LexTACL.obj \
|
|
$(DIR_O)\LexTADS3.obj \
|
|
$(DIR_O)\LexTAL.obj \
|
|
$(DIR_O)\LexTCL.obj \
|
|
$(DIR_O)\LexTCMD.obj \
|
|
$(DIR_O)\LexTeX.obj \
|
|
$(DIR_O)\LexTxt2tags.obj \
|
|
$(DIR_O)\LexUser.obj \
|
|
$(DIR_O)\LexVB.obj \
|
|
$(DIR_O)\LexVerilog.obj \
|
|
$(DIR_O)\LexVHDL.obj \
|
|
$(DIR_O)\LexVisualProlog.obj \
|
|
$(DIR_O)\LexX12.obj \
|
|
$(DIR_O)\LexYAML.obj \
|
|
|
|
#--Autogenerated -- end of automatically generated section
|
|
|
|
# Required by lexers
|
|
LEXLIBOBJS=\
|
|
$(DIR_O)\Accessor.obj \
|
|
$(DIR_O)\Catalogue.obj \
|
|
$(DIR_O)\ExternalLexer.obj \
|
|
$(DIR_O)\DefaultLexer.obj \
|
|
$(DIR_O)\LexerBase.obj \
|
|
$(DIR_O)\LexerModule.obj \
|
|
$(DIR_O)\LexerSimple.obj \
|
|
$(DIR_O)\StyleContext.obj \
|
|
$(DIR_O)\WordList.obj \
|
|
|
|
# Required by libraries and DLLs that include lexing
|
|
SCILEXOBJS=\
|
|
$(BASEOBJS) \
|
|
$(LEXLIBOBJS) \
|
|
$(LEXOBJS) \
|
|
$(DIR_O)\ScintillaBaseL.obj
|
|
|
|
# To have PCRE
|
|
# boost root path (BOOSTPATH) and boost regex lib binary path (BOOSTREGEXLIBPATH) should be given
|
|
# Otherwise boost's PCRE won't be included in the build
|
|
# For example:
|
|
# nmake BOOSTPATH=C:\sources\boost_1_70_0\ BOOSTREGEXLIBPATH=C:\tmp\scintilla.414\boostregex -f scintilla.mak
|
|
!INCLUDE ../boostregex/nppSpecifics.mak
|
|
|
|
$(DIR_O)\ScintRes.res : ScintRes.rc
|
|
$(RC) -fo$@ $**
|
|
|
|
$(COMPONENT): $(SOBJS) $(DIR_O)\ScintRes.res
|
|
$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)
|
|
|
|
$(LEXCOMPONENT): $(SCILEXOBJS) $(DIR_O)\ScintillaDLL.obj $(DIR_O)\ScintillaWinL.obj $(DIR_O)\ScintRes.res
|
|
$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)
|
|
|
|
$(LIBSCI): $(SCILEXOBJS) $(DIR_O)\ScintillaWin.obj
|
|
LIB /OUT:$@ $**
|
|
|
|
# Define how to build all the objects and what they depend on
|
|
|
|
{..\src}.cxx{$(DIR_O)}.obj::
|
|
$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $<
|
|
{..\lexlib}.cxx{$(DIR_O)}.obj::
|
|
$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $<
|
|
{..\lexers}.cxx{$(DIR_O)}.obj::
|
|
$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $<
|
|
{.}.cxx{$(DIR_O)}.obj::
|
|
$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $<
|
|
|
|
# Some source files are compiled into more than one object because of different conditional compilation
|
|
$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx
|
|
$(CXX) $(CXXFLAGS) -DSCI_LEXER -c $(NAME)$@ ..\src\ScintillaBase.cxx
|
|
|
|
$(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx
|
|
$(CXX) $(CXXFLAGS) -DSCI_LEXER -c $(NAME)$@ ScintillaWin.cxx
|
|
|
|
# Dependencies
|
|
|
|
!IF EXISTS(nmdeps.mak)
|
|
|
|
# Protect with !IF EXISTS to handle accidental deletion - just 'nmake -f scintilla.mak deps'
|
|
|
|
!INCLUDE nmdeps.mak
|
|
|
|
!ENDIF
|
|
|