summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-vpu/imx-vpu-3.10.17-1.0.0/obey-variables.patch
blob: 7071e9ecdd524c2055816a2a0cb85d87856d73fd (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
Obey CFLAGS, LDFLAGS

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Upstream-status: Pending

--- imx-vpu-3.10.17-1.0.0_beta.orig/vpu/Makefile
+++ imx-vpu-3.10.17-1.0.0_beta/vpu/Makefile
@@ -1,5 +1,6 @@
 CC ?=$(CROSS_COMPILE)gcc
 AR ?=$(CROSS_COMPILE)ar
+CFLAGS ?= -O2
 
 # list of platforms which want this test case
 INCLUDE_LIST:= IMX27ADS IMX51 IMX53 IMX6Q
@@ -33,10 +34,10 @@ all install :
 endif
 
 %.o: %.c
-	$(CC) -D$(PLATFORM) -Wall -O2 -fPIC -c $^ -o $@
+	$(CC) -D$(PLATFORM) -Wall -fPIC $(CFLAGS) -c $^ -o $@
 
 $(LIBNAME).so.$(SONAMEVERSION): $(OBJ)
-	$(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ -lpthread
+	$(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ $(LDFLAGS) -lpthread
 
 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
 	ln -s $< $@