1
0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-11-23 00:42:15 +01:00
gmni/Makefile

41 lines
742 B
Makefile
Raw Normal View History

2020-09-20 16:17:39 +02:00
.POSIX:
.SUFFIXES:
OUTDIR=.build
include $(OUTDIR)/config.mk
include $(OUTDIR)/cppcache
2020-09-20 20:51:25 +02:00
gmni: $(gmni_objects)
2020-09-20 16:17:39 +02:00
@printf 'CCLD\t$@\n'
2020-09-20 20:51:25 +02:00
@$(CC) $(LDFLAGS) $(LIBS) -o $@ $(gmni_objects)
2020-09-20 16:17:39 +02:00
2020-09-20 20:51:25 +02:00
doc/gmni.1: doc/gmni.scd
2020-09-20 20:44:30 +02:00
.SUFFIXES: .c .o .scd .1
2020-09-20 16:17:39 +02:00
.c.o:
@printf 'CC\t$@\n'
@touch $(OUTDIR)/cppcache
@grep $< $(OUTDIR)/cppcache >/dev/null || \
$(CPP) $(CFLAGS) -MM -MT $@ $< >> $(OUTDIR)/cppcache
@$(CC) -c $(CFLAGS) -o $@ $<
2020-09-20 20:44:30 +02:00
.scd.1:
@printf 'SCDOC\t$@\n'
@$(SCDOC) < $< > $@
2020-09-20 20:51:25 +02:00
docs: doc/gmni.1
2020-09-20 20:44:30 +02:00
2020-09-20 16:17:39 +02:00
clean:
2020-09-20 20:51:25 +02:00
@rm -f gmni doc/gmni.1
2020-09-20 16:17:39 +02:00
distclean: clean
@rm -rf "$(OUTDIR)"
2020-09-20 20:55:33 +02:00
install: all
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)/man1
install -Dm755 gmni $(BINDIR)/gmni
install -Dm644 doc/gmni.1 $(MANDIR)/man1/gmni.1
.PHONY: clean distclean docs install