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 | 492076b58d09387ab9c2f60eaef364a6a65c4c28 (patch) | |
| tree | b8c2a9bbf974d5d588bae807b2a2d144116c7b6a /win32 | |
| parent | fede631dfa75dd8518bbde5b845a9da7d133ce24 (diff) | |
| download | scintilla-mirror-492076b58d09387ab9c2f60eaef364a6a65c4c28.tar.gz | |
Backport: Create static library libscintilla.a or libscintilla.lib on Windows.
Stop creating Lexers.a static library.
Harmonize make files.
Backport of changeset 6477:a65186aab9f9.
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/makefile | 50 | ||||
| -rw-r--r-- | win32/scintilla.mak | 29 | 
2 files changed, 46 insertions, 33 deletions
| diff --git a/win32/makefile b/win32/makefile index dcbd3ad2a..597fc257f 100644 --- a/win32/makefile +++ b/win32/makefile @@ -4,6 +4,14 @@  # This makefile assumes the MinGW32 version of GCC 4.8+ 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++0x  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  vpath %.c ../lua/src @@ -57,6 +60,11 @@ CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)  STRIPFLAG=$(STRIPOPTION)  endif +all:	$(COMPONENT) $(LEXCOMPONENT) $(LIBSCI) + +clean: +	$(DEL) *.exe *.o *.a *.obj *.dll *.res *.map *.plist +  ifdef LPEG_LEXER  CXXFLAGS+=-DLPEG_LEXER -I ../lua/src  LUAOBJS:=lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o \ @@ -73,11 +81,6 @@ endif  .c.o:  	$(CC) $(CFLAGS) -c $< -ALL:	$(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) ScintillaWinS.o - -clean: -	$(DEL) *.exe *.o *.obj *.dll *.res *.map *.plist -  analyze:  	$(CXX) --analyze $(D2DFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx @@ -86,7 +89,7 @@ deps:  LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard ../lexers/Lex*.cxx))))) - +# Required for base Scintilla  BASEOBJS = \  	AutoComplete.o \  	CallTip.o \ @@ -123,10 +126,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 \ @@ -134,17 +135,24 @@ 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) \ +	$(LEXLIBOBJS) \  	$(LEXOBJS) \ -	$(LUAOBJS) -$(LEXCOMPONENT): $(LOBJS) Scintilla.def -	$(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $(LOBJS) $(CXXFLAGS) $(LIBS) +	$(LUAOBJS) \ +	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) $(LUAOBJS) +$(LIBSCI): ScintillaWinS.o $(SCILEXOBJS)  	$(AR) rc $@ $^  	$(RANLIB) $@ diff --git a/win32/scintilla.mak b/win32/scintilla.mak index 1aa648e8c..5c9360dff 100644 --- a/win32/scintilla.mak +++ b/win32/scintilla.mak @@ -15,7 +15,7 @@ DIR_BIN=..\bin  COMPONENT=$(DIR_BIN)\Scintilla.dll  LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll -LEXLIB=Lexers.lib +LIBSCI=$(DIR_BIN)\libscintilla.lib  LD=link @@ -59,13 +59,14 @@ CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)  INCLUDEDIRS=-I../include -I../src -I../lexlib  CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS) -ALL:	$(COMPONENT) $(LEXCOMPONENT) $(LEXLIB) $(DIR_O)\ScintillaWinS.obj +all:	$(COMPONENT) $(LEXCOMPONENT) $(LIBSCI)  clean:  	-del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) \  	$(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb $(DIR_BIN)\*.lib -SHAREDOBJS=\ +# Required for base Scintilla +BASEOBJS=\  	$(DIR_O)\AutoComplete.obj \  	$(DIR_O)\CallTip.obj \  	$(DIR_O)\CaseConvert.obj \ @@ -99,7 +100,7 @@ SHAREDOBJS=\  	$(DIR_O)\HanjaDic.obj \  SOBJS=\ -	$(SHAREDOBJS) \ +	$(BASEOBJS) \  	$(DIR_O)\ScintillaBase.obj \  	$(DIR_O)\ScintillaWin.obj @@ -216,8 +217,8 @@ LEXOBJS=\  #--Autogenerated -- end of automatically generated section -LOBJS=\ -	$(SHAREDOBJS) \ +# Required by lexers +LEXLIBOBJS=\  	$(DIR_O)\Accessor.obj \  	$(DIR_O)\Catalogue.obj \  	$(DIR_O)\ExternalLexer.obj \ @@ -227,9 +228,13 @@ LOBJS=\  	$(DIR_O)\LexerSimple.obj \  	$(DIR_O)\StyleContext.obj \  	$(DIR_O)\WordList.obj \ -	$(DIR_O)\ScintillaBaseL.obj \ -	$(DIR_O)\ScintillaWinL.obj \ -	$(LEXOBJS) + +# Required by libraries and DLLs that include lexing +SCILEXOBJS=\ +	$(BASEOBJS) \ +	$(LEXLIBOBJS) \ +	$(LEXOBJS) \ +	$(DIR_O)\ScintillaBaseL.obj  $(DIR_O)\ScintRes.res : ScintRes.rc  	$(RC) -fo$@ $** @@ -237,11 +242,11 @@ $(DIR_O)\ScintRes.res : ScintRes.rc  $(COMPONENT): $(SOBJS) $(DIR_O)\ScintRes.res  	$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS) -$(LEXCOMPONENT): $(LOBJS) $(DIR_O)\ScintRes.res +$(LEXCOMPONENT): $(SCILEXOBJS) $(DIR_O)\ScintillaWinL.obj $(DIR_O)\ScintRes.res  	$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS) -$(LEXLIB): $(LEXOBJS) -	LIB /OUT:$@ $(LEXOBJS) +$(LIBSCI): $(SCILEXOBJS) $(DIR_O)\ScintillaWinS.obj +	LIB /OUT:$@ $**  # Define how to build all the objects and what they depend on | 
