$FreeBSD$ --- makefile.orig Fri Jan 10 13:35:52 2003 +++ makefile Thu Feb 6 15:05:00 2003 @@ -6,8 +6,8 @@ # To build for GTK+ 2, define GTK2 on the make command line. .SUFFIXES: .cxx .o .h .a -CC = g++ -AR = ar +CC ?= g++ +AR = $(CC) -shared RANLIB = touch ifeq ($(OSTYPE),darwin) @@ -16,7 +16,8 @@ RANLIB = ranlib endif -COMPLIB=../bin/scintilla.a +COMPLIB=../bin/libscintilla.so.1 +LEXRLIB=../bin/libscintilla_lexers.so.1 vpath %.h ../src ../include vpath %.cxx ../src @@ -25,9 +26,9 @@ CXXBASEFLAGS=-W -Wall -DGTK -DSCI_LEXER $(INCLUDEDIRS) ifdef DEBUG -CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) +CXXFLAGS+=-DDEBUG -g $(CXXBASEFLAGS) else -CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) +CXXFLAGS+=-DNDEBUG $(CXXBASEFLAGS) endif ifdef GTK2 @@ -37,7 +38,7 @@ endif .cxx.o: - $(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $< + $(CC) -DPIC -fpic $(shell $(GTK_CONFIG) --cflags) $(CXXFLAGS) -c $< #++Autogenerated -- run src/LexGen.py to regenerate #**LEXOBJS=\\\n\(\*.o \) @@ -50,7 +51,7 @@ # The LEXOBJS have to be treated specially as the functions in them are not called from external code -all: $(COMPLIB) $(LEXOBJS) +all: $(COMPLIB) $(LEXRLIB) clean: rm -f *.o $(COMPLIB) @@ -62,8 +63,10 @@ ScintillaBase.o ContractionState.o Editor.o PropSet.o PlatGTK.o \ KeyMap.o LineMarker.o ScintillaGTK.o CellBuffer.o ViewStyle.o \ RESearch.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o - $(AR) rc $@ $^ - $(RANLIB) $@ + $(AR) $(shell $(GTK_CONFIG) --libs gthread) -o $@ $^ + + $(LEXRLIB): $(LEXOBJS) + $(AR) $(shell $(GTK_CONFIG) --libs gthread) -o $@ $^ # Automatically generate header dependencies with "make deps" include deps.mak