aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 8ab4f97d25a0025007998f4cf6114d8f06a2a5a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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