Commit d6aa51e9 authored by Caleb Xu's avatar Caleb Xu Committed by Alex Hultman

Allow for installation to custom prefix (#751)

parent 06645c08
...@@ -13,14 +13,17 @@ install: ...@@ -13,14 +13,17 @@ install:
make install`(uname -s)` make install`(uname -s)`
.PHONY: installLinux .PHONY: installLinux
installLinux: installLinux:
if [ -d "/usr/lib64" ]; then cp libuWS.so /usr/lib64/; else cp libuWS.so /usr/lib/; fi $(eval PREFIX ?= /usr)
mkdir -p /usr/include/uWS if [ -d "/usr/lib64" ]; then mkdir -p $(PREFIX)/lib64 && cp libuWS.so $(PREFIX)/lib64/; else mkdir -p $(PREFIX)/lib && cp libuWS.so $(PREFIX)/lib/; fi
cp src/*.h /usr/include/uWS/ mkdir -p $(PREFIX)/include/uWS
cp src/*.h $(PREFIX)/include/uWS/
.PHONY: installDarwin .PHONY: installDarwin
installDarwin: installDarwin:
cp libuWS.dylib /usr/local/lib/ $(eval PREFIX ?= /usr/local)
mkdir -p /usr/local/include/uWS mkdir -p $(PREFIX)/lib
cp src/*.h /usr/local/include/uWS/ cp libuWS.dylib $(PREFIX)/lib/
mkdir -p $(PREFIX)/include/uWS
cp src/*.h $(PREFIX)/include/uWS/
.PHONY: clean .PHONY: clean
clean: clean:
rm -f libuWS.so rm -f libuWS.so
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment