aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/scintilla/files/patch-makefile
blob: ca276f4f22ddfdef52f1ddd1bb92c23ad3f82411 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- makefile.orig   2014-11-28 00:47:24.000000000 +0400
+++ makefile    2014-12-04 14:28:51.000000000 +0400
@@ -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
 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)
 
 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 $@ $^
-   $(RANLIB) $@
+   $(MARSHALLER)
+   $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
+
+$(LEXRLIB): $(LEXOBJS)
+   $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
 
 # Automatically generate header dependencies with "make deps"
 include deps.mak