diff --git a/Makefile b/Makefile index 77e738e..3974d03 100644 --- a/Makefile +++ b/Makefile @@ -5,22 +5,25 @@ PREFIX ?= /usr/local BINDIR ?= ${DESTDIR}${PREFIX}/bin MAN1DIR ?= ${DESTDIR}${PREFIX}/man/man1 -CC ?= gcc -CFLAGS += -Wall -ffast-math -fsigned-char -Wno-parantheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops -CFLAGS += -I. -Isrc -Isrc/halloc +CC ?= gcc +CFLAGS ?= -Wall -Wno-parantheses -O3 +FLAGS += -ffast-math -fsigned-char -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops +FLAGS = ${CFLAGS} +FLAGS += -I. -Isrc -Isrc/halloc INSTALL = install INCLUDEFLAGS ?= `pkg-config --cflags oggplay` `imlib2-config --cflags` -LINKFLAGS ?= -L${PREFIX}/lib +LINKFLAGS += -L${PREFIX}/lib LINKFLAGS += `imlib2-config --libs` LINKFLAGS += `pkg-config --libs oggplay` -lvpx +LINKFLAGS += ${LDFLAGS} all: ${PROG} ${PROG}: ${SRC} - ${CC} ${CFLAGS} ${INCLUDEFLAGS} -o ${PROG} ${SRC} ${LINKFLAGS} + ${CC} ${FLAGS} ${INCLUDEFLAGS} -o ${PROG} ${SRC} ${LINKFLAGS} clean: -@rm -f ${PROG} *~ core *.core src/*.o src/halloc/src/*.o