oxframe/Makefile

35 lines
964 B
Makefile
Raw Normal View History

PROG = oxframe
SRC = oxframe.c
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
MAN1DIR ?= ${PREFIX}/man/man1
CC ?= gcc
CFLAGS ?= -D_FILE_OFFSET_BITS=64
CFLAGS += -Wall -ffast-math -fsigned-char
INSTALL = install
INCLUDEFLAGS ?= `pkg-config --cflags oggplay` `imlib2-config --cflags`
LINKFLAGS ?= -L${PREFIX}/lib
#LINKFLAGS += `pkg-config --libs oggplay` `imlib2-config --libs`
LINKFLAGS += `imlib2-config --libs` -L/usr/local/lib /usr/local/lib/liboggplay.a -loggz -lfishsound -ltheora -lvorbisenc -lvorbis -lm -logg -lkate -lpthread
all: ${PROG}
${PROG}: ${SRC}
${CC} -Wall -Wno-parentheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops ${CFLAGS} ${INCLUDEFLAGS} -o ${PROG} $< ${LINKFLAGS}
install: ${PROG}
${INSTALL} -c -m 555 -o root -g bin ${PROG} ${BINDIR}
test -d ${MAN1DIR} || ${INSTALL} -d -o root ${MAN1DIR}
${INSTALL} -c -m 444 -o root -g bin ${MAN} ${MAN1DIR}
clean:
-@rm -f ${PROG} *~ core *.core