play around with Scintilla and Lexilla

This commit is contained in:
2024-07-02 23:47:26 +08:00
parent d7c71f41b2
commit 727a2ec214
992 changed files with 281111 additions and 195 deletions

View File

@ -0,0 +1,38 @@
.PHONY: all check clean
INCLUDES = -I ../../../scintilla/include -I ../../include -I ../../lexlib
BASE_FLAGS += --std=c++17 -shared
ifdef windir
SHAREDEXTENSION = dll
else
ifeq ($(shell uname),Darwin)
SHAREDEXTENSION = dylib
BASE_FLAGS += -dynamiclib -arch arm64 -arch x86_64
else
BASE_FLAGS += -fPIC
SHAREDEXTENSION = so
endif
BASE_FLAGS += -fvisibility=hidden
endif
ifdef windir
RM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
CXX = g++
endif
LIBRARY = SimpleLexer.$(SHAREDEXTENSION)
LEXLIB = ../../lexlib/*.cxx
all: $(LIBRARY)
# make check requires CheckLexilla to have already been built
check: $(LIBRARY)
../CheckLexilla/CheckLexilla ./$(LIBRARY)
clean:
$(RM) *.o *obj *.lib *.exp $(LIBRARY)
$(LIBRARY): *.cxx
$(CXX) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $^ $(LEXLIB) $(LIBS) $(LDLIBS) -o $@