--- Makefile.in.orig Mon Aug 21 20:12:47 2000 +++ Makefile.in Sat Aug 26 17:03:02 2000 @@ -32,6 +32,7 @@ # CDKLIB = libcdk.a +CDKSLIB = libcdk.so.1 VERSION = 4.9.10 CFLAGS = -Iinclude @CFLAGS@ @DEFS@ CC = @CC@ @@ -39,13 +40,13 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ RANLIB = @RANLIB@ -INSTALL = @INSTALL@ +INSTALL = @INSTALL_DATA@ INSTALL_DIR = @prefix@ INCLUDE_DIR = $(INSTALL_DIR)/include/cdk LIB_DIR = $(INSTALL_DIR)/lib MAN_DIR = $(INSTALL_DIR)/man/man3 -default:: cdklib +default:: cdklib cdkslib # # Create the file lists. @@ -72,6 +73,7 @@ cdk_template.3 cdk_viewer.3 CDKREADME = BUGS EXPANDING NOTES TODO COPYING INSTALL README CDKOBJS = $(CDKSRC:.c=.o) +CDKSOBJS = $(CDKSRC:.c=.so) # # Standard library directive. @@ -80,6 +82,9 @@ $(AR) -cr $(CDKLIB) $(CDKOBJS) $(RANLIB) $(CDKLIB) +cdkslib $(CDKSLIB): $(CDKSOBJS) + $(CC) -shared -Wl,-x -Wl,-soname,$(CDKSLIB) -o $(CDKSLIB) $(CDKSOBJS) + # # Make the examples directory. # @@ -95,7 +100,7 @@ # # This installs all of the CDK library release. # -install:: installCDKHeaderFiles installCDKReadme installCDKLibrary installCDKManPages +install:: installCDKHeaderFiles installCDKLibrary installCDKManPages # # This installs the header files. @@ -130,6 +135,9 @@ fi @echo " $(INSTALL) $(CDKLIB) $(LIB_DIR)" @$(INSTALL) $(CDKLIB) $(LIB_DIR) + @echo " $(INSTALL) $(CDKSLIB) $(LIB_DIR)" + @$(INSTALL) $(CDKSLIB) $(LIB_DIR) + ln -sf $(CDKSLIB) $(LIB_DIR)/libcdk.so # # This installs the CDK man pages. @@ -166,8 +174,10 @@ # # Standard .c to .o compile line. # -.c.o: - $(CC) $(CFLAGS) -c $< +.SUFFIXES: .c .so .o + +.c.so: + $(CC) $(CFLAGS) -fpic -DPIC -o $@ -c $< # # Set up our PHONY tags.