summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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