--- makefile.orig 2012-06-01 04:26:24.000000000 -0400 +++ makefile 2012-08-12 14:34:52.000000000 -0400 @@ -7,17 +7,7 @@ # Also works with ming32-make on Windows. .SUFFIXES: .cxx .c .o .h .a -ifdef CLANG -ifdef CLANG_ANALYZE -ANALYZE=--analyze -endif -CC = clang $(ANALYZE) -CCOMP = clang $(ANALYZE) -else -CC = g++ -CCOMP = gcc -endif -AR = ar +AR = $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared RANLIB = touch ifdef GTK3 @@ -39,7 +29,8 @@ COMPLIB=..\bin\scintilla.a else DEL = rm -f -COMPLIB=../bin/scintilla.a +COMPLIB=../bin/libscintilla.so.2 +LEXRLIB=../bin/libscintilla_lexers.so.2 endif vpath %.h ../src ../include ../lexlib @@ -66,6 +57,7 @@ CFLAGS:=$(CXXTFLAGS) CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION)) +CONFIGLIBS:=$(shell pkg-config --libs $(GTKVERSION)) MARSHALLER=scintilla-marshal.o .cxx.o: @@ -75,7 +67,7 @@ LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx)))) -all: $(COMPLIB) +all: $(COMPLIB) $(LEXRLIB) clean: $(DEL) *.o $(COMPLIB) @@ -88,9 +80,11 @@ ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSetSimple.o PlatGTK.o \ KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \ RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \ - $(MARSHALLER) $(LEXOBJS) - $(AR) rc $@ $^ - $(RANLIB) $@ + $(MARSHALLER) + $(AR) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) + +$(LEXRLIB): $(LEXOBJS) + $(AR) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) # Automatically generate header dependencies with "make deps" include deps.mak