From e06ed443542d3fbd8a070e08d275db10bec9d353 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 19 Oct 2017 20:06:26 +0200 Subject: Rewrite and relicense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bae4d19 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +all: vtchs + +.o: + $(CC) -o $@ $^ $(LDFLAGS) + +.c.o: + $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) + +install: vtchs + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" + mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/vtchs" + cp vtchs -- "$(DESTDIR)$(PREFIX)/bin/" + cp vtchs.1 -- "$(DESTDIR)$(MANPREFIX)/man1/" + cp LICENSE -- "$(DESTDIR)$(PREFIX)/share/licenses/vtchs/" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/vtchs" + -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/vtchs.1" + -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/vtchs" + +clean: + -rm -f - vtchs *o + +.SUFFIXES: .o .c.o + +.PHONY: all install uninstall clean -- cgit v1.2.3-70-g09d2