diff --exclude CVS -uNr dbg-1.20/Makefile dbg-1.20.modified/Makefile --- dbg-1.20/Makefile 2003-09-16 08:46:07.000000000 -0400 +++ dbg-1.20.modified/Makefile 2009-07-06 11:20:59.000000000 -0400 @@ -15,6 +15,16 @@ DBGNAME = dbg-${VERSION} TARBALL = ${DBGNAME}.tgz DISTFILES = README LICENSE VERSION dbg.h dbg.cpp Makefile test.cpp +SONAME = libdbg.so.0.0 +SOVERSION = libdbg.so.0 + + +#ifeq ($(CXX),) +#CXX=g++ +#endif +#ifeq ($(AR),) +#AR=ar +#endif all: test test-dbg test-nothing @ls -l test-dbg @@ -27,25 +37,33 @@ # Building the library clean: - rm -rf core a.out *.o test test-dbg test-nothing dbg*.tgz www.tgz SRC1.out SRC2.out www/*.pdf dbg*.tgz dbg.h.html dbg.cpp.html test.cpp.html + rm -rf core a.out *.o test test-dbg test-nothing dbg*.tgz www.tgz SRC1.out SRC2.out www/*.pdf dbg*.tgz dbg.h.html dbg.cpp.html test.cpp.html libdbg* dbg.o: dbg.h dbg.cpp - g++ $(CFLAGS) -c dbg.cpp + $(CXX) $(CFLAGS) -c dbg.cpp + +libdbg.so: dbg.o + $(CXX) -shared -Wl,-soname,$@ -o $@ $< + $(CXX) -shared $(CFLAGS) $< -lc -Wl,-soname -Wl,$(SOVERSION) \ + -o $(SONAME) && \ + ln -sf $(SONAME) $(SOVERSION) && \ + ln -sf $(SONAME) libdbg.so && \ + $(AR) r libdbg.a dbg.o ############################################################################## # Building the test files -test-dbg: dbg.o test.cpp - g++ $(CFLAGS) -DDBG_ENABLED test.cpp -c -o test-dbg.o - g++ $(CFLAGS) -o test-dbg test-dbg.o dbg.o +test-dbg: libdbg.so dbg.o test.cpp + $(CXX) $(CFLAGS) -DDBG_ENABLED test.cpp -c -o test-dbg.o + $(CXX) $(CFLAGS) -L. -ldbg -o test-dbg test-dbg.o test: test.cpp - g++ $(CFLAGS) test.cpp -c -o test.o - g++ $(CFLAGS) -o test test.o + $(CXX) $(CFLAGS) test.cpp -c -o test.o + $(CXX) $(CFLAGS) -o test test.o test-nothing: test.cpp - g++ $(CFLAGS) -DTEST_WITHOUT_ANY_LIBRARY_USAGE test.cpp -c -o test.o - g++ $(CFLAGS) -o test-nothing test.o + $(CXX) $(CFLAGS) -DTEST_WITHOUT_ANY_LIBRARY_USAGE test.cpp -c -o test.o + $(CXX) $(CFLAGS) -o test-nothing test.o ############################################################################## # Building the distribution @@ -56,5 +74,10 @@ tar cfz ${TARBALL} ${DBGNAME} &&\ rm -rf ${DBGNAME} -# End + ############################################################################## +# Install + +install: + mkdir -p /usr/lib + install -m 0755 libdbg.so libdbg.so.0 libdbg.0.0 /usr/lib diff --exclude CVS -uNr dbg-1.20/dbg.cpp dbg-1.20.modified/dbg.cpp --- dbg-1.20/dbg.cpp 2003-09-16 08:46:07.000000000 -0400 +++ dbg-1.20.modified/dbg.cpp 2009-07-06 11:20:33.000000000 -0400 @@ -423,7 +423,7 @@ typedef map_type::iterator iterator; typedef map_type::key_type key_type; #ifndef _MSC_VER - typedef map_type::data_type data_type; // pre 3.3 +// typedef map_type::data_type data_type; // pre 3.3 typedef map_type::mapped_type data_type; // gcc 3.3 #else // MSVC. Just don't ask. Files dbg-1.20/dbg.o and dbg-1.20.modified/dbg.o differ Files dbg-1.20/libdbg.a and dbg-1.20.modified/libdbg.a differ Files dbg-1.20/libdbg.so and dbg-1.20.modified/libdbg.so differ Files dbg-1.20/libdbg.so.0 and dbg-1.20.modified/libdbg.so.0 differ Files dbg-1.20/libdbg.so.0.0 and dbg-1.20.modified/libdbg.so.0.0 differ Files dbg-1.20/test and dbg-1.20.modified/test differ Files dbg-1.20/test-dbg and dbg-1.20.modified/test-dbg differ Files dbg-1.20/test-dbg.o and dbg-1.20.modified/test-dbg.o differ Files dbg-1.20/test-nothing and dbg-1.20.modified/test-nothing differ Files dbg-1.20/test.o and dbg-1.20.modified/test.o differ