1
0
mirror of https://git.sr.ht/~sircmpwn/gmnisrv synced 2024-11-03 06:07:17 -05:00
gmnisrv/Makefile

39 lines
677 B
Makefile
Raw Normal View History

2020-09-23 10:21:44 -04:00
.POSIX:
.SUFFIXES:
OUTDIR=.build
include $(OUTDIR)/config.mk
include $(OUTDIR)/cppcache
gmnisrv: $(gmnisrv_objects)
@printf 'CCLD\t$@\n'
@$(CC) $(LDFLAGS) -o $@ $(gmnisrv_objects) $(LIBS)
.SUFFIXES: .c .o .scd .1
.c.o:
@printf 'CC\t$@\n'
@touch $(OUTDIR)/cppcache
@grep $< $(OUTDIR)/cppcache >/dev/null || \
$(CPP) $(CFLAGS) -MM -MT $@ $< >> $(OUTDIR)/cppcache
@$(CC) -c $(CFLAGS) -o $@ $<
.scd.1:
@printf 'SCDOC\t$@\n'
@$(SCDOC) < $< > $@
# TODO: Docs
docs:
@true
clean:
@rm -f gmnisrv $(gmnisrv_objects)
distclean: clean
@rm -rf "$(OUTDIR)"
install: all
mkdir -p $(BINDIR)
install -Dm755 gmnisrv $(BINDIR)/gmnisrv
.PHONY: clean distclean docs install