[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] update makefile for linux-espeak



Hi again Raman,

here is a patch for the makefile for the linux-espeak server, which does
the following:

1) libtool is removed from the Makefile
2) the install target has been updated to support DESTDIR so that
distributions can build the server, eliminating the need for the end
user to do it.

Again, let me know what you think.

William

Index: Makefile
===================================================================
--- Makefile	(revision 6204)
+++ Makefile	(working copy)
@@ -1,38 +1,38 @@
 #$Id: Makefile 6198 2009-08-25 15:19:03Z tv.raman.tv $
-CC=g++
+
+TCL_VERSION = 8.4
+
+LIBTAG = 0
+LIBREL = 1.0
+
 INSTALL = install
+LN = ln -s
+
 PREFIX = /usr
 libparentdir = ${PREFIX}/share/emacs/site-lisp
 libdir =$(libparentdir)/emacspeak/servers/linux-espeak
-INCLUDE= -I/usr/include/tcl8.4 -I/usr/include/espeak
-CFLAGS= -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall -Wno-long-long $(INCLUDE)
 
-LIBS= -ltcl8.4 -ltclx8.4 -lespeak
+TCL_INCLUDE= /usr/include/tcl$(TCL_VERSION)
 
-TTS=tclespeak.cpp
+CXXFLAGS+= -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall -Wno-long-long -I$(TCL_INCLUDE)
 
-all:   tclespeak.so
+LIBS= -ltcl$(TCL_VERSION) -lespeak
 
+LINKNAME = libtclespeak.so
+SONAME = $(LINKNAME).$(LIBTAG)
+LIBNAME = $(SONAME).$(LIBREL)
 
-	
+all:   $(LIBNAME)
 
-tclespeak.lo: tclespeak.cpp
-	libtool --mode=compile $(CC) $(CFLAGS) -c $<
+$(LIBNAME): tclespeak.o
+	$(CXX) -shared -Wl,-soname,$(SONAME) -o $@ $< $(LIBS)
 
-libtclespeak.la: tclespeak.lo 
-	libtool --mode=link $(CC) $(CFLAGS) -g -o $@ $^  $(LIBS) -rpath /usr/local/lib -shared
+clean:
+	rm -f $(LIBNAME) $(LINKNAME) $(SONAME) *.o
 
-.libs/libtclespeak.so: libtclespeak.la
+install: $(LIBNAME)
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+	$(INSTALL) $(LIBNAME) $(DESTDIR)$(LIBDIR)
+	$(LN) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+	$(LN) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LINKNAME)
 
-tclespeak.so: .libs/libtclespeak.so
-			cp -H $< $@
-
-clean:
-	rm -f *.so *.la *.o *.lo \
-tclespeak.so tclespeak.o tclespeak.lo
-	rm -rf .libs
-
-install: tclespeak.so
-	if test ! -d $(libdir) ; then mkdir $(libdir); fi ; \
-	chmod 755 $(libdir); \
-	$(INSTALL) -m 0644  $(TTS) $(libdir)

Attachment: pgpvwZNU2PIAo.pgp
Description: PGP signature



If you have questions about this archive or had problems using it, please send mail to:

priestdo@cs.vassar.edu No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog | Search the archive