summaryrefslogtreecommitdiffstats
path: root/source/l/libjpeg/jpeg-6b.diff
blob: 8ad8bb5db3451b0177c77b05f05612a734ab4d90 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- makefile.cfg.orig	Sat Mar 21 13:08:57 1998
+++ makefile.cfg	Tue Oct  6 19:15:26 1998
@@ -21,6 +21,8 @@
 
 # The name of your C compiler:
 CC= @CC@
+SONAME=libjpeg.so.62
+SHLIBNAME=libjpeg.so.62.0.0
 
 # You may need to adjust these cc options:
 CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@
@@ -125,6 +127,7 @@
         jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O)
 # These objectfiles are included in libjpeg.a
 LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+SHLIBOBJECTS= $(LIBOBJECTS:%.o=%.so)
 # object files for sample applications (excluding library files)
 COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \
         rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O)
@@ -133,7 +136,7 @@
 TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O)
 
 
-all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
+all: @A2K_DEPS@ libjpeg.$(A) $(SHLIBNAME) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
 
 # Special compilation rules to support ansi2knr and libtool.
 .SUFFIXES: .lo .la
@@ -171,6 +174,11 @@
 	$(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
 		-rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
 
+# shared library
+
+$(SHLIBNAME): @A2K_DEPS@ $(SHLIBOBJECTS)
+	gcc -o $(SHLIBNAME) -Wl,-soname,$(SONAME) -shared $(SHLIBOBJECTS)
+
 # sample programs:
 
 cjpeg: $(COBJECTS) libjpeg.$(A)
@@ -214,7 +222,7 @@
 clean:
 	$(RM) *.o *.lo libjpeg.a libjpeg.la
 	$(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-	$(RM) ansi2knr core testout* config.log config.status
+	$(RM) ansi2knr core testout* config.log config.status $(SHLIBNAME)
 	$(RM) -r knr .libs _libs
 
 distclean: clean
@@ -289,6 +297,9 @@
 jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
 jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
 jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+
+%.so : %.c
+	$(CC) -c -fPIC $(CFLAGS) $(CPPFLAGS) $< -o $@
 jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
 jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
 jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h