lemonbar/Makefile

55 lines
1.0 KiB
Makefile
Raw Normal View History

2012-07-16 09:41:34 +00:00
CC ?= gcc
STRIP ?= strip
CFLAGS = -std=c99 -O2
<<<<<<< HEAD
2014-02-08 15:45:38 +00:00
LDFLAGS = -lxcb -lxcb-xinerama
=======
LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr
>>>>>>> 59fb6c5... Ported randr code to wip branch, plus some fixes.
2012-07-16 09:41:34 +00:00
CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\
-Wsign-conversion -Wconversion -Wimplicit-function-declaration
EXEC = bar
SRCS = bar.c
OBJS = ${SRCS:.c=.o}
2012-10-20 16:47:42 +00:00
PREFIX?=/usr
2012-07-16 09:41:34 +00:00
BINDIR=${PREFIX}/bin
all: ${EXEC}
.c.o:
${CC} ${CFLAGS} -o $@ -c $<
${OBJS}: config.h
config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
2012-07-16 09:41:34 +00:00
${EXEC}: ${OBJS}
2013-08-18 19:04:21 +00:00
${CC} -o ${EXEC} ${OBJS} ${LDFLAGS}
2012-07-16 09:41:34 +00:00
${STRIP} -s ${EXEC}
debug: ${EXEC}
debug: CC += ${CFDEBUG}
clean:
<<<<<<< HEAD
2012-07-16 09:41:34 +00:00
rm -rf ./*.o
rm -rf ./${EXEC}
=======
rm -f ./config.h
rm -f ./*.o
rm -f ./${EXEC}
>>>>>>> 59fb6c5... Ported randr code to wip branch, plus some fixes.
2012-07-16 09:41:34 +00:00
install: bar
test -d ${DESTDIR}${BINDIR} || mkdir -p ${DESTDIR}${BINDIR}
install -m755 bar ${DESTDIR}${BINDIR}/bar
2012-10-12 12:14:39 +00:00
uninstall:
rm -f ${DESTDIR}${BINDIR}/bar
2012-07-16 09:41:34 +00:00
.PHONY: all debug clean install