sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

Makefile (813B)


      1 PREFIX  := /usr/local
      2 CC      := cc
      3 CFLAGS  := -pedantic -Wall -Wno-deprecated-declarations -Os
      4 LDFLAGS := -lX11
      5 
      6 # FreeBSD (uncomment)
      7 #LDFLAGS += -L/usr/local/lib -I/usr/local/include
      8 # # OpenBSD (uncomment)
      9 #LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
     10 
     11 all: options dwmblocks
     12 
     13 options:
     14 	@echo dwmblocks build options:
     15 	@echo "CFLAGS  = ${CFLAGS}"
     16 	@echo "LDFLAGS = ${LDFLAGS}"
     17 	@echo "CC      = ${CC}"
     18 
     19 dwmblocks: dwmblocks.c blocks.def.h blocks.h
     20 	${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
     21 
     22 blocks.h:
     23 	cp blocks.def.h $@
     24 
     25 clean:
     26 	rm -f *.o *.gch dwmblocks
     27 
     28 install: dwmblocks
     29 	mkdir -p ${DESTDIR}${PREFIX}/bin
     30 	cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
     31 	chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
     32 
     33 uninstall:
     34 	rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
     35 
     36 .PHONY: all options clean install uninstall