notepad-plus-plus/scintilla/win32/scintilla.mak

152 lines
3.9 KiB
Makefile
Raw Normal View History

# 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
2019-05-04 20:14:48 +02:00
LIBSCI=$(DIR_BIN)\libscintilla.lib
LD=link
2019-05-04 20:14:48 +02:00
!IFDEF SUPPORT_XP
ADD_DEFINE=-D_USING_V110_SDK71_
# Different subsystems for 32-bit and 64-bit Windows XP so detect based on Platform
# environment variable set by vcvars*.bat to be either x86 or x64
!IF "$(PLATFORM)" == "x64"
SUBSYSTEM=-SUBSYSTEM:WINDOWS,5.02
!ELSE
SUBSYSTEM=-SUBSYSTEM:WINDOWS,5.01
!ENDIF
!ELSE
CETCOMPAT=-CETCOMPAT
!IFDEF ARM64
ADD_DEFINE=-D_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1
SUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00
2019-05-04 20:14:48 +02:00
!ENDIF
!ENDIF
2019-05-04 20:14:48 +02:00
CRTFLAGS=-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_DEPRECATE=1 -D_SCL_SECURE_NO_WARNINGS=1 $(ADD_DEFINE)
CXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 $(CRTFLAGS)
CXXDEBUG=-Od -MTd -DDEBUG
Update to Scintilla 5.3.2 and Lexilla 5.2.1 update to https://www.scintilla.org/scintilla532.zip with: Released 6 December 2022. Add SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix and suffix to be marked as modified in change history. Draw background colour for EOL annotations with standard and boxed visuals. Add SCI_GETSTYLEDTEXTFULL to support 64-bit document positions on Win32 replacing SCI_GETSTYLEDTEXT which is not safe for huge documents. Feature #1455. Send SCN_AUTOCCOMPLETED for SCI_AUTOCSHOW triggering insertion because of SCI_AUTOCSETCHOOSESINGLE mode. Feature #1459. Change 'paragraph up' commands SCI_PARAUP and SCI_PARAUPEXTEND to go to the start position of the paragraph containing the caret. Only if the caret is already at the start of the paragraph will it go to the start of the previous paragraph. Bug #2363. Change release compilation optimization option to favour speed over space. -O2 for MSVC and -O3 for gcc and clang. On Win32, avoid blurry display with DirectWrite in GDI scaling mode. Bug #2344. On Win32, use the top-level window to find the monitor for DirectWrite rendering parameters. Temporarily switch DPI awareness to find correct monitor in GDI scaling mode. Bug #2344. On Qt, implement SCI_SETRECTANGULARSELECTIONMODIFIER for all platforms. On Qt, allow string form XPM images for SCI_REGISTERIMAGE. and https://www.scintilla.org/lexilla521.zip with Released 6 December 2022. Update to Unicode 14. Feature #1461. Change default compilation optimization option to favour speed over space. -O2 for MSVC and -O3 for gcc and clang. Batch: Fix comments starting inside strings. Issue #115. F#: Lex signed numeric literals more accurately. Issue #110, Issue #111. F#: Add specifiers for 64-bit integer and floating point literals. Issue #112. Markdown: Stop styling numbers at line start in PRECHAR style. Issue #117. PowerShell: Recognise numeric literals more accurately. Issue #118. Close #12624
2022-12-10 13:35:16 +01:00
CXXNDEBUG=-O2 -MT -DNDEBUG -GL
NAME=-Fo
LDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(SUBSYSTEM) $(CETCOMPAT)
LDDEBUG=
2019-05-04 20:14:48 +02:00
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
2019-05-04 20:14:48 +02:00
!IFDEF NO_CXX11_REGEX
CXXFLAGS=$(CXXFLAGS) -DNO_CXX11_REGEX
!ENDIF
!IFDEF DEBUG
CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
LDFLAGS=$(LDDEBUG) $(LDFLAGS)
!ELSE
CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)
!ENDIF
INCLUDES=-I../include -I../src
CXXFLAGS=$(CXXFLAGS) $(INCLUDES)
all: $(COMPONENT) $(LIBSCI)
clean:
-del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(DIR_O)\*.asm $(COMPONENT) \
$(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb \
$(DIR_BIN)\Scintilla.lib $(LIBSCI)
depend:
pyw DepGen.py
2019-05-04 20:14:48 +02:00
# Required for base Scintilla
SRC_OBJS=\
$(DIR_O)\AutoComplete.obj \
$(DIR_O)\CallTip.obj \
$(DIR_O)\CaseConvert.obj \
$(DIR_O)\CaseFolder.obj \
$(DIR_O)\CellBuffer.obj \
$(DIR_O)\ChangeHistory.obj \
$(DIR_O)\CharacterCategoryMap.obj \
$(DIR_O)\CharacterType.obj \
$(DIR_O)\CharClassify.obj \
$(DIR_O)\ContractionState.obj \
2019-05-04 20:14:48 +02:00
$(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)\Geometry.obj \
$(DIR_O)\Indicator.obj \
$(DIR_O)\KeyMap.obj \
$(DIR_O)\LineMarker.obj \
$(DIR_O)\MarginView.obj \
$(DIR_O)\PerLine.obj \
$(DIR_O)\PositionCache.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
# To have PCRE boost regex with header only is integrated and not just the one from std
!INCLUDE ../../boostregex/nppSpecifics.mak
COMPONENT_OBJS = \
$(DIR_O)\HanjaDic.obj \
$(DIR_O)\PlatWin.obj \
$(DIR_O)\ScintillaBase.obj \
$(DIR_O)\ScintillaWin.obj \
$(SRC_OBJS)
SHARED_OBJS = \
$(DIR_O)\ScintillaDLL.obj
$(DIR_O)\ScintRes.res : ScintRes.rc
$(RC) -fo$@ $**
$(COMPONENT): $(COMPONENT_OBJS) $(SHARED_OBJS) $(DIR_O)\ScintRes.res
$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)
$(LIBSCI): $(COMPONENT_OBJS)
2019-05-04 20:14:48 +02:00
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)\ $<
{.}.cxx{$(DIR_O)}.obj::
$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $<
# Dependencies
!IF EXISTS(nmdeps.mak)
# Protect with !IF EXISTS to handle accidental deletion - just 'nmake -f scintilla.mak depend'
2019-05-04 20:14:48 +02:00
!INCLUDE nmdeps.mak
!ENDIF