Makefile (647B)
1 CC ?= gcc 2 CFLAGS += -std=c99 -Wall -Wextra -pedantic -Wold-style-declaration 3 CFLAGS += -Wmissing-prototypes -Wno-unused-parameter 4 CFLAGS += $(shell pkg-config --cflags freetype2 xft x11) 5 LIBS = $(shell pkg-config --libs x11 xft freetype2) 6 LIBS += -lm -pthread 7 8 PREFIX ?= /usr 9 BINDIR ?= $(PREFIX)/bin 10 11 all: nyxwm 12 13 config.h: 14 cp config.def.h config.h 15 16 nyxwm: nyxwm.c nyxwmblocks.c nyxwm.h config.h blocks.h Makefile 17 $(CC) -O3 $(CFLAGS) -o $@ nyxwm.c nyxwmblocks.c $(LIBS) 18 19 install: all 20 install -Dm755 nyxwm $(DESTDIR)$(BINDIR)/nyxwm 21 22 uninstall: 23 rm -f $(DESTDIR)$(BINDIR)/nyxwm 24 25 clean: 26 rm -f nyxwm *.o 27 28 .PHONY: all install uninstall clean