From 888ca634496247ca66c93619bbf486d97d7ddfc1 Mon Sep 17 00:00:00 2001 From: mgarciaisaia Date: Sat, 18 Apr 2015 01:45:53 -0300 Subject: [PATCH] Updated makefile so it installs on OS X MacOS X's `cp` doesn't have `-u` nor `--parents` support --- makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/makefile b/makefile index d5c6ba0..e4fd01d 100644 --- a/makefile +++ b/makefile @@ -6,6 +6,8 @@ H_SRCS=$(shell find . -iname "*.h" | tr '\n' ' ') OBJS=$(C_SRCS:./%.c=release/%.o) +UNAME=$(shell uname) + # Clean and compile .so all: release/libcspecs.so @@ -30,8 +32,13 @@ clean: $(RM) release install: all +ifeq ($(UNAME), Darwin) + cp release/libcspecs.so /usr/lib + ditto $(H_SRCS) /usr/include +else cp -u release/libcspecs.so /usr/lib cp --parents -u $(H_SRCS) /usr/include +endif uninstall: rm -f /usr/lib/libcspecs.so