40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
PROG = oxframe
|
|
SRC = src/oxframe.c src/nestegg.c
|
|
|
|
PREFIX ?= /usr/local
|
|
BINDIR ?= ${DESTDIR}${PREFIX}/bin
|
|
MAN1DIR ?= ${DESTDIR}${PREFIX}/man/man1
|
|
|
|
CC ?= gcc
|
|
CFLAGS ?= -Wall -Wno-parantheses -O3
|
|
FLAGS += -ffast-math -fsigned-char -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops
|
|
FLAGS = -DHAVE_VP9=1 ${CFLAGS}
|
|
FLAGS += -I. -Isrc
|
|
|
|
INSTALL = install
|
|
|
|
INCLUDEFLAGS ?= `pkg-config --cflags oggplay vpx` `imlib2-config --cflags`
|
|
LINKFLAGS += -L${PREFIX}/lib
|
|
LINKFLAGS += `imlib2-config --libs`
|
|
LINKFLAGS += `pkg-config --libs oggplay vpx`
|
|
LINKFLAGS += ${LDFLAGS}
|
|
LINKFLAGS += -lm
|
|
|
|
all: ${PROG}
|
|
|
|
|
|
${PROG}: ${SRC}
|
|
${CC} -std=c99 ${FLAGS} ${INCLUDEFLAGS} -o ${PROG} ${SRC} ${LINKFLAGS}
|
|
|
|
clean:
|
|
-@rm -f ${PROG} *~ core *.core src/*.o
|
|
|
|
install: ${PROG}
|
|
${INSTALL} -c -m 555 -o root -g bin ${PROG} ${BINDIR}
|
|
${INSTALL} -c -m 555 -o root -g bin oxposterframe ${BINDIR}
|
|
${INSTALL} -c -m 444 -o root -g bin man/oxframe.1 man/oxposterframe.1 ${MAN1DIR}
|
|
|
|
uninstall:
|
|
@rm -f ${BINDIR}/${PROG} ${BINDIR}/oxposterframe ${MAN1DIR}/oxframe.1 ${MAN1DIR}/oxposterframe.1
|
|
|
|
.PHONY: all install uninstall
|