From 41ca10496fd7b295acd23f8462c388dd03999344 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 30 Jul 2018 15:14:49 -0400 Subject: Move graphical programs out of bin I wonder when the last time was something needed -ledit... --- gfx/Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gfx/Makefile (limited to 'gfx/Makefile') 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/%) -- cgit 1.4.1