The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / pifmrds / 0001-Makefile-cross-compile-friendly.patch
1 Makefile: make it cross-compile (and Buildroot) friendly.
2
3 The current Makefile makes heavy assumptions that it is doing native
4 compilation on the RPi, as it checks that `uname -m` is an ARM machine.
5
6 This is wrong in the cross-compilation case.
7
8 Remove the conditional altogether, and do not override the CFLAGS
9 as passed in the environment (Buildroot passes proper CFLAGS).
10
11 [intial patch by: Eric Limpens <limpens@gmail.com>]
12 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
13
14 diff -durN pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile
15 --- pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile  2014-05-04 18:21:40.000000000 +0200
16 +++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile       2014-06-21 16:38:31.971804343 +0200
17 @@ -1,20 +1,8 @@
18  CC = gcc
19 -STD_CFLAGS = -Wall -std=gnu99 -c -g -O3
20  
21 -# Enable ARM-specific options only on ARM, and compilation of the app only on ARM
22 -UNAME := $(shell uname -m)
23 -
24 -ifeq ($(UNAME), armv6l)
25 -       CFLAGS = $(STD_CFLAGS) -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
26 -
27  app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
28         $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
29  
30 -else
31 -       CFLAGS = $(STD_CFLAGS)
32 -endif
33 -
34 -
35  rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
36         $(CC) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
37