monsterwm

Personal build of monsterwm
git clone git://git.gormless.xyz/monsterwm.git
Log | Files | Refs | README | LICENSE

Makefile (1438B)


      1 # Makefile for monsterwm - see LICENSE for license and copyright information
      2 
      3 VERSION = matus-mail
      4 APPNAME = mopag
      5 
      6 PREFIX ?= /usr/local
      7 BINDIR ?= ${PREFIX}/bin
      8 MANPREFIX = ${PREFIX}/share/man
      9 
     10 X11INC = /usr/X11R6/include
     11 X11LIB = /usr/X11R6/lib
     12 
     13 INCS = -I. -I/usr/include -I${X11INC}
     14 LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
     15 
     16 CPPFLAGS = -DVERSION=\"${VERSION}\" -DAPPNAME=\"${APPNAME}\"
     17 CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os ${INCS} ${CPPFLAGS}
     18 LDFLAGS  = -s ${LIBS}
     19 
     20 CC 	 = cc
     21 EXEC = ${APPNAME}
     22 
     23 SRC = ${APPNAME}.c
     24 OBJ = ${SRC:.c=.o}
     25 
     26 all: options ${APPNAME}
     27 
     28 options:
     29 	@echo ${APPNAME} build options:
     30 	@echo "CFLAGS   = ${CFLAGS}"
     31 	@echo "LDFLAGS  = ${LDFLAGS}"
     32 	@echo "CC       = ${CC}"
     33 
     34 .c.o:
     35 	@echo CC $<
     36 	@${CC} -c ${CFLAGS} $<
     37 
     38 ${APPNAME}: ${OBJ}
     39 	@echo CC -o $@
     40 	@${CC} -o $@ ${OBJ} ${LDFLAGS}
     41 
     42 clean:
     43 	@echo cleaning
     44 	@rm -fv ${APPNAME} ${OBJ} ${APPNAME}-${VERSION}.tar.gz
     45 
     46 install: all
     47 	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
     48 	@install -Dm755 ${APPNAME} ${DESTDIR}${PREFIX}/bin/${APPNAME}
     49 	#@echo installing manual page to ${DESTDIR}${MANPREFIX}/man.1
     50 	#@install -Dm644 ${APPNAME}.1 ${DESTDIR}${MANPREFIX}/man1/${APPNAME}.1
     51 
     52 uninstall:
     53 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
     54 	@rm -f ${DESTDIR}${PREFIX}/bin/${APPNAME}
     55 	#@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
     56 	#@rm -f ${DESTDIR}${MANPREFIX}/man1/${APPNAME}.1
     57 
     58 .PHONY: all options clean install uninstall