kopia lustrzana https://github.com/FreeSpacenav/libspnav
- removed init script installation from spacenavd's install target, added
message to the user instead. Applied Hans Meine's patches: - allow build dir != source dir - install into /lib64 if /lib64 exists (modified that one to use uname -m in the configure script, debian seems to have a lib64 even on 32bit systems) - display X11 connection closing in verbose mode, too (not only init) git-svn-id: svn+ssh://svn.code.sf.net/p/spacenav/code/trunk/libspnav@47 ef983eb1-d774-4af8-acfd-baaf7b16a646pull/2/head
rodzic
00433316a4
commit
84dfaf861c
15
Makefile.in
15
Makefile.in
|
@ -16,7 +16,10 @@ $(lib_a): $(obj)
|
|||
$(AR) rcs $@ $(obj)
|
||||
|
||||
$(lib_so): $(obj)
|
||||
$(CC) $(CFLAGS) -shared -o $@ $(obj)
|
||||
$(CC) -shared -o $@ $(obj)
|
||||
|
||||
%.o: $(srcdir)/%.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
@ -28,13 +31,13 @@ distclean:
|
|||
|
||||
.PHONY: install
|
||||
install: $(lib_a) $(lib_so)
|
||||
cp $(lib_a) $(PREFIX)/lib/$(lib_a)
|
||||
cp $(lib_so) $(PREFIX)/lib/$(lib_so)
|
||||
cp $(hdr) $(PREFIX)/include/
|
||||
cp $(lib_a) $(PREFIX)/$(libdir)/$(lib_a)
|
||||
cp $(lib_so) $(PREFIX)/$(libdir)/$(lib_so)
|
||||
for h in $(hdr); do cp -p $(srcdir)/$$h $(PREFIX)/include/; done
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
rm -f $(PREFIX)/lib/$(lib_a)
|
||||
rm -f $(PREFIX)/lib/$(lib_so)
|
||||
rm -f $(PREFIX)/$(libdir)/$(lib_a)
|
||||
rm -f $(PREFIX)/$(libdir)/$(lib_so)
|
||||
for i in $(hdr); do rm -f $(PREFIX)/include/$$i; done
|
||||
|
||||
|
|
|
@ -7,6 +7,13 @@ OPT=yes
|
|||
DBG=yes
|
||||
X11=yes
|
||||
|
||||
srcdir="`dirname "$0"`"
|
||||
libdir=lib
|
||||
|
||||
if [ "`uname -m`" = 'x86_64' ]; then
|
||||
libdir=lib64
|
||||
fi
|
||||
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
--prefix=*)
|
||||
|
@ -56,9 +63,11 @@ if [ "$X11" = "no" ]; then
|
|||
echo ""
|
||||
fi
|
||||
|
||||
# create makefile
|
||||
echo 'creating makefile ...'
|
||||
# create Makefile
|
||||
echo 'creating Makefile ...'
|
||||
echo "PREFIX = $PREFIX" >Makefile
|
||||
echo "srcdir = $srcdir" >>Makefile
|
||||
echo "libdir = $libdir" >>Makefile
|
||||
|
||||
if [ "$DBG" = 'yes' ]; then
|
||||
echo 'dbg = -g' >>Makefile
|
||||
|
@ -73,7 +82,7 @@ if [ "$X11" = 'yes' ]; then
|
|||
echo 'xlib = -lX11' >>Makefile
|
||||
fi
|
||||
|
||||
cat Makefile.in >>Makefile
|
||||
cat "$srcdir/Makefile.in" >>Makefile
|
||||
|
||||
# create spnav_config.h
|
||||
echo 'creating spnav_config.h ...'
|
||||
|
|
Ładowanie…
Reference in New Issue