summary refs log tree commit diff
path: root/bin/Makefile
blob: 9212d70e0bae92333443aa22eefde6fa497c4196 (plain) (blame)
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
BINS = atch bri dtch hnel jrp pbcopy pbd pbpaste wake watch xx
CWARNS = -Wall -Wextra -Wpedantic

all: $(BINS)

.c:
	$(CC) $(CWARNS) $(CFLAGS) -o $@ $<

atch: dtch
	ln -f dtch atch

dtch: dtch.c
	$(CC) $(CWARNS) $(CFLAGS) -lutil -o dtch dtch.c

hnel: hnel.c
	$(CC) $(CWARNS) $(CFLAGS) -lutil -o hnel hnel.c

jrp: jrp.c
	$(CC) $(CWARNS) $(CFLAGS) -ledit -o jrp jrp.c

pbcopy: pbd
	ln -f pbd pbcopy

pbpaste: pbd
	ln -f pbd pbpaste

clean:
	rm -f $(BINS)

link: $(BINS)
	ln -s -f $(BINS:%=$(PWD)/%) ~/.bin

unlink:
	rm -f $(BINS:%=~/.bin/%)

.PHONY: all clean link unlink