diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-03-08 18:22:00 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-03-08 18:22:00 +1100 |
| commit | e77027687d205f0f6059bbb93a79395afc460234 (patch) | |
| tree | d31a45cf2242a3ef69f346bcf85988165ad443f9 /win32/makefile | |
| parent | 5a029aacc6ec8b36949469024a891f0d0fced21e (diff) | |
| download | scintilla-mirror-e77027687d205f0f6059bbb93a79395afc460234.tar.gz | |
Create static library libscintilla.a or libscintilla.lib on Windows.
Stop creating Lexers.a static library.
Harmonize make files.
Diffstat (limited to 'win32/makefile')
| -rw-r--r-- | win32/makefile | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/win32/makefile b/win32/makefile index 9849ebf89..1550484dc 100644 --- a/win32/makefile +++ b/win32/makefile @@ -4,6 +4,14 @@ # This makefile assumes the Mingw-w64 version of GCC 7.1+ is used and changes will # be needed to use other compilers. +.SUFFIXES: .cxx + +DIR_BIN=../bin + +COMPONENT = $(DIR_BIN)/Scintilla.dll +LEXCOMPONENT = $(DIR_BIN)/SciLexer.dll +LIBSCI = $(DIR_BIN)/libscintilla.a + ifdef CLANG # Common location for 32-bit clang on Windows CXX = "C:\Program Files (x86)\LLVM\bin\clang++" @@ -16,7 +24,6 @@ STRIPOPTION = -s CXXSTD = gnu++17 endif -.SUFFIXES: .cxx ifeq ($(OS),Windows_NT) DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q) else @@ -25,10 +32,6 @@ endif RANLIB ?= ranlib WINDRES ?= windres -COMPONENT = ../bin/Scintilla.dll -LEXCOMPONENT = ../bin/SciLexer.dll -LEXLIB = Lexers.a - vpath %.h ../src ../include ../lexlib vpath %.cxx ../src ../lexlib ../lexers @@ -60,13 +63,13 @@ CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) STRIPFLAG=$(STRIPOPTION) endif -.cxx.o: - $(CXX) $(CXXFLAGS) $(REFLAGS) -c $< - -ALL: $(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o +all: $(COMPONENT) $(LEXCOMPONENT) $(LIBSCI) clean: - $(DEL) *.exe *.o *.obj *.dll *.res *.map *.plist + $(DEL) *.exe *.o *.a *.obj *.dll *.res *.map *.plist + +.cxx.o: + $(CXX) $(CXXFLAGS) $(REFLAGS) -c $< analyze: $(CXX) --analyze $(D2DFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx @@ -76,7 +79,7 @@ deps: LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard ../lexers/Lex*.cxx))))) - +# Required for base Scintilla BASEOBJS = \ AutoComplete.o \ CallTip.o \ @@ -113,10 +116,8 @@ BASEOBJS = \ SOBJS = ScintillaWin.o ScintillaBase.o $(BASEOBJS) -$(COMPONENT): $(SOBJS) Scintilla.def - $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS) - -LOBJS = \ +# Required by lexers +LEXLIBOBJS=\ Accessor.o \ Catalogue.o \ ExternalLexer.o \ @@ -124,16 +125,23 @@ LOBJS = \ LexerBase.o \ LexerModule.o \ LexerSimple.o \ - ScintillaWinL.o \ - ScintillaBaseL.o \ StyleContext.o \ WordList.o \ + +# Required by libraries and DLLs that include lexing +SCILEXOBJS=\ $(BASEOBJS) \ - $(LEXOBJS) -$(LEXCOMPONENT): $(LOBJS) Scintilla.def - $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(LOBJS) $(CXXFLAGS) $(LIBS) + $(LEXLIBOBJS) \ + $(LEXOBJS) \ + ScintillaBaseL.o + +$(COMPONENT): $(SOBJS) Scintilla.def + $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(SOBJS) $(CXXFLAGS) $(LIBS) + +$(LEXCOMPONENT): ScintillaWinL.o $(SCILEXOBJS) Scintilla.def + $(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) ScintillaWinL.o $(SCILEXOBJS) $(CXXFLAGS) $(LIBS) -$(LEXLIB): $(LEXOBJS) +$(LIBSCI): ScintillaWinS.o $(SCILEXOBJS) $(AR) rc $@ $^ $(RANLIB) $@ |
