CC=cc CFLAGS+=-std=c99 -pedantic -Wall -Wextra -O2 LDFLAGS+=-lX11 -lXft INSTALL=/usr/local/bin TSARBAR_OUT=tsarbar TSARC_OUT=tsarc TSARBAR_SRC=src/tsar.c src/pipe.c src/bardata.c TSARC_SRC=src/tsarc.c .PHONY: default all run clean install uninstall default: all all: $(TSARBAR_OUT) $(TSARC_OUT) # Project should be small enough that we should be able to ignore incremental # compilation $(TSARBAR_OUT): $(TSARBAR_SRC) $(CC) $(TSARBAR_SRC) -o $(TSARBAR_OUT) $(CFLAGS) -I/usr/include/freetype2 $(LDFLAGS) $(TSARC_OUT): $(TSARC_SRC) $(CC) $(TSARC_SRC) -o $(TSARC_OUT) $(CFLAGS) %.c: run: $(TSARBAR_OUT) ./$(TSARBAR_OUT) clean: rm $(TSARBAR_OUT) rm $(TSARC_OUT) install: all cp tsarbar $(INSTALL)/tsarbar cp tsarc $(INSTALL)/tsarc uninstall: rm $(INSTALL)/tsarbar rm $(INSTALL)/tsarc