-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 879 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
HOME:=$(shell getent passwd `logname` | cut -d: -f6)
LOCAL_INSTALL:=$(HOME)/quicklisp/local-projects
SYSTEM_INSTALL:=/usr/local/lib
ffi:
cd libsipc && make libsipc-ffi
utils:
cd libsipc && make all-ffi
ln -sf libsipc/sipcli sipcli
clean:
cd libsipc && make clean
rm -f *.socket
rm -f sipcli
install-ffi:
if [[ $(shell id -u) == 0 ]]; then cp -f libsipc.so $(SYSTEM_INSTALL)/libsipc.so; fi
install-ffi-symbolic:
ln -sf "`pwd`/libsipc.so" $(SYSTEM_INSTALL)/libsipc.so
install: ffi install-ffi
if [ -d "$(LOCAL_INSTALL)" ]; then sudo -u `logname` ln -nsi "`pwd`" "$(LOCAL_INSTALL)/cl-sipc"; fi
uninstall-ffi:
if [[ $(shell id -u) == 0 ]]; then rm -f $(SYSTEM_INSTALL)/libsipc.so; fi
uninstall: uninstall-ffi
if [ -L "$(LOCAL_INSTALL)/cl-sipc" ] && [ "`readlink -f $(LOCAL_INSTALL)/cl-sipc`" == "`pwd`" ]; then sudo -u `logname` rm -i $(LOCAL_INSTALL)/cl-sipc; fi