diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 9 insertions, 19 deletions
@@ -5,6 +5,7 @@ BINDIR:=${PREFIX}/bin LIBDIR:=${PREFIX}/lib MANDIR:=${PREFIX}/share/man CFLAGS:=-O2 -DNDEBUG +LDFLAGS:= CC:=c99 PIANOBAR_DIR=src @@ -61,49 +62,38 @@ LIBEZXML_OBJ=${LIBEZXML_SRC:.c=.o} LIBEZXML_RELOBJ=${LIBEZXML_SRC:.c=.lo} LIBEZXML_INCLUDE=${LIBEZXML_DIR} -LIBAO_INCLUDE=/usr/include -LIBAO_LIB=-lao - -LIBM_LIB=-lm - ifeq (${DISABLE_FAAD}, 1) LIBFAAD_CFLAGS= LIBFAAD_LDFLAGS= else - LIBFAAD_INCLUDE:=/usr/include - LIBFAAD_LIB:=-lfaad - LIBFAAD_CFLAGS=-I ${LIBFAAD_INCLUDE} -DENABLE_FAAD - LIBFAAD_LDFLAGS=${LIBFAAD_LIB} + LIBFAAD_CFLAGS=-DENABLE_FAAD + LIBFAAD_LDFLAGS=-lfaad endif ifeq (${DISABLE_MAD}, 1) LIBMAD_CFLAGS= LIBMAD_LDFLAGS= else - LIBMAD_INCLUDE:=/usr/include - LIBMAD_LIB:=-lmad - LIBMAD_CFLAGS=-I ${LIBMAD_INCLUDE} -DENABLE_MAD - LIBMAD_LDFLAGS=${LIBMAD_LIB} + LIBMAD_CFLAGS=-DENABLE_MAD + LIBMAD_LDFLAGS=-lmad endif -PTHREAD_LIB=-lpthread - # build pianobar pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \ ${LIBWAITRESS_HDR} ${LIBEZXML_OBJ} ${LIBEZXML_HDR} - ${CC} ${CFLAGS} ${LIBAO_LIB} ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} \ - ${PTHREAD_LIB} ${LIBM_LIB} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \ + ${CC} ${CFLAGS} ${LDFLAGS} -lao -lpthread -lm ${LIBFAAD_LDFLAGS} \ + ${LIBMAD_LDFLAGS} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \ ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} # build shared libpiano libpiano: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \ ${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} - ${CC} -shared ${CFLAGS} -o $@.so.0.0.0 ${LIBPIANO_RELOBJ} \ + ${CC} -shared ${CFLAGS} ${LDFLAGS} -o $@.so.0.0.0 ${LIBPIANO_RELOBJ} \ ${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ} %.o: %.c ${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \ - -I ${LIBEZXML_INCLUDE} -I ${LIBAO_INCLUDE} ${LIBFAAD_CFLAGS} \ + -I ${LIBEZXML_INCLUDE} ${LIBFAAD_CFLAGS} \ ${LIBMAD_CFLAGS} -c -o $@ $< # create position independent code (for shared libraries) |