Tweak Makefile ordering and naming

master
Curtis McEnroe 2019-01-24 20:42:27 -05:00
parent 59390d2881
commit e95a6b776e
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
2 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
LIBRESSL_PREFIX = /usr/local/opt/libressl LIBRESSL_PREFIX = /usr/local/opt/libressl
LDLIBS = -lcurses -ltls -framework Cocoa LDLIBS = -lcurses -ltls -framework Cocoa
BINS += sandman BINS += sandman
MANS += sandman.1 MAN1 += sandman.1

View File

@ -1,5 +1,5 @@
PREFIX = ~/.local PREFIX = ~/.local
MANDIR = $(PREFIX)/share/man/man MANDIR = $(PREFIX)/share/man
CHROOT_USER = chat CHROOT_USER = chat
CHROOT_GROUP = $(CHROOT_USER) CHROOT_GROUP = $(CHROOT_USER)
LIBRESSL_PREFIX = /usr/local LIBRESSL_PREFIX = /usr/local
@ -10,7 +10,7 @@ LDFLAGS += -L$(LIBRESSL_PREFIX)/lib
LDLIBS = -lcursesw -ltls LDLIBS = -lcursesw -ltls
BINS = catgirl BINS = catgirl
MANS = catgirl.1 MAN1 = catgirl.1
-include config.mk -include config.mk
@ -35,30 +35,30 @@ TESTS += term.t
all: tags $(BINS) test all: tags $(BINS) test
$(OBJS): chat.h
catgirl: $(OBJS) catgirl: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@ $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
$(OBJS): chat.h
test: $(TESTS)
set -e; $(TESTS:%=./%;)
.SUFFIXES: .t .SUFFIXES: .t
.c.t: .c.t:
$(CC) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LDLIBS) -o $@ $(CC) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LDLIBS) -o $@
test: $(TESTS) tags: *.c *.h
set -e; $(TESTS:%=./%;) ctags -w *.c *.h
tags: *.h *.c install: $(BINS) $(MAN1)
ctags -w *.h *.c install -d $(PREFIX)/bin $(MANDIR)/man1
install: $(BINS) $(MANS)
install -d $(PREFIX)/bin $(MANDIR)1
install $(BINS) $(PREFIX)/bin install $(BINS) $(PREFIX)/bin
install -m 644 $(MANS) $(MANDIR)1 install -m 644 $(MAN1) $(MANDIR)/man1
uninstall: uninstall:
rm -f $(BINS:%=$(PREFIX)/bin/%) rm -f $(BINS:%=$(PREFIX)/bin/%)
rm -f $(MAN:%=%(MANDIR)1/%) rm -f $(MAN1:%=$(MANDIR)/man1/%)
chroot.tar: catgirl catgirl.1 man.sh chroot.tar: catgirl catgirl.1 man.sh
install -d -o root -g wheel \ install -d -o root -g wheel \
@ -93,10 +93,10 @@ chroot.tar: catgirl catgirl.1 man.sh
tar -cf chroot.tar -C root bin etc home lib libexec usr tar -cf chroot.tar -C root bin etc home lib libexec usr
install-chroot: chroot.tar install-chroot: chroot.tar
tar -xf chroot.tar -C /home/$(CHROOT_USER) tar -x -f chroot.tar -C /home/$(CHROOT_USER)
clean: clean:
rm -fr $(OBJS) $(BINS) $(TESTS) tags root chroot.tar rm -fr $(BINS) $(OBJS) $(TESTS) tags root chroot.tar
README: catgirl.7 README: catgirl.7
mandoc catgirl.7 | col -bx > README mandoc catgirl.7 | col -bx > README