diff options
author | June McEnroe <programble@gmail.com> | 2018-02-04 19:13:05 -0500 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2018-02-04 19:13:05 -0500 |
commit | edbbd92ce0b56141a230eb4bad05cd5e56685112 (patch) | |
tree | ad6d5bd7c3a2bcb8dc991403a325d11b99c05ce3 /bin | |
parent | Avoid doing excessive work in gfxx (diff) | |
download | src-edbbd92ce0b56141a230eb4bad05cd5e56685112.tar.gz src-edbbd92ce0b56141a230eb4bad05cd5e56685112.zip |
Set up Makefile for gfxx-cocoa or gfxx-fb
Diffstat (limited to 'bin')
-rw-r--r-- | bin/.gitignore | 3 | ||||
-rw-r--r-- | bin/Makefile | 25 |
2 files changed, 21 insertions, 7 deletions
diff --git a/bin/.gitignore b/bin/.gitignore index 24c3bf6c..354e7720 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -11,7 +11,10 @@ jrp klon typo watch +gfxx-cocoa +gfxx bri fbatt fbclock +gfxx-fb gfxx diff --git a/bin/Makefile b/bin/Makefile index c7e44d87..78e422bc 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,21 +1,32 @@ ANY_BINS = atch dtch hnel pbcopy pbd pbpaste wake xx BSD_BINS = jrp klon typo watch -LIN_BINS = bri fbatt fbclock gfxx -ALL_BINS = $(ANY_BINS) $(BSD_BINS) $(LIN_BINS) +MAC_BINS = gfxx-cocoa gfxx +LIN_BINS = bri fbatt fbclock gfxx-fb gfxx +ALL_BINS = $(ANY_BINS) $(BSD_BINS) $(MAC_BINS) $(LIN_BINS) CFLAGS += -Wall -Wextra -Wpedantic LDLIBS = -lcurses -ledit -lutil -lz -any: $(ANY_BINS) .gitignore +any: .gitignore $(ANY_BINS) -bsd: $(ANY_BINS) $(BSD_BINS) .gitignore +bsd: any $(BSD_BINS) -linux: $(ANY_BINS) $(LIN_BINS) .gitignore +mac: bsd $(MAC_BINS) + +linux: any $(LIN_BINS) atch: dtch ln -f dtch atch -gfxx: gfxx.o gfb.o +gfxx-cocoa: gfxx.o gfcocoa.o + $(CC) $(LDFLAGS) gfxx.o gfcocoa.o $(LDLIBS) -framework Cocoa -o $@ + +gfxx-fb: gfxx.o gfb.o + $(CC) $(LDFLAGS) gfxx.o gfb.o $(LDLIBS) -o $@ + +gfxx: + [ -f gfxx-cocoa ] && ln -s gfxx-cocoa gfxx || true + [ -f gfxx-fb ] && ln -s gfxx-fb gfxx || true pbcopy pbpaste: pbd ln -f pbd $@ @@ -25,7 +36,7 @@ setuid: bri chmod u+s bri clean: - rm -f $(ALL_BINS) + rm -f *.o $(ALL_BINS) link: ln -s -f $(ALL_BINS:%=$(PWD)/%) ~/.bin |