Hi Linus,

This patch build shared library for sparse.
That save me a lot of time rebuilding the python modules
when I debug the sparse.

Chris

Index: sparse-be/Makefile
===================================================================
--- sparse-be.orig/Makefile     2004-12-09 16:48:33.000000000 -0500
+++ sparse-be/Makefile  2005-02-18 11:57:40.000000000 -0500
@@ -4,7 +4,7 @@
 OS=linux
 
 CC=gcc
-CFLAGS=-O -g -Wall -Wwrite-strings
+CFLAGS=-O -g -Wall -Wwrite-strings -fPIC
 LDFLAGS=-g
 AR=ar
 
@@ -23,7 +23,10 @@
 LIB_FILE= sparse.a
 LIBS=$(LIB_FILE)
 
-all: $(PROGRAMS)
+SHARE_LIB_FILE= libsparse.so
+SHARE_LIBS=$(SHARE_LIB_FILE)
+
+all: $(PROGRAMS) $(SHARE_LIBS)
 
 #
 # Install the 'check' binary as 'sparse', just to confuse people.
@@ -69,6 +72,9 @@
 $(LIB_FILE): $(LIB_OBJS)
        $(AR) rcs $(LIB_FILE) $(LIB_OBJS)
 
+$(SHARE_LIB_FILE): $(LIB_OBJS)
+       $(CC) -shared -o $(SHARE_LIB_FILE) $(LIB_OBJS)
+
 evaluate.o: $(LIB_H)
 expression.o: $(LIB_H)
 lib.o: $(LIB_H)
@@ -109,4 +115,4 @@
        echo "#define GCC_INTERNAL_INCLUDE \"`$(CC) 
-print-file-name=include`\"" > pre-process.h
 
 clean:
-       rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) pre-process.h
+       rm -f *.[oasi] *.so core core.[0-9]* $(PROGRAMS) pre-process.h 
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to