freebsd-ports/x11-toolkits/scintilla/files/patch-makefile

67 lines
1.9 KiB
Text
Raw Normal View History

--- makefile.orig 2014-11-27 20:47:24 UTC
+++ makefile
@@ -7,14 +7,6 @@
# Also works with ming32-make on Windows.
.SUFFIXES: .cxx .c .o .h .a
-ifdef CLANG
-CXX = clang++ -Wno-deprecated-register
-CC = clang
-# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for
-# thread also need to create Position Independent Executable -> search online documentation
-SANITIZE = address
-#SANITIZE = undefined
-endif
2002-02-11 13:56:24 +01:00
RANLIB = touch
ifdef GTK3
@@ -36,7 +28,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
@@ -68,8 +61,7 @@
CTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
endif
-CFLAGS:=$(CTFLAGS)
-CXXTFLAGS:=--std=c++0x $(CTFLAGS) $(REFLAGS)
+CXXTFLAGS:=$(CTFLAGS) $(REFLAGS)
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
MARSHALLER=scintilla-marshal.o
@@ -77,11 +69,11 @@
.cxx.o:
$(CXX) $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) -c $<
.c.o:
- $(CC) $(CONFIGFLAGS) $(CFLAGS) -w -c $<
+ $(CC) $(CONFIGFLAGS) $(CTFLAGS) $(CFLAGS) -w -c $<
LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
-all: $(COMPLIB)
+all: $(COMPLIB) $(LEXRLIB)
2001-04-17 13:27:22 +02:00
clean:
$(DEL) *.o $(COMPLIB) *.plist
@@ -98,9 +90,11 @@
PropSetSimple.o PlatGTK.o \
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o CharacterCategory.o ViewStyle.o \
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
- $(MARSHALLER) $(LEXOBJS)
- $(AR) rc $@ $^
2002-02-11 13:56:24 +01:00
- $(RANLIB) $@
+ $(MARSHALLER)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
+
+$(LEXRLIB): $(LEXOBJS)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
2001-04-17 13:27:22 +02:00
# Automatically generate header dependencies with "make deps"
include deps.mak