[download]

local/src/lemonbar/Makefile

   1 # This snippet has been shmelessly stol^Hborrowed from thestinger's repose Makefile
   2 VERSION = 1.3
   3 GIT_DESC=$(shell test -d .git && git describe --always 2>/dev/null)
   4 
   5 ifneq "$(GIT_DESC)" ""
   6 	VERSION=$(GIT_DESC)
   7 endif
   8 
   9 CC	?= gcc
  10 CFLAGS += -Wall -std=c99 -Os -DVERSION="\"$(VERSION)\"" -I/usr/include/freetype2
  11 LDFLAGS += -lxcb -lxcb-xinerama -lxcb-randr -lX11 -lX11-xcb -lXft -lfreetype -lz -lfontconfig
  12 CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long \
  13           -Wsign-conversion -Wconversion -Wimplicit-function-declaration
  14 
  15 EXEC = lemonbar
  16 SRCS = lemonbar.c
  17 OBJS = ${SRCS:.c=.o}
  18 
  19 PREFIX?=~/.local
  20 BINDIR=${PREFIX}/bin
  21 
  22 all: ${EXEC}
  23 
  24 .c.o:
  25 	${CC} ${CFLAGS} -o $@ -c $<
  26 
  27 ${EXEC}: ${OBJS}
  28 	${CC} -o ${EXEC} ${OBJS} ${LDFLAGS}
  29 
  30 debug: ${EXEC}
  31 debug: CC += ${CFDEBUG}
  32 
  33 clean:
  34 	rm -f ./*.o ./*.1
  35 	rm -f ./${EXEC}
  36 
  37 install: lemonbar
  38 	cp -f lemonbar ${DESTDIR}${BINDIR}/lemonbar
  39 
  40 uninstall:
  41 	rm -f ${DESTDIR}${BINDIR}/lemonbar
  42 
  43 .PHONY: all debug clean install