File otcl-no_static.patch of Package otcl

Index: Makefile.in
===================================================================
--- Makefile.in.orig
+++ Makefile.in
@@ -60,40 +60,27 @@ CFILES = otcl.c otclAppInit.c otkAppInit
 .c.o:
 	$(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $<
 
-all: libotcl.a libotcl$(SHLIB_SUFFIX) otclsh owish
+all: libotcl$(SHLIB_SUFFIX) otclsh owish
 
 #
 # compile an appinit with tcl and otcl and link against
-# libotcl.a plus required tcl libs to give a standalone binary
+# required tcl libs
 #
 
-otclsh: otclAppInit.c libotcl.a
-	rm -f libotcl$(SHLIB_SUFFIX)
+otclsh: otclAppInit.c libotcl$(SHLIB_SUFFIX)
 	$(CC) -o otclsh $(SHLD_FLAGS) $(CFLAGS) $(INCLUDES) otclAppInit.c \
 	$(OTCLLIB) $(LIB)
 
 #
 # compile an appinit with tcl/tk and otcl and link against
-# libotcl.a plus required tcl/tk libs to give a standalone binary
+# required tcl/tk libs
 #
 
-owish: otkAppInit.c libotcl.a
-	rm -f libotcl$(SHLIB_SUFFIX)
+owish: otkAppInit.c libotcl$(SHLIB_SUFFIX)
 	$(CC) -o owish $(SHLD_FLAGS) $(CFLAGS) $(INCLUDES) otkAppInit.c \
 	$(OTCLLIB) $(LIB)
 
 #
-# compile otcl.c and link it into a library archive
-# INCLUDES give a path to tclInt.h (plus tk and X11)
-#
-
-libotcl.a: otcl.c
-	rm -f libotcl.a otcl.o
-	$(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) otcl.c
-	ar cq libotcl.a otcl.o
-	$(RANLIB) libotcl.a
-
-#
 # compile otcl.c and link it into a shared object
 # INCLUDES give a path to tclInt.h (plus tk and X11)
 #
@@ -104,8 +91,8 @@ libotcl$(SHLIB_SUFFIX): otcl.c
 	$(SHLIB_LD) -o libotcl$(SHLIB_SUFFIX) otcl.o
 
 test: otclsh owish
-	./otclsh lib/test.tcl
-	./owish lib/test.tcl
+	LD_LIBRARY_PATH=. ./otclsh lib/test.tcl
+	LD_LIBRARY_PATH=. ./owish lib/test.tcl
 
 dirs:
 	for d in $(INST_OWISH) $(INST_OTCLSH) $(INST_OLIB) $(INST_OLIBSH) $(INST_OINC); do \
@@ -114,16 +101,14 @@ dirs:
 		fi;\
 	done
 
-install: owish otclsh libotcl.a libotcl$(SHLIB_SUFFIX) otcl.h dirs
+install: owish otclsh libotcl$(SHLIB_SUFFIX) otcl.h dirs
 	$(INSTALL) owish $(DESTDIR)$(INST_OWISH)
 	$(INSTALL) otclsh $(DESTDIR)$(INST_OTCLSH)
-	$(INSTALL) libotcl.a $(INST_OLIB)
-	$(RANLIB)  $(INST_OLIB)/libotcl.a
 	$(INSTALL) libotcl$(SHLIB_SUFFIX) $(DESTDIR)$(INST_OLIBSH)
 	$(INSTALL) -m 644 otcl.h $(DESTDIR)$(INST_OINC)
 
 clean:
-	rm -f owish otclsh libotcl.a libotcl$(SHLIB_SUFFIX) \
+	rm -f owish otclsh libotcl$(SHLIB_SUFFIX) \
 	otcl.o otkAppInit.o otclAppInit.o \
 	config.status config.log config.cache \
 	core so_locations *.core Makefile
openSUSE Build Service is sponsored by