diff options
author | June McEnroe <june@causal.agency> | 2018-07-30 15:14:49 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-07-30 15:14:49 -0400 |
commit | 41ca10496fd7b295acd23f8462c388dd03999344 (patch) | |
tree | 0740757391b2000469f9c3d3f45543aa92061f0b /gfx/Makefile | |
parent | Add Neckbeard Deathcamp (diff) | |
download | src-41ca10496fd7b295acd23f8462c388dd03999344.tar.gz src-41ca10496fd7b295acd23f8462c388dd03999344.zip |
Move graphical programs out of bin
I wonder when the last time was something needed -ledit...
Diffstat (limited to 'gfx/Makefile')
-rw-r--r-- | gfx/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gfx/Makefile b/gfx/Makefile new file mode 100644 index 00000000..f2ae4bee --- /dev/null +++ b/gfx/Makefile @@ -0,0 +1,31 @@ +BINS = brot gfxx +GFX ?= cocoa + +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: 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 $@ + +clean: + rm -f tags *.o $(BINS) + +link: + mkdir -p ~/.local/bin + ln -s -f $(BINS:%=$(PWD)/%) ~/.local/bin + +unlink: + rm -f $(BINS:%=~/.local/bin/%) |