summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-11-07 19:04:18 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-11-07 19:04:18 +0100
commitc58688994ae409c4d9c748a9bc2add16ca02e6de (patch)
treee81a586cd1129a825ea1b115a898f304b5899457 /Makefile
parent20c861a2faf365edccc54142f8176cd517f88cbc (diff)
downloadpianobar-windows-c58688994ae409c4d9c748a9bc2add16ca02e6de.tar.gz
pianobar-windows-c58688994ae409c4d9c748a9bc2add16ca02e6de.tar.bz2
pianobar-windows-c58688994ae409c4d9c748a9bc2add16ca02e6de.zip
Fix compilation with DISABLE_MAD/FAAD
Broken since d39745491dc911c7b7118402d640d54d50e845ab, fixes issue #51
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 11 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index e590bc4..ab79392 100644
--- a/Makefile
+++ b/Makefile
@@ -64,23 +64,23 @@ LIBAO_LIB=-lao
LIBM_LIB=-lm
ifeq (${DISABLE_FAAD}, 1)
- LIBFAAD_INCLUDE=
- LIBFAAD_LIB=
- LIBFAAD_SWITCH=
+ LIBFAAD_CFLAGS=
+ LIBFAAD_LDFLAGS=
else
LIBFAAD_INCLUDE:=/usr/include
LIBFAAD_LIB:=-lfaad
- LIBFAAD_SWITCH=-DENABLE_FAAD
+ LIBFAAD_CFLAGS=-I ${LIBFAAD_INCLUDE} -DENABLE_FAAD
+ LIBFAAD_LDFLAGS=${LIBFAAD_LIB}
endif
ifeq (${DISABLE_MAD}, 1)
- LIBMAD_INCLUDE=
- LIBMAD_LIB=
- LIBMAD_SWITCH=
+ LIBMAD_CFLAGS=
+ LIBMAD_LDFLAGS=
else
LIBMAD_INCLUDE:=/usr/include
LIBMAD_LIB:=-lmad
- LIBMAD_SWITCH=-DENABLE_MAD
+ LIBMAD_CFLAGS=-I ${LIBMAD_INCLUDE} -DENABLE_MAD
+ LIBMAD_LDFLAGS=${LIBMAD_LIB}
endif
PTHREAD_LIB=-pthread
@@ -89,7 +89,7 @@ PTHREAD_LIB=-pthread
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \
${LIBWAITRESS_HDR} ${LIBEZXML_OBJ} ${LIBEZXML_HDR}
${CC} ${CFLAGS} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \
- ${LIBEZXML_OBJ} ${LIBAO_LIB} ${LIBFAAD_LIB} ${LIBMAD_LIB} \
+ ${LIBEZXML_OBJ} ${LIBAO_LIB} ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} \
${PTHREAD_LIB} ${LIBM_LIB} -o $@
# build shared libpiano
@@ -100,9 +100,8 @@ libpiano: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
%.o: %.c
${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \
- -I ${LIBEZXML_INCLUDE} ${LIBFAAD_SWITCH} ${LIBMAD_SWITCH} -c \
- -I ${LIBAO_INCLUDE} -I ${LIBFAAD_INCLUDE} -I ${LIBMAD_INCLUDE} \
- -o $@ $<
+ -I ${LIBEZXML_INCLUDE} -I ${LIBAO_INCLUDE} ${LIBFAAD_CFLAGS} \
+ ${LIBMAD_CFLAGS} -c -o $@ $<
# create position independent code (for shared libraries)
%.lo: %.c