summaryrefslogtreecommitdiff
path: root/recipes-multimedia/kokkinizita/zita-resampler/0001-Align-Makefiles.patch
blob: 09f7bfe83a1949f5796ebef1b167838aba4845db (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
77
78
79
80
81
82
83
84
85
86
87
From 23dd312b270330a0df18b229b9f68bc74c72934b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 2 Aug 2017 17:34:18 +0200
Subject: [PATCH] Align Makefiles
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* don't hardcode g++
* remove -march=native from CXXFLAGS
* make ldconfig work on installed directory only
* do not add host path to link flags

Upstream-Status: Pending

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 apps/Makefile | 6 ++----
 libs/Makefile | 5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/apps/Makefile b/apps/Makefile
index f009937..9329b25 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -24,10 +24,8 @@ LIBDIR = lib$(SUFFIX)
 DISTDIR = zresample-$(VERSION)
 VERSION = 1.6.0
 MANDIR = /usr/share/man/man1
-LDFLAGS += -L$(PREFIX)/$(LIBDIR)
 CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\"
 CXXFLAGS += -O3  -ffast-math -Wall
-CXXFLAGS += -march=native
 
 
 all:	zresample zretune zresample.1.gz zretune.1.gz
@@ -36,7 +34,7 @@ all:	zresample zretune zresample.1.gz zretune.1.gz
 ZRESAMPLE_O = zresample.o audiofile.o dither.o
 zresample:	LDLIBS += -lzita-resampler -lsndfile -lrt
 zresample:	$(ZRESAMPLE_O)
-	g++ $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
+	$(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
 $(ZRESAMPLE_O):
 -include $(ZRESAMPLE_O:%.o=%.d)
 
@@ -44,7 +42,7 @@ $(ZRESAMPLE_O):
 ZRETUNE_O = zretune.o audiofile.o dither.o
 zretune:	LDLIBS += -lzita-resampler -lsndfile -lrt
 zretune:	$(ZRETUNE_O)
-	g++ $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
+	$(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
 $(ZRETUNE_O):
 -include $(ZRETUNE_O:%.o=%.d)
 
diff --git a/libs/Makefile b/libs/Makefile
index 15b0471..575e670 100644
--- a/libs/Makefile
+++ b/libs/Makefile
@@ -32,7 +32,6 @@ DISTDIR = zita-resampler-$(VERSION)
 
 CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
 CXXFLAGS += -Wall -fPIC -O2 -ffast-math
-CXXFLAGS += -march=native
 LDFLAGS += 
 LDLIBS +=
 
@@ -47,7 +46,7 @@ ZITA-RESAMPLER_H = zita-resampler/resampler.h zita-resampler/resampler-table.h \
 
 
 $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O)
-	g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
+	$(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
 
 $(ZITA-RESAMPLER_O):	$(ZITA-RESAMPLER_H)
 
@@ -58,7 +57,7 @@ install:	$(ZITA-RESAMPLER_MIN)
 	install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler
 	install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
 	ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO)
-	ldconfig
+	ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
 
 uninstall:
 	/bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler
-- 
2.14.3