summaryrefslogtreecommitdiff
path: root/dev-ml/lablgtk/files/lablgtk-2.18.12-cflags.patch
blob: aeef5c319a6d8df96b6430ce442dbe30d852e032 (plain)
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
diff -ur lablgtk-2.18.12.orig/src/Makefile lablgtk-2.18.12/src/Makefile
--- lablgtk-2.18.12.orig/src/Makefile	2021-12-25 02:23:31.000000000 +0100
+++ lablgtk-2.18.12/src/Makefile	2022-03-04 08:12:28.151812474 +0100
@@ -18,6 +18,7 @@
 
 include $(CONFIG)
 #GTKCFLAGS += -Werror -Wno-error=deprecated-declarations
+CFLAGS=
 
 TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk_pixbuf_mlsource$(XE) \
 	$(THINITOBJS) build.ml
@@ -45,14 +46,13 @@
 
 ifdef DEBUG
 COMPILER += -warn-error A-52-6
-CFLAGS = -g $(GTKCFLAGS)
+OCAMLCFLAGS = $(GTKCFLAGS)
 CUSTOM = -custom
 #MLLINK += -cclib -lcamlrund
 MLBYTEFLAGS = -g -dtypes
 else
-CFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
+OCAMLCFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
 ifneq ($(TOOLCHAIN),msvc)
-CFLAGS += -O
 endif
 endif
 
@@ -65,9 +65,9 @@
 THLINK = unix.cma threads.cma
 
 ifdef USE_CC
-CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(CFLAGS)
+CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(OCAMLCFLAGS) $(CFLAGS)
 else
-CCOMPILER = $(CAMLC) -c -ccopt '$(CFLAGS)' -verbose
+CCOMPILER = $(CAMLC) -c -ccopt '$(OCAMLCFLAGS) $(CFLAGS)' -verbose
 endif
 
 ifdef USE_GL
@@ -123,7 +123,7 @@
 CLIBS += liblablrsvg$(XA)
 RSVGMLOBJS = rsvg.cmo
 RSVGCOBJS = ml_rsvg$(XO)
-$(RSVGCOBJS) : CFLAGS+=$(HAVE_SVGZ)
+$(RSVGCOBJS) : OCAMLCFLAGS+=$(HAVE_SVGZ)
 endif
 
 ifdef USE_GTKSPELL
@@ -140,7 +140,7 @@
 opt::  lablgtksourceview.cmxs
 endif
 
-ml_gtksourceview.o: CFLAGS=$(GTKSOURCEVIEWCFLAGS)
+ml_gtksourceview.o: OCAMLCFLAGS=$(GTKSOURCEVIEWCFLAGS)
 GTKSOURCEVIEWMLOBJS = gtkSourceView.cmo gSourceView.cmo
 GTKSOURCEVIEWCOBJS = ml_gtksourceview$(XO)
 ml_gtksourceview.c: pango_tags.h
@@ -179,7 +179,7 @@
 endif
 
 ifdef USE_GTKQUARTZ
-CFLAGS += -DHAS_GTKQUARTZ
+OCAMLCFLAGS += -DHAS_GTKQUARTZ
 endif
 # Rules
 .SUFFIXES: .ml .mli .cmo .cmi .cmx .cmxs .cmxa .c $(XO) .d$(XO) .var .h .opt .def .ml4
@@ -188,7 +188,7 @@
 .cpp$(XO):
 	$(CCOMPILER) $<
 .c.d$(XO):
-	$(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(CFLAGS)' $<
+	$(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(OCAMLCFLAGS) $(CFLAGS)' $<
 .ml.cmo:
 	$(COMPILER) $(PRINCIPAL) $<
 .mli.cmi: