diff options
author | June McEnroe <june@causal.agency> | 2019-01-17 14:50:03 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-01-17 14:50:03 -0500 |
commit | 547f58947034e590ba4c2adcfcbfed6b8c88d6f3 (patch) | |
tree | e6c219f33210e7336244fb18ec7259df492ff917 | |
parent | Don't use string functions in ttpre (diff) | |
download | src-547f58947034e590ba4c2adcfcbfed6b8c88d6f3.tar.gz src-547f58947034e590ba4c2adcfcbfed6b8c88d6f3.zip |
Reorganize bin and Makefile once again
Diffstat (limited to '')
-rw-r--r-- | bin/.gitignore | 16 | ||||
-rw-r--r-- | bin/Makefile | 93 | ||||
-rw-r--r-- | bin/bin.7 (renamed from bin/man/bin.7) | 0 | ||||
l--------- | bin/man1/atch.1 (renamed from bin/man/atch.1) | 0 | ||||
-rw-r--r-- | bin/man1/bri.1 (renamed from bin/man/bri.1) | 0 | ||||
-rw-r--r-- | bin/man1/dtch.1 (renamed from bin/man/dtch.1) | 0 | ||||
-rw-r--r-- | bin/man1/fbatt.1 (renamed from bin/man/fbatt.1) | 0 | ||||
-rw-r--r-- | bin/man1/fbclock.1 (renamed from bin/man/fbclock.1) | 0 | ||||
-rw-r--r-- | bin/man1/glitch.1 (renamed from bin/man/glitch.1) | 0 | ||||
-rw-r--r-- | bin/man1/hnel.1 (renamed from bin/man/hnel.1) | 0 | ||||
-rw-r--r-- | bin/man1/modem.1 (renamed from bin/man/modem.1) | 0 | ||||
-rw-r--r-- | bin/man1/pbd.1 (renamed from bin/man/pbd.1) | 0 | ||||
-rw-r--r-- | bin/man1/pngo.1 (renamed from bin/man/pngo.1) | 0 | ||||
-rw-r--r-- | bin/man1/psf2png.1 (renamed from bin/man/psf2png.1) | 0 | ||||
-rw-r--r-- | bin/man1/psfed.1 (renamed from bin/man/psfed.1) | 0 | ||||
-rw-r--r-- | bin/man1/scheme.1 (renamed from bin/man/scheme.1) | 0 | ||||
-rw-r--r-- | bin/man1/ttpre.1 (renamed from bin/man/ttpre.1) | 0 | ||||
-rw-r--r-- | bin/man1/wake.1 (renamed from bin/man/wake.1) | 0 | ||||
-rw-r--r-- | bin/man1/wat.1 (renamed from bin/man/wat.1) | 0 | ||||
-rw-r--r-- | bin/man1/xx.1 (renamed from bin/man/xx.1) | 0 |
20 files changed, 56 insertions, 53 deletions
diff --git a/bin/.gitignore b/bin/.gitignore index 368eb70d..5171e93d 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,9 +1,9 @@ *.o -scheme.h -scheme.png -tags atch +bri dtch +fbatt +fbclock glitch hnel modem @@ -13,12 +13,12 @@ pbd pbpaste pngo psf2png +psfed scheme +scheme.h +scheme.png +tags ttpre wake -xx wat -bri -fbatt -fbclock -psfed +xx diff --git a/bin/Makefile b/bin/Makefile index e4bd753b..9ac12f16 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,39 +1,43 @@ PREFIX = ~/.local - -BIN += atch -BIN += dtch -BIN += glitch -BIN += hnel -BIN += modem -BIN += open -BIN += pbcopy -BIN += pbd -BIN += pbpaste -BIN += pngo -BIN += psf2png -BIN += scheme -BIN += ttpre -BIN += wake -BIN += xx - -BIN_BSD += wat - -BIN_LINUX += bri -BIN_LINUX += fbatt -BIN_LINUX += fbclock -BIN_LINUX += psfed - -BIN_ALL = $(BIN) $(BIN_BSD) $(BIN_LINUX) -MAN_ALL = $(BIN_ALL:%=man/%.1) - -CFLAGS += -Wall -Wextra -Wpedantic +MANDIR = $(PREFIX)/share/man + +BINS += atch +BINS += dtch +BINS += glitch +BINS += hnel +BINS += modem +BINS += open +BINS += pbcopy +BINS += pbd +BINS += pbpaste +BINS += pngo +BINS += psf2png +BINS += scheme +BINS += ttpre +BINS += wake +BINS += xx + +BINS_BSD += wat + +BINS_LINUX += bri +BINS_LINUX += fbatt +BINS_LINUX += fbclock +BINS_LINUX += psfed + +BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_LINUX) +MAN1_ALL = $(BINS_ALL:%=man1/%.1) + +CFLAGS += -std=c11 -Wall -Wextra -Wpedantic LDLIBS = -lm -lutil -lz -any: .gitignore tags $(BIN) +any: .gitignore tags $(BINS) + +bsd: any $(BINS_BSD) -bsd: any $(BIN_BSD) +linux: any $(BINS_LINUX) -linux: any $(BIN_LINUX) +.o: + $(CC) $(LDFLAGS) $< $(LDLIBS) -o $@ scheme.h: scheme ./scheme -c > scheme.h @@ -48,32 +52,31 @@ atch: dtch open pbcopy pbpaste: pbd ln -f pbd $@ -scheme.png: scheme - ./scheme -t -g > scheme.png +.gitignore: Makefile + echo $(BINS_ALL) tags scheme.h scheme.png '*.o' \ + | tr ' ' '\n' | sort > .gitignore tags: *.h *.c ctags -w *.h *.c -.gitignore: Makefile - echo '*.o' scheme.h scheme.png tags $(BIN_ALL) \ - | tr ' ' '\n' \ - > .gitignore +scheme.png: scheme + ./scheme -gt > scheme.png clean: - rm -f *.o scheme.h scheme.png tags $(BIN_ALL) + rm -f $(BINS_ALL) tags scheme.h scheme.png *.o -README: man/bin.7 - mandoc man/bin.7 | col -b -x > README +README: bin.7 + mandoc bin.7 | col -bx > README setuid: bri chown root bri chmod u+s bri link: - mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 - ln -s -f $(BIN_ALL:%=$(PWD)/%) $(PREFIX)/bin - ln -s -f $(MAN_ALL:%=$(PWD)/%) $(PREFIX)/share/man/man1 + install -d $(PREFIX)/bin $(MANDIR)/man1 + ln -fs $(BINS_ALL:%=$(PWD)/%) $(PREFIX)/bin + ln -fs $(MAN1_ALL:%=$(PWD)/%) $(MANDIR)/man1 unlink: - rm -f $(BIN_ALL:%=$(PREFIX)/bin/%) - rm -f $(MAN_ALL:man/%=$(PREFIX)/share/man/man1/%) + rm -f $(BINS_ALL:%=$(PREFIX)/bin/%) + rm -f $(MAN1_ALL:%=$(MANDIR)/%) diff --git a/bin/man/bin.7 b/bin/bin.7 index 4c5df7f0..4c5df7f0 100644 --- a/bin/man/bin.7 +++ b/bin/bin.7 diff --git a/bin/man/atch.1 b/bin/man1/atch.1 index 9765e8d6..9765e8d6 120000 --- a/bin/man/atch.1 +++ b/bin/man1/atch.1 diff --git a/bin/man/bri.1 b/bin/man1/bri.1 index 54a02322..54a02322 100644 --- a/bin/man/bri.1 +++ b/bin/man1/bri.1 diff --git a/bin/man/dtch.1 b/bin/man1/dtch.1 index f8ec9296..f8ec9296 100644 --- a/bin/man/dtch.1 +++ b/bin/man1/dtch.1 diff --git a/bin/man/fbatt.1 b/bin/man1/fbatt.1 index 2d30cba7..2d30cba7 100644 --- a/bin/man/fbatt.1 +++ b/bin/man1/fbatt.1 diff --git a/bin/man/fbclock.1 b/bin/man1/fbclock.1 index 3195eb42..3195eb42 100644 --- a/bin/man/fbclock.1 +++ b/bin/man1/fbclock.1 diff --git a/bin/man/glitch.1 b/bin/man1/glitch.1 index 6562c4dc..6562c4dc 100644 --- a/bin/man/glitch.1 +++ b/bin/man1/glitch.1 diff --git a/bin/man/hnel.1 b/bin/man1/hnel.1 index 4dc4b9ea..4dc4b9ea 100644 --- a/bin/man/hnel.1 +++ b/bin/man1/hnel.1 diff --git a/bin/man/modem.1 b/bin/man1/modem.1 index f6bf22de..f6bf22de 100644 --- a/bin/man/modem.1 +++ b/bin/man1/modem.1 diff --git a/bin/man/pbd.1 b/bin/man1/pbd.1 index bbc7b785..bbc7b785 100644 --- a/bin/man/pbd.1 +++ b/bin/man1/pbd.1 diff --git a/bin/man/pngo.1 b/bin/man1/pngo.1 index cec13160..cec13160 100644 --- a/bin/man/pngo.1 +++ b/bin/man1/pngo.1 diff --git a/bin/man/psf2png.1 b/bin/man1/psf2png.1 index db74c6e2..db74c6e2 100644 --- a/bin/man/psf2png.1 +++ b/bin/man1/psf2png.1 diff --git a/bin/man/psfed.1 b/bin/man1/psfed.1 index 3fbc4710..3fbc4710 100644 --- a/bin/man/psfed.1 +++ b/bin/man1/psfed.1 diff --git a/bin/man/scheme.1 b/bin/man1/scheme.1 index fe13b367..fe13b367 100644 --- a/bin/man/scheme.1 +++ b/bin/man1/scheme.1 diff --git a/bin/man/ttpre.1 b/bin/man1/ttpre.1 index bd178525..bd178525 100644 --- a/bin/man/ttpre.1 +++ b/bin/man1/ttpre.1 diff --git a/bin/man/wake.1 b/bin/man1/wake.1 index 8457b254..8457b254 100644 --- a/bin/man/wake.1 +++ b/bin/man1/wake.1 diff --git a/bin/man/wat.1 b/bin/man1/wat.1 index f4ef4ed6..f4ef4ed6 100644 --- a/bin/man/wat.1 +++ b/bin/man1/wat.1 diff --git a/bin/man/xx.1 b/bin/man1/xx.1 index 3fbcbd70..3fbcbd70 100644 --- a/bin/man/xx.1 +++ b/bin/man1/xx.1 |