summaryrefslogtreecommitdiff
path: root/x11-toolkits/scintilla/files/patch-aa
blob: 8faf765f91636ba68a7b3de950920cccfe46a387 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
--- makefile.orig	2009-07-03 01:48:46.000000000 -0400
+++ makefile	2009-08-11 12:37:37.000000000 -0400
@@ -8,16 +8,17 @@
 # To force GTK+ 1 build, define GTK1 on the make command line.
 
 .SUFFIXES: .cxx .c .o .h .a
-CC = g++
-CCOMP = gcc
-AR = ar
+#CC = g++
+#CCOMP = gcc
+AR = $(CXX) -shared
 RANLIB = touch
 
 ifeq ($(shell uname),Darwin)
 RANLIB = ranlib
 endif
 
-COMPLIB=../bin/scintilla.a
+COMPLIB=../bin/libscintilla.so.2
+LEXRLIB=../bin/libscintilla_lexers.so.2
 
 vpath %.h ../src ../include
 vpath %.cxx ../src
@@ -32,33 +33,33 @@
 endif
 
 ifdef DEBUG
-CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
+CXXFLAGS+=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
 else
-CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
+CXXFLAGS+=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
 endif
 
 # If explicit setting of GTK1 or GTK2 then use that else look for
 # pkg-config which is an OK indication that GTK2 is available
 ifdef GTK2
-CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0)
+CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0 gthread-2.0)
 MARSHALLER=scintilla-marshal.o
 else
 ifdef GTK1
-CONFIGFLAGS=$(shell gtk-config --cflags)
+CONFIGFLAGS=$(shell pkg-config --cflags gtk+ gthread)
 else
 ifneq (,$(findstring /,$(shell whereis pkg-config)))
-CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0)
+CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0 gthread-2.0)
 MARSHALLER=scintilla-marshal.o
 else
-CONFIGFLAGS=$(shell gtk-config --cflags)
+CONFIGFLAGS=$(shell pkg-config --cflags gtk+ gthread)
 endif
 endif
 endif
 
 .cxx.o:
-	$(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
+	$(CC) $(PICFLAGS) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
 .c.o:
-	$(CCOMP) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
+	$(CCOMP) $(PICFLAGS) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
 
 #++Autogenerated -- run src/LexGen.py to regenerate
 #**LEXOBJS=\\\n\(\*.o \)
@@ -76,7 +77,7 @@
 LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o
 #--Autogenerated -- end of automatically generated section
 
-all: $(COMPLIB)
+all: $(COMPLIB) $(LEXRLIB)
 
 clean:
 	rm -f *.o $(COMPLIB)
@@ -89,9 +90,11 @@
 	ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.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) $(CONFIGFLAGS:cflags=libs) -o $@ $^
+
+$(LEXRLIB): $(LEXOBJS)
+	$(AR) $(CONFIGFLAGS:cflags=libs) -o $@ $^
 
 # Automatically generate header dependencies with "make deps"
 include deps.mak