notepad-plus-plus/scintilla/win32/makefile

140 lines
3.3 KiB
Makefile
Raw Normal View History

# Make file for Scintilla on Windows
# @file makefile
# 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 assumes Mingw-w64 GCC 9.0+ is used and changes will be needed to use other compilers.
# Clang 9.0+ can be used with CLANG=1 on command line.
.PHONY: all clean analyze depend
.SUFFIXES: .cxx .c .o .h .a
2019-05-04 18:14:48 +00:00
DIR_O=.
2019-05-04 18:14:48 +00:00
DIR_BIN=../bin
COMPONENT = $(DIR_BIN)/Scintilla.dll
LIBSCI = $(DIR_BIN)/libscintilla.a
WARNINGS = -Wpedantic -Wall -Wextra
2019-05-04 18:14:48 +00:00
ifdef CLANG
CXX = clang++
else
# MinGW GCC
LIBSMINGW = -lstdc++
STRIPOPTION = -s
endif
ARFLAGS = rc
RANLIB ?= ranlib
WINDRES ?= windres
2019-05-04 18:14:48 +00:00
# Environment variable windir always defined on Win32
2019-05-04 18:14:48 +00:00
# Take care of changing Unix style '/' directory separator to '\' on Windows
normalize = $(if $(windir),$(subst /,\,$1),$1)
PYTHON = $(if $(windir),pyw,python3)
ifdef windir
2019-05-04 18:14:48 +00:00
DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
else
DEL = rm -f
endif
vpath %.h ../src ../include
vpath %.cxx ../src
LDFLAGS=-shared -static -mwindows
Update: Scintilla 5.3.5 Lexilla 5.2.5 update to Scinitlla Release 5.3.5 (https://www.scintilla.org/scintilla535.zip) Released 31 May 2023. On Win32, implement IME context sensitivity with IMR_DOCUMENTFEED. Feature #1310. On Win32 remove dependence on MSIMG32.DLL by replacing AlphaBlend by GdiAlphaBlend. Bug #1923. On Qt, stop movement of IME candidate box. On Qt, report correct caret position within paragraph for IME retrieve surrounding text. On Qt for Cocoa, fix crash in entry of multi-character strings with IME. and Lexilla Release 5.2.5 (https://www.scintilla.org/lexilla525.zip) Released 31 May 2023. Add CharacterSetArray constructor without setBase initial argument for common case where this is setNone and the initialSet argument completely defines the characters. This shortens and clarifies use of CharacterSetArray. Bash: implement highlighting inside quoted elements and here-docs. Controlled with properties lexer.bash.styling.inside.string, lexer.bash.styling.inside.backticks, lexer.bash.styling.inside.parameter, and lexer.bash.styling.inside.heredoc. Issue #154, Issue #153, Feature #1033. Bash: add property lexer.bash.command.substitution to choose how to style command substitutions. 0 → SCE_SH_BACKTICKS; 1 → surrounding "$(" and ")" as operators and contents styled as bash code; 2 → use distinct styles (base style + 64) for contents. Choice (2) is a provisional feature and details may change before it is finalized. Issue #153. Bash: fix nesting of parameters (SCE_SH_PARAM) like ${var/$sub/"${rep}}"}. Issue #154. Bash: fix single character special parameters like $? by limiting style. Issue #154. Bash: treat "$$" as special parameter and end scalars before "$". Issue #154. Bash: treat "<<" in arithmetic contexts as left bitwise shift operator instead of here-doc. Issue #137. Batch: style SCE_BAT_AFTER_LABEL used for rest of line after label which is not executed. Issue #148. F#: Lex interpolated verbatim strings as verbatim. Issue #156. VB: allow multiline strings when lexer.vb.strings.multiline set. Issue #151. Close #13729
2023-05-31 23:11:12 +00:00
LIBS=-lgdi32 -luser32 -limm32 -lole32 -luuid -loleaut32 $(LIBSMINGW)
INCLUDES=-I ../include -I ../src
BASE_FLAGS += $(WARNINGS)
2019-05-04 18:14:48 +00:00
ifdef NO_CXX11_REGEX
DEFINES += -DNO_CXX11_REGEX
endif
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
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 12:35:16 +00:00
BASE_FLAGS += $(if $(DEBUG),-g,-O3)
ifndef DEBUG
2019-05-04 18:14:48 +00:00
STRIPFLAG=$(STRIPOPTION)
endif
CXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)
CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS)
all: $(COMPONENT) $(LIBSCI)
clean:
$(DEL) $(call normalize, $(addprefix $(DIR_O)/, *.exe *.o *.a *.obj *.dll *.res *.map *.plist) $(COMPONENT) $(LIBSCI))
2019-05-04 18:14:48 +00:00
$(DIR_O)/%.o: %.cxx
$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< -o $@
analyze:
$(CXX) --analyze $(CXX_ALL_FLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx
depend deps.mak:
$(PYTHON) DepGen.py
2019-05-04 18:14:48 +00:00
# Required for base Scintilla
SRC_OBJS = \
$(DIR_O)/AutoComplete.o \
$(DIR_O)/CallTip.o \
$(DIR_O)/CaseConvert.o \
$(DIR_O)/CaseFolder.o \
$(DIR_O)/CellBuffer.o \
$(DIR_O)/ChangeHistory.o \
$(DIR_O)/CharacterCategoryMap.o \
$(DIR_O)/CharacterType.o \
$(DIR_O)/CharClassify.o \
$(DIR_O)/ContractionState.o \
$(DIR_O)/DBCS.o \
$(DIR_O)/Decoration.o \
$(DIR_O)/Document.o \
$(DIR_O)/EditModel.o \
$(DIR_O)/Editor.o \
$(DIR_O)/EditView.o \
$(DIR_O)/Geometry.o \
$(DIR_O)/Indicator.o \
$(DIR_O)/KeyMap.o \
$(DIR_O)/LineMarker.o \
$(DIR_O)/MarginView.o \
$(DIR_O)/PerLine.o \
$(DIR_O)/PositionCache.o \
$(DIR_O)/RESearch.o \
$(DIR_O)/RunStyles.o \
$(DIR_O)/Selection.o \
$(DIR_O)/Style.o \
$(DIR_O)/UniConversion.o \
$(DIR_O)/UniqueString.o \
$(DIR_O)/ViewStyle.o \
$(DIR_O)/XPM.o
COMPONENT_OBJS = \
$(SRC_OBJS) \
$(DIR_O)/HanjaDic.o \
$(DIR_O)/PlatWin.o \
$(DIR_O)/ScintillaBase.o \
$(DIR_O)/ScintillaWin.o
SHARED_OBJS = \
$(DIR_O)/ScintillaDLL.o \
$(DIR_O)/ScintRes.o
$(COMPONENT): $(COMPONENT_OBJS) $(SHARED_OBJS)
$(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $^ $(CXXFLAGS) $(LIBS)
$(LIBSCI): $(COMPONENT_OBJS)
$(AR) $(ARFLAGS) $@ $^
2019-05-04 18:14:48 +00:00
$(RANLIB) $@
# Automatically generate dependencies for most files with "make depend"
include deps.mak
$(DIR_O)/ScintRes.o: ScintRes.rc
$(WINDRES) $< $@