aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile31
1 files changed, 11 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index facf2c2..92b95a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,15 @@
+.POSIX:
.PHONY: all clean install install-bin install-man
-
-CC = clang
-CFLAGS = -std=c99 -Weverything
-LDFLAGS = -lcrypt
PREFIX = /usr/local
-
-all : crypt
-
-clean :
- rm -f crypt
-
-crypt : crypt.c crypt.h
- $(CC) $(CFLAGS) $(LDFLAGS) crypt.c -o $@
-
-install : install-bin install-man
-
-install-bin : crypt
+LDFLAGS = -lcrypt
+all: crypt
+clean:
+ rm -f -- crypt
+crypt: crypt.c crypt.h
+install: install-bin install-man
+install-bin: crypt
mkdir -p -- $(PREFIX)/bin
- install -m 0755 -- crypt $(PREFIX)/bin
-
-install-man : crypt.1
+ cp -- crypt $(PREFIX)/bin
+install-man: crypt.1
mkdir -p -- $(PREFIX)/share/man/man1
- install -m 0644 -- crypt.1 $(PREFIX)/share/man/man1
+ cp -- crypt.1 $(PREFIX)/share/man/man1