summary refs log tree commit diff
path: root/gfx/Makefile
blob: 93f04ec08bd10618f659870e432f571db3a2b7be (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
37
38
39
40
41
42
43
GFX ?= cocoa
PREFIX = ~/.local

BINS = brot gfxx
MAN1 = $(BINS:%=%.1)

CFLAGS += -Wall -Wextra -Wpedantic
LDLIBS = -lm -lz
LDLIBS_cocoa = -framework Cocoa
LDLIBS_x11 = -lX11

all: .gitignore tags $(BINS)

.gitignore: Makefile
	echo '*.o' tags $(BINS) | tr ' ' '\n' > .gitignore

tags: *.h *.c
	ctags -w *.h *.c

brot.o gfxx.o: gfx.h

cocoa.o fb.o x11.o: gfx.h

brot: brot.o $(GFX).o
	$(CC) $(LDFLAGS) brot.o $(GFX).o $(LDLIBS) $(LDLIBS_$(GFX)) -o $@

gfxx: gfxx.o $(GFX).o
	$(CC) $(LDFLAGS) gfxx.o $(GFX).o $(LDLIBS) $(LDLIBS_$(GFX)) -o $@

README: gfx.7
	mandoc gfx.7 | sed $$'s/.\b//g' > README

clean:
	rm -f tags *.o $(BINS)

link:
	mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1
	ln -s -f $(BINS:%=$(PWD)/%) $(PREFIX)/bin
	ln -s -f $(MAN1:%=$(PWD)/%) $(PREFIX)/share/man/man1

unlink:
	rm -f $(BINS:%=$(PREFIX)/bin/%)
	rm -f $(MAN1:%=$(PREFIX)/share/man/man1/%)
ow=1'>Remove leading blank linesJune McEnroe 2017-09-27Add merge.c to READMEJune McEnroe 2017-09-03Assert client coords are valid after movementJune McEnroe 2017-09-03Relicense AGPLJune McEnroe I know it's already published under a permissive license in what is probably its final form, but I want to license it AGPL anyway on principle following some conversations I had about open source, corporations and copyleft. 2017-09-01Revert "Add client readOnly mode"June McEnroe This reverts commit 34f25ae40a3db9369e9d98b3814f2b93bbc21451. 2017-09-01Remove clientRemove call from clientCastJune McEnroe If an error occurs on a client socket during a broadcast, that client will show up in the kqueue loop with EV_EOF and get removed that way. Tested by sending SIGKILL to a client and watching its cursor disappear. 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe Choose the version with the most recent access if the modify times are the same. 2017-08-31Choose B for tiles with equal modify timesJune McEnroe This way newer access counts and times will be preserved. 2017-08-31Add quick data file merge toolJune McEnroe Hopefully I won't have to use it ever again. 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe Why was it down there? 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe