Lines 1-20
Link Here
|
1 |
--- makefile.orig 2019-04-16 20:34:45 UTC |
1 |
--- makefile.orig 2020-01-02 00:45:04 UTC |
2 |
+++ makefile |
2 |
+++ makefile |
3 |
@@ -11,9 +11,7 @@ |
3 |
@@ -16,8 +16,6 @@ basedir = $(srcdir)/.. |
4 |
srcdir ?= . |
|
|
5 |
|
4 |
|
|
|
5 |
WARNINGS = -Wpedantic -Wall |
6 |
ifdef CLANG |
6 |
ifdef CLANG |
7 |
-CXX = clang++ |
7 |
-CXX = clang++ |
8 |
CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register -Wno-missing-braces |
|
|
9 |
-CC = clang |
8 |
-CC = clang |
10 |
# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for |
9 |
WARNINGS += -Wno-deprecated-register |
11 |
# thread also need to create Position Independent Executable -> search online documentation |
10 |
ifdef windir |
12 |
SANITIZE = address |
11 |
# Turn off some warnings that occur when Clang is being used on Windows where it |
13 |
@@ -49,7 +47,12 @@ DEL = del /q |
12 |
@@ -58,7 +56,12 @@ DEL = del /q |
14 |
COMPLIB=$(srcdir)\..\bin\scintilla.a |
|
|
15 |
else |
13 |
else |
16 |
DEL = rm -f |
14 |
DEL = rm -f |
17 |
-COMPLIB=$(srcdir)/../bin/scintilla.a |
15 |
endif |
|
|
16 |
-COMPLIB=$(basedir)/bin/scintilla.a |
18 |
+COMPLIB_NAME=libscintilla.so |
17 |
+COMPLIB_NAME=libscintilla.so |
19 |
+COMPLIB_SONAME=$(COMPLIB_NAME).$(MAJOR) |
18 |
+COMPLIB_SONAME=$(COMPLIB_NAME).$(MAJOR) |
20 |
+COMPLIB=$(COMPLIB_SONAME).$(AGE).$(REVISION) |
19 |
+COMPLIB=$(COMPLIB_SONAME).$(AGE).$(REVISION) |
Lines 21-31
Link Here
|
21 |
+LEXRLIB_NAME=libscintilla_lexers.so |
20 |
+LEXRLIB_NAME=libscintilla_lexers.so |
22 |
+LEXRLIB_SONAME=$(LEXRLIB_NAME).$(MAJOR) |
21 |
+LEXRLIB_SONAME=$(LEXRLIB_NAME).$(MAJOR) |
23 |
+LEXRLIB=$(LEXRLIB_SONAME).$(AGE).$(REVISION) |
22 |
+LEXRLIB=$(LEXRLIB_SONAME).$(AGE).$(REVISION) |
24 |
endif |
|
|
25 |
|
23 |
|
26 |
vpath %.h $(srcdir) $(srcdir)/../src $(srcdir)/../include $(srcdir)/../lexlib |
24 |
vpath %.h $(srcdir) $(basedir)/src $(basedir)/include $(basedir)/lexlib |
27 |
@@ -87,7 +90,7 @@ CXXTFLAGS:=--std=gnu++17 $(CTFLAGS) $(REFLAGS) |
25 |
vpath %.c $(srcdir) |
28 |
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION)) |
26 |
@@ -81,7 +84,7 @@ CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS |
|
|
27 |
CONFIG_FLAGS:=$(shell pkg-config --cflags $(GTK_VERSION)) |
29 |
MARSHALLER=scintilla-marshal.o |
28 |
MARSHALLER=scintilla-marshal.o |
30 |
|
29 |
|
31 |
-all: $(COMPLIB) |
30 |
-all: $(COMPLIB) |
Lines 32-49
Link Here
|
32 |
+all: $(COMPLIB) $(LEXRLIB) |
31 |
+all: $(COMPLIB) $(LEXRLIB) |
33 |
|
32 |
|
34 |
clean: |
33 |
clean: |
35 |
$(DEL) *.o $(COMPLIB) *.plist |
34 |
$(DEL) *.o $(call normalize,$(COMPLIB)) *.plist |
36 |
@@ -119,9 +122,11 @@ $(COMPLIB): Accessor.o CharacterSet.o DefaultLexer.o L |
35 |
@@ -158,9 +161,11 @@ GTK_OBJS = \ |
37 |
PropSetSimple.o PlatGTK.o \ |
36 |
ScintillaGTK.o \ |
38 |
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o ScintillaGTKAccessible.o CellBuffer.o CharacterCategory.o ViewStyle.o \ |
37 |
ScintillaGTKAccessible.o |
39 |
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o UniqueString.o XPM.o \ |
38 |
|
40 |
- $(MARSHALLER) $(LEXOBJS) |
39 |
-$(COMPLIB): $(SRC_OBJS) $(LEXLIB_OBJS) $(GTK_OBJS) $(MARSHALLER) $(LEX_OBJS) |
41 |
- $(AR) $(ARFLAGS) $@ $^ |
40 |
- $(AR) $(ARFLAGS) $@ $^ |
42 |
- $(RANLIB) $@ |
41 |
- $(RANLIB) $@ |
43 |
+ $(MARSHALLER) |
42 |
+$(COMPLIB): $(SRC_OBJS) $(GTK_OBJS) $(MARSHALLER) |
44 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(COMPLIB_SONAME) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) |
43 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(COMPLIB_SONAME) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) |
45 |
+ |
44 |
+ |
46 |
+$(LEXRLIB): $(LEXOBJS) |
45 |
+$(LEXRLIB): $(LEXLIB_OBJS) $(LEX_OBJS) |
47 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LEXRLIB_SONAME) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) |
46 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LEXRLIB_SONAME) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS) |
48 |
|
47 |
|
49 |
# Automatically generate header dependencies with "make deps" |
48 |
# Automatically generate header dependencies with "make deps" |