dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

Makefile (2182B)


      1 BINS = dwlb
      2 MANS = dwlb.1
      3 
      4 PREFIX = $(HOME)/.local
      5 CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-format-truncation -g
      6 
      7 all: $(BINS)
      8 
      9 clean:
     10 	$(RM) $(BINS) $(addsuffix .o,$(BINS))
     11 
     12 install: all
     13 	install -D -t $(PREFIX)/bin $(BINS)
     14 	install -D -m0644 -t $(PREFIX)/share/man/man1 $(MANS)
     15 
     16 WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
     17 WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
     18 
     19 xdg-shell-protocol.h:
     20 	$(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
     21 xdg-shell-protocol.c:
     22 	$(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
     23 xdg-shell-protocol.o: xdg-shell-protocol.h
     24 
     25 xdg-output-unstable-v1-protocol.h:
     26 	$(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS)/unstable/xdg-output/xdg-output-unstable-v1.xml $@
     27 xdg-output-unstable-v1-protocol.c:
     28 	$(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/unstable/xdg-output/xdg-output-unstable-v1.xml $@
     29 xdg-output-unstable-v1-protocol.o: xdg-output-unstable-v1-protocol.h
     30 
     31 wlr-layer-shell-unstable-v1-protocol.h:
     32 	$(WAYLAND_SCANNER) client-header protocols/wlr-layer-shell-unstable-v1.xml $@
     33 wlr-layer-shell-unstable-v1-protocol.c:
     34 	$(WAYLAND_SCANNER) private-code protocols/wlr-layer-shell-unstable-v1.xml $@
     35 wlr-layer-shell-unstable-v1-protocol.o: wlr-layer-shell-unstable-v1-protocol.h
     36 
     37 dwl-ipc-unstable-v2-protocol.h:
     38 	$(WAYLAND_SCANNER) client-header protocols/dwl-ipc-unstable-v2.xml $@
     39 dwl-ipc-unstable-v2-protocol.c:
     40 	$(WAYLAND_SCANNER) private-code protocols/dwl-ipc-unstable-v2.xml $@
     41 dwl-ipc-unstable-v2-protocol.o: dwl-ipc-unstable-v2-protocol.h
     42 
     43 dwlb.o: utf8.h config.h xdg-shell-protocol.h xdg-output-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h dwl-ipc-unstable-v2-protocol.h
     44 
     45 # Protocol dependencies
     46 dwlb: xdg-shell-protocol.o xdg-output-unstable-v1-protocol.o wlr-layer-shell-unstable-v1-protocol.o dwl-ipc-unstable-v2-protocol.o
     47 
     48 # Library dependencies
     49 dwlb: CFLAGS+=$(shell pkg-config --cflags wayland-client wayland-cursor fcft pixman-1)
     50 dwlb: LDLIBS+=$(shell pkg-config --libs wayland-client wayland-cursor fcft pixman-1) -lrt
     51 
     52 .PHONY: all clean install