forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gimp-lensfun-0.2.2-build.patch
34 lines (28 loc) · 1.02 KB
/
gimp-lensfun-0.2.2-build.patch
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
From: Julian Ospald <[email protected]>
Date: Sun Sep 30 13:22:40 UTC 2012
Subject: build system
respect CC, CFLAGS and LDFLAGS
https://bugs.gentoo.org/show_bug.cgi?id=436660
--- Makefile
+++ Makefile
@@ -1,8 +1,9 @@
-CFLAGS = -O3 -Wall $(shell gimptool-2.0 --cflags && pkg-config --cflags lensfun exiv2) -fopenmp
+CXXFLAGS ?= -O3
+CXXFLAGS += -Wall $(shell gimptool-2.0 --cflags && pkg-config --cflags lensfun exiv2) -fopenmp
LIBS = $(shell gimptool-2.0 --libs && pkg-config --libs lensfun exiv2)
PLUGIN = gimplensfun
SOURCES = src/gimplensfun.c
-CC = g++
+CXX ?= g++
# END CONFIG ##################################################################
.PHONY: all install userinstall clean uninstall useruninstall
@@ -12,10 +13,10 @@
OBJECTS = $(subst .c,.o,$(SOURCES))
$(PLUGIN): $(OBJECTS)
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+ $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
%.o: %.c $(HEADERS)
- $(CC) $(CFLAGS) -c -o $@ $*.c
+ $(CXX) $(CXXFLAGS) -c -o $@ $*.c
install: $(PLUGIN)
@gimptool-2.0 --install-admin-bin $^