diff --git a/Makefile b/Makefile index 94d0b78..418b564 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,7 @@ DESTDIR ?= dist PREFIX ?= /usr/local # normalized prefix -PREFIX_N != (test -d $(PREFIX) && [ '-' != $(PREFIX) ] \ - && CDPATH= cd -P -- $(PREFIX) && pwd -P) +PREFIX_N != dirname $(PREFIX)/. MANDIR != [ $(PREFIX_N) = / ] && printf '/usr/share/man\n' \ || printf '/share/man\n' SYSEXITS != printf '\043include \n' | cpp -M - | tr ' ' '\n' \ @@ -26,7 +25,7 @@ SYSEXITS != printf '\043include \n' | cpp -M - | tr ' ' '\n' \ CC ?= cc RUSTC ?= rustc -RUSTLIBS = --extern getopt=build/o/libgetopt.rlib \ +RUSTFLAGS += --extern getopt=build/o/libgetopt.rlib \ --extern sysexits=build/o/libsysexits.rlib \ --extern strerror=build/o/libstrerror.rlib CFLAGS += -I$(SYSEXITS) @@ -120,7 +119,7 @@ build/bin/mm: src/mm.rs build rustlibs .PHONY: npc npc: build/bin/npc build/bin/npc: src/npc.c build - $(CC) $(CFLAGAS) -o $@ src/npc.c + $(CC) $(CFLAGS) -o $@ src/npc.c .PHONY: rpn rpn: build/bin/rpn