Follow General Conventions for Makefiles.

This commit is contained in:
Kolan Sh 2012-03-23 19:56:14 +04:00
parent 5bff0868c8
commit 1d7b91becd
16 changed files with 32 additions and 37 deletions

31
Makefile Normal file
View File

@ -0,0 +1,31 @@
SHELL = /bin/sh
PREFIX = /usr/local
all:
install:
install etc/X11/* /etc/X11
install etc/init.d/* /etc/init.d
install bin/* ${PREFIX}/bin
install sbin/* ${PREFIX}/sbin
install lib64/*.so ${PREFIX}/lib64
install -d ${PREFIX}/lib64/snail
ln -sf /usr/lib64/opengl/nvidia/extensions ${PREFIX}/lib64/snail/extensions
install -d ${PREFIX}/lib64/snail/modules
ln -sf /usr/lib64/xorg/modules/drivers ${PREFIX}/lib64/snail/modules/drivers
ln -sf /usr/lib64/xorg/modules/extensions ${PREFIX}/lib64/snail/modules/extensions
ln -sf /usr/lib64/xorg/modules/libfb.so ${PREFIX}/lib64/snail/modules/libfb.so
ln -sf /usr/lib64/xorg/modules/libwfb.so ${PREFIX}/lib64/snail/modules/libwfb.so
uninstall:
rm -f /etc/X11/xorg.conf.*.snail
rm -f /etc/init.d/snail-*
rm -f ${PREFIX}/lib64/libdlfaker.so
rm -f ${PREFIX}/lib64/libgefaker.so
rm -f ${PREFIX}/lib64/librrfaker.so
rm -rf ${PREFIX}/lib64/snail
rm -f ${PREFIX}/bin/nvrun
rm -f ${PREFIX}/bin/snail.vglrun
rm -f ${PREFIX}/sbin/snail.nv_pwr_off
rm -f ${PREFIX}/sbin/snail.nv_pwr_on
rm -f ${PREFIX}/sbin/snail.watcher.sh

View File

@ -1,6 +1,4 @@
#!/bin/sh
PREFIX=/usr/local
#!/bin/bash
# Tell the system to use xorg-x11 OpenGL libraries and nVidia GLX extensions
eselect opengl set xorg-x11

View File

@ -1,34 +0,0 @@
#!/bin/sh
# Tell the system to use both xorg-x11 OpenGL and GLX libraries
eselect opengl set xorg-x11
# Restore xorg.conf.* files from backups
[ -f /etc/X11/xorg.conf.snail-bkp ] && rm -f /etc/X11/xorg.conf && mv /etc/X11/xorg.conf.snail-bkp /etc/X11/xorg.conf
[ -f /etc/X11/xorg.conf.intel.snail-bkp ] && rm -f /etc/X11/xorg.conf.intel && mv /etc/X11/xorg.conf.intel.snail-bkp /etc/X11/xorg.conf.intel
[ -f /etc/X11/xorg.conf.nvidia.snail-bkp ] && rm -f /etc/X11/xorg.conf.nvidia && mv /etc/X11/xorg.conf.nvidia.snail-bkp /etc/X11/xorg.conf.nvidia
# Remove backup files
for f in "" .intel .nvidia ; do
rm -f /etc/X11/xorg.conf${f}.snail-bkp
done
# Remove all Snail files
rm -f /etc/X11/xorg.conf.intel.snail
rm -f /etc/X11/xorg.conf.nvidia
rm -f /etc/init.d/snail-watcher
rm -f /etc/init.d/snail-xserver
rm -f /usr/local/bin/nvrun
rm -f /usr/local/bin/snail.vglrun
rm -f /usr/local/lib64/libdlfaker.so
rm -f /usr/local/lib64/libgefaker.so
rm -f /usr/local/lib64/librrfaker.so
rm -f /usr/local/lib64/snail/extensions
rm -f /usr/local/lib64/snail/modules/drivers
rm -f /usr/local/lib64/snail/modules/extensions
rm -f /usr/local/lib64/snail/modules/libfb.so
rm -f /usr/local/lib64/snail/modules/libwfb.so
rmdir /usr/local/lib64/snail/modules 2>/dev/null
rm -f /usr/local/sbin/snail.nv_pwr_off
rm -f /usr/local/sbin/snail.nv_pwr_on
rm -f /usr/local/sbin/snail.watcher