Lines 1-129
Link Here
|
1 |
--- make_freebsd.mak.orig 2018-03-01 07:35:22.000000000 +0100 |
1 |
--- make_freebsd.mak.orig 2019-06-16 14:13:00.662279000 +0200 |
2 |
+++ make_freebsd.mak 2018-06-27 11:33:21.105457000 +0200 |
2 |
+++ make_freebsd.mak 2019-06-16 14:13:42.907728000 +0200 |
3 |
@@ -9,7 +9,7 @@ |
3 |
@@ -12,7 +12,7 @@ |
4 |
# IBM Corporation - initial API and implementation |
4 |
# IBM Corporation - initial API and implementation |
5 |
#******************************************************************************* |
5 |
#******************************************************************************* |
6 |
|
6 |
|
7 |
-# Makefile for creating SWT libraries for Linux GTK |
7 |
-# Makefile for creating SWT libraries for Linux GTK |
8 |
+# Makefile for creating SWT libraries for FreeBSD GTK |
8 |
+# Makefile for creating SWT libraries for FreeBSD GTK |
9 |
|
9 |
|
10 |
include make_common.mak |
10 |
# SWT debug flags for various SWT components. |
|
|
11 |
#SWT_WEBKIT_DEBUG = -DWEBKIT_DEBUG |
12 |
@@ -26,7 +26,6 @@ |
11 |
|
13 |
|
12 |
@@ -43,7 +43,7 @@ |
14 |
include make_common.mak |
13 |
|
15 |
|
14 |
# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) |
16 |
-SWT_VERSION=$(maj_ver)$(min_ver)r$(rev) |
15 |
GTKCFLAGS = `pkg-config --cflags gtk+-2.0 gtk+-unix-print-$(GTK_VERSION)` |
17 |
GTK_VERSION?=3.0 |
16 |
-GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib $(XLIB64) -lXtst |
|
|
17 |
+GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L$(LOCALBASE)/lib $(XLIB64) -lXtst |
18 |
|
18 |
|
19 |
AWT_LFLAGS = -shared |
19 |
# Define the various shared libraries to be build. |
20 |
AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt |
20 |
@@ -56,7 +55,7 @@ |
21 |
@@ -51,7 +51,8 @@ |
21 |
# Webkit extension lib has to be put into a separate folder and is treated differently from the other libraries. |
22 |
ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0 gtk+-unix-print-$(GTK_VERSION)` |
22 |
WEBKIT_EXTENSION_LIB = lib$(WEBKIT_EXTENSION_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so |
23 |
ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 |
23 |
WEBEXTENSION_BASE_DIR = webkitextensions |
|
|
24 |
-WEBEXTENSION_DIR = $(WEBEXTENSION_BASE_DIR)$(maj_ver)$(min_ver)r$(rev) |
25 |
+WEBEXTENSION_DIR = $(WEBEXTENSION_BASE_DIR)$(SWT_VERSION) |
24 |
|
26 |
|
25 |
-GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm |
27 |
CAIROCFLAGS = `pkg-config --cflags cairo` |
26 |
+GLXCFLAGS = -I$(LOCALBASE)/include |
28 |
CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo |
|
|
29 |
@@ -64,9 +63,9 @@ |
30 |
# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) |
31 |
GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)` |
32 |
ifeq ($(GTK_VERSION), 4.0) |
33 |
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-4 -lcairo -lgthread-2.0 |
34 |
+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L$(LOCALBASE)/lib -lgtk-4 -lcairo -lgthread-2.0 |
35 |
else |
36 |
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 |
37 |
+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L$(LOCALBASE)/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 |
38 |
endif |
39 |
|
40 |
AWT_LFLAGS = -shared ${SWT_LFLAGS} |
41 |
@@ -75,12 +74,13 @@ |
42 |
ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)` |
43 |
ATKLIBS = `pkg-config --libs-only-L atk` -latk-1.0 |
44 |
|
45 |
-GLXLIBS = -lGL -lGLU -lm |
27 |
+GLXLIBS = -L$(LOCALBASE)/lib -lGL -lGLU -lm |
46 |
+GLXLIBS = -L$(LOCALBASE)/lib -lGL -lGLU -lm |
|
|
47 |
+GLXCFLAGS = -I$(LOCALBASE)/include |
28 |
|
48 |
|
29 |
# Uncomment for Native Stats tool |
49 |
# Uncomment for Native Stats tool |
30 |
#NATIVE_STATS = -DNATIVE_STATS |
50 |
#NATIVE_STATS = -DNATIVE_STATS |
31 |
@@ -70,14 +71,24 @@ |
|
|
32 |
-I$(JAVA_HOME)/include/freebsd \ |
33 |
${SWT_PTR_CFLAGS} |
34 |
MOZILLALFLAGS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic |
35 |
- |
36 |
+MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \ |
37 |
+ -DNO__1XPCOMGlueStartup \ |
38 |
+ -DNO__1XPCOMGlueLoadXULFunctions \ |
39 |
+ -DNO_memmove__ILorg_eclipse_swt_internal_mozilla_nsDynamicFunctionLoad_2I \ |
40 |
+ -DNO_memmove__JLorg_eclipse_swt_internal_mozilla_nsDynamicFunctionLoad_2J \ |
41 |
+ -DNO_nsDynamicFunctionLoad_1sizeof \ |
42 |
+ -DNO__1Call__IIIIII \ |
43 |
+ -DNO__1Call__JJJJJI \ |
44 |
+ -DNO_nsDynamicFunctionLoad |
45 |
+XULRUNNEREXCLUDES = -DNO__1NS_1InitXPCOM2 |
46 |
+ |
47 |
SWT_OBJECTS = swt.o c.o c_stats.o callback.o |
48 |
AWT_OBJECTS = swt_awt.o |
49 |
SWTPI_OBJECTS = swt.o os.o os_structs.o os_custom.o os_stats.o |
50 |
CAIRO_OBJECTS = swt.o cairo.o cairo_structs.o cairo_stats.o |
51 |
ATK_OBJECTS = swt.o atk.o atk_structs.o atk_custom.o atk_stats.o |
52 |
MOZILLA_OBJECTS = swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o |
53 |
-XULRUNNER_OBJECTS = swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o xpcomxulglue.o xpcomxulglue_stats.o |
54 |
+XULRUNNER_OBJECTS = swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o |
55 |
XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o |
56 |
GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o |
57 |
|
51 |
|
58 |
@@ -85,17 +96,18 @@ |
52 |
-WEBKITLIBS = `pkg-config --libs-only-l gio-2.0` |
59 |
-DSWT_VERSION=$(SWT_VERSION) \ |
53 |
+WEBKITLIBS = `pkg-config --libs-only-l gio-2.0` $(XLIB64) -L$(LOCALBASE)/lib |
60 |
$(NATIVE_STATS) \ |
54 |
WEBKITCFLAGS = `pkg-config --cflags gio-2.0` |
61 |
-DFREEBSD -DGTK \ |
55 |
|
62 |
+ -I$(LOCALBASE)/include \ |
56 |
WEBKIT_EXTENSION_CFLAGS=`pkg-config --cflags gtk+-3.0 webkit2gtk-web-extension-4.0` |
|
|
57 |
@@ -108,17 +108,18 @@ |
58 |
$(SWT_WEBKIT_DEBUG) \ |
59 |
-DLINUX -DGTK \ |
63 |
-I$(JAVA_HOME)/include \ |
60 |
-I$(JAVA_HOME)/include \ |
64 |
-I$(JAVA_HOME)/include/freebsd \ |
61 |
- -I$(JAVA_HOME)/include/linux \ |
65 |
-fPIC \ |
62 |
+ -I$(JAVA_HOME)/include/freebsd \ |
|
|
63 |
+ -I$(LOCALBASE)/include \ |
66 |
${SWT_PTR_CFLAGS} |
64 |
${SWT_PTR_CFLAGS} |
67 |
LFLAGS = -shared -fPIC |
65 |
LFLAGS = -shared -fPIC ${SWT_LFLAGS} |
68 |
|
66 |
|
69 |
-ifndef NO_STRIP |
67 |
ifndef NO_STRIP |
|
|
68 |
- # -s = Remove all symbol table and relocation information from the executable. |
69 |
- # i.e, more efficent code, but removes debug information. Should not be used if you want to debug. |
70 |
- # https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options |
71 |
- # http://stackoverflow.com/questions/14175040/effects-of-removing-all-symbol-table-and-relocation-information-from-an-executab |
70 |
- AWT_LFLAGS := $(AWT_LFLAGS) -s |
72 |
- AWT_LFLAGS := $(AWT_LFLAGS) -s |
71 |
- MOZILLALFLAGS := $(MOZILLALFLAGS) -s |
|
|
72 |
- LFLAGS := $(LFLAGS) -s |
73 |
- LFLAGS := $(LFLAGS) -s |
73 |
-endif |
74 |
+# -s = Remove all symbol table and relocation information from the executable. |
74 |
+.ifndef NO_STRIP |
75 |
+# i.e, more efficent code, but removes debug information. Should not be used if you want to debug. |
|
|
76 |
+# https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options |
77 |
+# http://stackoverflow.com/questions/14175040/effects-of-removing-all-symbol-table-and-relocation-information-from-an-executab |
75 |
+AWT_LFLAGS := $(AWT_LFLAGS) -s |
78 |
+AWT_LFLAGS := $(AWT_LFLAGS) -s |
76 |
+MOZILLALFLAGS := $(MOZILLALFLAGS) -s |
|
|
77 |
+LFLAGS := $(LFLAGS) -s |
79 |
+LFLAGS := $(LFLAGS) -s |
78 |
+.endif |
80 |
endif |
79 |
|
|
|
80 |
all: make_swt make_atk make_glx |
81 |
|
82 |
@@ -173,16 +185,16 @@ |
83 |
$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} |
84 |
|
85 |
xpcom.o: xpcom.cpp |
86 |
- $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp |
87 |
+ $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp |
88 |
|
89 |
xpcom_structs.o: xpcom_structs.cpp |
90 |
- $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom_structs.cpp |
91 |
+ $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_structs.cpp |
92 |
|
93 |
xpcom_custom.o: xpcom_custom.cpp |
94 |
- $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom_custom.cpp |
95 |
+ $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_custom.cpp |
96 |
|
97 |
xpcom_stats.o: xpcom_stats.cpp |
98 |
- $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom_stats.cpp |
99 |
+ $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_stats.cpp |
100 |
|
101 |
# |
102 |
# XULRunner lib |
103 |
@@ -193,22 +205,16 @@ |
104 |
$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} |
105 |
|
106 |
xpcomxul.o: xpcom.cpp |
107 |
- $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp |
108 |
+ $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp |
109 |
|
110 |
xpcomxul_structs.o: xpcom_structs.cpp |
111 |
- $(CXX) -o xpcomxul_structs.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom_structs.cpp |
112 |
+ $(CXX) -o xpcomxul_structs.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_structs.cpp |
113 |
|
114 |
xpcomxul_custom.o: xpcom_custom.cpp |
115 |
- $(CXX) -o xpcomxul_custom.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom_custom.cpp |
116 |
+ $(CXX) -o xpcomxul_custom.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_custom.cpp |
117 |
|
118 |
xpcomxul_stats.o: xpcom_stats.cpp |
119 |
- $(CXX) -o xpcomxul_stats.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom_stats.cpp |
120 |
- |
121 |
-xpcomxulglue.o: xpcomglue.cpp |
122 |
- $(CXX) -o xpcomxulglue.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcomglue.cpp |
123 |
- |
124 |
-xpcomxulglue_stats.o: xpcomglue_stats.cpp |
125 |
- $(CXX) -o xpcomxulglue_stats.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcomglue_stats.cpp |
126 |
+ $(CXX) -o xpcomxul_stats.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_stats.cpp |
127 |
|
81 |
|
128 |
# |
82 |
all: make_swt make_atk make_glx make_webkit |
129 |
# XPCOMInit lib |
|
|