summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-support/spacenav/libspnav/0001-libspnav-cross-compile.patch
blob: 3a33da103d29e58aed106847f9c505a2f56e2632 (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
diff -pruN libspnav-0.2.3.orig/configure libspnav-0.2.3/configure
--- libspnav-0.2.3.orig/configure	2011-11-25 18:36:43.000000000 -0800
+++ libspnav-0.2.3/configure	2016-03-18 04:46:31.327083251 -0700
@@ -8,7 +8,7 @@ DBG=yes
 X11=yes
 
 srcdir="`dirname "$0"`"
-libdir=lib
+libdir=lib64
 
 #if [ "`uname -m`" = 'x86_64' ]; then
 #	libdir=lib64
diff -pruN libspnav-0.2.3.orig/Makefile.in libspnav-0.2.3/Makefile.in
--- libspnav-0.2.3.orig/Makefile.in	2014-08-17 18:38:31.000000000 -0700
+++ libspnav-0.2.3/Makefile.in	2016-03-18 04:46:31.339083251 -0700
@@ -8,10 +8,11 @@ lib_a = lib$(name).a
 incpaths = -I. -I/usr/local/include -I/usr/X11R6/include
 libpaths = -L/usr/local/lib -L/usr/X11R6/lib
 
-CC = gcc
-AR = ar
-CFLAGS = $(opt) $(dbg) -std=c89 $(pic) -pedantic -Wall -fno-strict-aliasing $(incpaths) $(user_cflags)
-LDFLAGS = $(libpaths) $(user_ldflags) $(xlib)
+CC ?= gcc
+AR ?= ar
+CFLAGS ?= -std=c89 -pedantic -Wall -fno-strict-aliasing
+CFLAGS += $(opt) $(dbg) $(pic) -I. $(user_cflags)
+LDFLAGS ?= $(libpaths) $(user_ldflags) $(xlib)
 
 ifeq ($(shell uname -s), Darwin)
 	lib_so = libspnav.dylib
@@ -54,8 +55,8 @@ install: $(lib_a) $(lib_so)
 	cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so)
 	[ -n "$(soname)" ] && \
 		rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) && \
-		ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \
-		ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \
+		ln -s $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \
+		ln -s $(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \
 		true
 	for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done