diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-24 22:18:32 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-24 22:18:32 +1300 |
commit | 3673c1b4c4c8e34dca4abe51305d1a34a7f94f4a (patch) | |
tree | e5e5504e00b8e1e35fe0e6ca3a927bc4ac98aa86 | |
parent | Move ayylmao manual from section 1 to section 6 (diff) | |
download | ayylmao-3673c1b4c4c8e34dca4abe51305d1a34a7f94f4a.tar.gz ayylmao-3673c1b4c4c8e34dca4abe51305d1a34a7f94f4a.zip |
-rw-r--r-- | Makefile | 42 |
1 files changed, 23 insertions, 19 deletions
@@ -1,32 +1,36 @@ +.POSIX: .PHONY: all install install-dynamic install-static install-man clean PREFIX = $(HOME)/.local -CC = clang -CFLAGS = -std=c90 -Weverything -I "$(PREFIX)"/include -LDFLAGS = -L "$(PREFIX)"/lib -l ayylmao +CFLAGS = -I $(PREFIX)/include +LDFLAGS = -L $(PREFIX)/lib -l ayylmao -all : ayylmao.dynamic ayylmao.static +ALL = ayylmao.dynamic ayylmao.static + +all: $(ALL) install: install-dynamic install-man -install-dynamic : ayylmao.dynamic - mkdir -p -- "$(PREFIX)"/bin - install -m 0755 -- ayylmao.dynamic "$(PREFIX)"/bin/ayylmao +install-dynamic: ayylmao.dynamic + mkdir -p -- $(PREFIX)/bin + cp -p -- ayylmao.dynamic $(PREFIX)/bin/ayylmao -install-static : ayylmao.static - mkdir -p -- "$(PREFIX)"/bin - install -m 0755 -- ayylmao.static "$(PREFIX)"/bin/ayylmao +install-static: ayylmao.static + mkdir -p -- $(PREFIX)/bin + cp -p -- ayylmao.static $(PREFIX)/bin/ayylmao -install-man: - mkdir -p -- "$(PREFIX)"/share/man/man6 - install -m 0644 -- *.6 "$(PREFIX)"/share/man/man6 +install-man: ayylmao.6 + mkdir -p -- $(PREFIX)/share/man/man6 + cp -p -- ayylmao.6 $(PREFIX)/share/man/man6 -clean : - rm -f -- ayylmao.dynamic ayylmao.static +clean: + rm -f -- $(ALL) -ayylmao.dynamic : ayylmao.c - $(CC) ayylmao.c -o ayylmao.dynamic $(CFLAGS) $(LDFLAGS) +ayylmao.dynamic: ayylmao.c + $(CC) ayylmao.c -o $@ $(CFLAGS) $(LDFLAGS) + chmod +x ./$@ -ayylmao.static : ayylmao.c - $(CC) -static ayylmao.c -o ayylmao.static $(CFLAGS) $(LDFLAGS) +ayylmao.static: ayylmao.c + $(CC) -static ayylmao.c -o $@ $(CFLAGS) $(LDFLAGS) + chmod +x ./$@ |