diff options
-rw-r--r-- | Makefile | 31 |
1 files changed, 11 insertions, 20 deletions
@@ -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 |