after libsndfile for static linking.
Signed-off-by: "Eric Limpens" <Limpens@gmail.com>
+[Fabrice: add $(SNDFILE_LIBS) to pass all dependencies from pkg-config]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
diff -purN pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2/src/Makefile
--- pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile 2016-02-26 08:06:43.102962592 +0100
app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
- $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
-+ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lsndfile -lm
++ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o $(SNDFILE_LIBS)
rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
- $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
-+ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lsndfile -lm
++ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o $(SNDFILE_LIBS)
rds.o: rds.c waveforms.h
$(CC) $(CFLAGS) rds.c
PIFMRDS_VERSION = 0bf57f9ce0d954365a38d8af8e7be6f28521c3f2
PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION))
-PIFMRDS_DEPENDENCIES = libsndfile
+PIFMRDS_DEPENDENCIES = host-pkgconf libsndfile
PIFMRDS_LICENSE = GPL-3.0+
PIFMRDS_LICENSE_FILES = LICENSE
define PIFMRDS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -ffast-math -c" \
+ SNDFILE_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs sndfile`" \
app rds_wav
endef