VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.42/scripts/makefile.sggcc

Last change on this file was 103316, checked in by vboxsync, 4 months ago

libpng-1.6.42: Applied and adjusted our libpng changes to 1.6.42. bugref:8515

File size: 3.6 KB
Line 
1# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
2# Copyright (C) 2020-2022 Cosmin Truta
3# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
4# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
5#
6# This code is released under the libpng license.
7# For conditions of distribution and use, see the disclaimer
8# and license in png.h
9
10# Library name:
11LIBNAME=libpng16
12PNGMAJ=16
13
14# Shared library names:
15LIBSO=$(LIBNAME).so
16LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
17
18# Utilities:
19CC=gcc
20AR_RC=ar rc
21RANLIB=echo
22MKDIR_P=mkdir -p
23LN_SF=ln -sf
24CP=cp
25RM_F=/bin/rm -f
26
27# Where the zlib library and include files are located
28#ZLIBLIB=/usr/local/lib32
29#ZLIBINC=/usr/local/include
30#ZLIBLIB=/usr/local/lib
31#ZLIBINC=/usr/local/include
32ZLIBLIB=../zlib
33ZLIBINC=../zlib
34
35# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
36# See "man abi". zlib must be built with the same ABI.
37ABI=
38
39WARNMORE=
40CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
41CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
42LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
43LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
44 -set_version sgi$(PNGMAJ).0
45# See "man dso" for info about shared objects
46
47# Pre-built configuration
48# See scripts/pnglibconf.mak for more options
49PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
50
51OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
52 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
53 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
54
55.c.o:
56 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
57
58all: libpng.a pngtest shared
59
60pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
61 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
62
63libpng.a: $(OBJS)
64 $(AR_RC) $@ $(OBJS)
65 $(RANLIB) $@
66
67shared: $(LIBSOMAJ)
68
69$(LIBSO): $(LIBSOMAJ)
70 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
71
72$(LIBSOMAJ): $(OBJS)
73 $(LDSHARED) -o $@ $(OBJS)
74 $(RM_F) $(LIBSO) $(LIBSOMAJ)
75
76pngtest: pngtest.o libpng.a
77 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
78
79test: pngtest
80 echo
81 echo Testing local static library.
82 ./pngtest
83
84install:
85 @echo "The $@ target is no longer supported by this makefile."
86 @false
87
88install-static:
89 @echo "The $@ target is no longer supported by this makefile."
90 @false
91
92install-shared:
93 @echo "The $@ target is no longer supported by this makefile."
94 @false
95
96clean:
97 $(RM_F) libpng.a pngtest pngout.png
98 $(RM_F) so_locations $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
99
100# DO NOT DELETE THIS LINE -- make depend depends on it.
101
102png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
103pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
104pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117
118pngtest.o: png.h pngconf.h pnglibconf.h
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use