summaryrefslogtreecommitdiff
path: root/x11-toolkits/scintilla/files/patch-aa
blob: e371d87add73057af709f883c1690dd0b3345b53 (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
$FreeBSD$

--- makefile.orig	Fri Jan 25 02:52:32 2002
+++ makefile	Mon Feb 11 11:40:38 2002
@@ -5,8 +5,8 @@
 # GNU make does not like \r\n line endings so should be saved to CVS in binary form.
 
 .SUFFIXES: .cxx .o .h .a
-CC = g++
-AR = ar
+CC ?= g++
+AR = $(CC) -shared
 RANLIB = touch
 
 ifeq ($(OSTYPE),darwin)
@@ -15,7 +15,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
@@ -24,13 +25,13 @@
 CXXBASEFLAGS=-W -Wall -DGTK -DSCI_LEXER $(INCLUDEDIRS)
 
 ifdef DEBUG
-CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
+CXXFLAGS+=-DDEBUG -g $(CXXBASEFLAGS)
 else
-CXXFLAGS=-DNDEBUG $(CXXBASEFLAGS)
+CXXFLAGS+=-DNDEBUG $(CXXBASEFLAGS)
 endif
 
 .cxx.o:
-	$(CC) `gtk-config --cflags` $(CXXFLAGS) -c $<
+	$(CC) -DPIC -fpic $(shell $(GTK_CONFIG) --cflags) $(CXXFLAGS) -c $<
 
 LEXOBJS=LexAda.o LexAVE.o LexBaan.o LexBullant.o LexConf.o LexCPP.o \
 	LexCrontab.o LexEiffel.o LexHTML.o LexLisp.o LexLua.o LexOthers.o \
@@ -38,7 +39,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)
@@ -50,8 +51,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
-	$(AR) rc $@ $^
-	$(RANLIB) $@
+	$(AR) -o $@ $^
+
+$(LEXRLIB): $(LEXOBJS)
+	$(AR) -o $@ $^
 
 # Automatically generate header dependencies with "make deps"
 include deps.mak