~ubuntu-branches/ubuntu/intrepid/libpng/intrepid-security

« back to all changes in this revision

Viewing changes to scripts/makefile.linux

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2005-10-03 20:18:43 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051003201843-cv2i5v7no1ff08tx
Tags: 1.2.8rel-5
* drop_pass_width.patch: don't export png_pass_width, it's absolutely 
  unnecessary.
* libpng12-0.shlibs: downgrade the shlibs accordingly
  (closes: #331383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# makefile for libpng.a and libpng10.so on Linux ELF with gcc
 
1
# makefile for libpng.a and libpng12.so on Linux ELF with gcc
2
2
# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
3
3
# Copyright (C) 1996, 1997 Andreas Dilger
4
4
# For conditions of distribution and use, see copyright notice in png.h
5
5
 
6
 
LIBNAME = libpng10
 
6
LIBNAME = libpng12
7
7
PNGMAJ = 0
8
 
PNGMIN = 1.0.18
 
8
PNGMIN = 1.2.8
9
9
PNGVER = $(PNGMAJ).$(PNGMIN)
10
10
 
11
11
CC=gcc
12
12
 
13
 
# where "make install" puts libpng10.a, libpng10.so*,
14
 
# libpng10/png.h and libpng10/pngconf.h
 
13
# where "make install" puts libpng12.a, libpng12.so*,
 
14
# libpng12/png.h and libpng12/pngconf.h
15
15
# Prefix must be a full pathname.
16
16
prefix=/usr/local
17
17
 
34
34
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
35
35
        $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
36
36
 
37
 
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
 
37
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
38
38
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
39
39
 
40
40
RANLIB=ranlib
86
86
        echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
87
87
        echo L_opts=\"-L$(LIBPATH)\"; \
88
88
        echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
89
 
        echo libs=\"-lpng10 -lz -lm\"; \
 
89
        echo libs=\"-lpng12 -lz -lm\"; \
90
90
        cat scripts/libpng-config-body.in ) > libpng-config
91
91
        chmod +x libpng-config
92
92
 
101
101
        -o $(LIBNAME).so.$(PNGVER) \
102
102
        $(OBJSDLL)
103
103
 
104
 
libpng.so.2.$(PNGMIN): $(OBJSDLL)
105
 
        $(CC) -shared -Wl,-soname,libpng.so.2 \
106
 
        -o libpng.so.2.$(PNGMIN) \
 
104
libpng.so.3.$(PNGMIN): $(OBJSDLL)
 
105
        $(CC) -shared -Wl,-soname,libpng.so.3 \
 
106
        -o libpng.so.3.$(PNGMIN) \
107
107
        $(OBJSDLL)
108
108
 
109
109
pngtest: pngtest.o $(LIBNAME).so
139
139
        (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
140
140
 
141
141
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
142
 
        libpng.so.2.$(PNGMIN)
 
142
        libpng.so.3.$(PNGMIN)
143
143
        -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
144
144
        -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
145
145
        -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
146
146
        -@/bin/rm -f $(DL)/libpng.so
147
 
        -@/bin/rm -f $(DL)/libpng.so.2
148
 
        -@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
 
147
        -@/bin/rm -f $(DL)/libpng.so.3
 
148
        -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
149
149
        cp $(LIBNAME).so.$(PNGVER) $(DL)
150
 
        cp libpng.so.2.$(PNGMIN) $(DL)
 
150
        cp libpng.so.3.$(PNGMIN) $(DL)
151
151
        chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
152
 
        chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
 
152
        chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
153
153
        (cd $(DL); \
154
 
        ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
155
 
        ln -sf libpng.so.2 libpng.so; \
 
154
        ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
 
155
        ln -sf libpng.so.3 libpng.so; \
156
156
        ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
157
157
        ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
158
158
        -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
191
191
        echo
192
192
        echo Testing installed dynamic shared library in $(DL).
193
193
        $(CC) -I$(DI) -I$(ZLIBINC) \
194
 
           `$(BINPATH)/libpng10-config --cflags` pngtest.c \
 
194
           `$(BINPATH)/libpng12-config --cflags` pngtest.c \
195
195
           -L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
196
 
           -o pngtestd `$(BINPATH)/libpng10-config --ldflags`
 
196
           -o pngtestd `$(BINPATH)/libpng12-config --ldflags`
197
197
        ./pngtestd pngtest.png
198
198
 
199
199
test-installed:
200
200
        $(CC) -I$(ZLIBINC) \
201
 
           `$(BINPATH)/libpng10-config --cflags` pngtest.c \
 
201
           `$(BINPATH)/libpng12-config --cflags` pngtest.c \
202
202
           -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
203
 
           -o pngtesti `$(BINPATH)/libpng10-config --ldflags`
 
203
           -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
204
204
        ./pngtesti pngtest.png
205
205
 
206
206
clean:
207
207
        /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
208
208
        $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
209
 
        libpng.so.2.$(PNGMIN) \
 
209
        libpng.so.3.$(PNGMIN) \
210
210
        libpng.pc
211
211
 
212
212
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO