VirtualBox

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

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: 4.4 KB
Line 
1# makefile for libpng on Solaris 9 (beta) with Forte cc
2# Updated by Chad Schrock for Solaris 9
3# Contributed by William L. Sebok, based on makefile.linux
4# Copyright (C) 2020-2022 Cosmin Truta
5# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
6# Copyright (C) 1998-2001 Greg Roelofs
7# Copyright (C) 1996-1997 Andreas Dilger
8#
9# This code is released under the libpng license.
10# For conditions of distribution and use, see the disclaimer
11# and license in png.h
12
13# Library name:
14LIBNAME=libpng16
15PNGMAJ=16
16
17# Shared library names:
18LIBSO=$(LIBNAME).so
19LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
20
21# Utilities:
22# gcc 2.95 doesn't work.
23CC=cc
24AR_RC=ar rc
25RANLIB=echo
26MKDIR_P=mkdir -p
27LN_SF=ln -f -s
28CP=cp
29RM_F=/bin/rm -f
30
31# Where the zlib library and include files are located
32# Changing these to ../zlib poses a security risk. If you want
33# to have zlib in an adjacent directory, specify the full path instead of "..".
34#ZLIBLIB=../zlib
35#ZLIBINC=../zlib
36#ZLIBLIB=/usr/local/lib
37#ZLIBINC=/usr/local/include
38#Use the preinstalled zlib that comes with Solaris 9:
39ZLIBLIB=/usr/lib
40ZLIBINC=/usr/include
41
42CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
43CFLAGS=-O3
44LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
45
46# Pre-built configuration
47# See scripts/pnglibconf.mak for more options
48PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
49
50OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
51 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
52 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
53
54OBJSDLL = $(OBJS:.o=.pic.o)
55
56.SUFFIXES: .c .o .pic.o
57
58.c.o:
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
60
61.c.pic.o:
62 $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
63
64all: libpng.a $(LIBSO) pngtest
65
66pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
67 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
68
69libpng.a: $(OBJS)
70 $(AR_RC) $@ $(OBJS)
71 $(RANLIB) $@
72
73$(LIBSO): $(LIBSOMAJ)
74 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
75
76$(LIBSOMAJ): $(OBJSDLL)
77 @case "`type ld`" in *ucb*) \
78 echo; \
79 echo '## WARNING:'; \
80 echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
81 echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
82 echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
83 echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
84 echo '## at all. If it is, things are likely to break because of'; \
85 echo '## the libucb dependency that is created.'; \
86 echo; \
87 ;; \
88 esac
89 $(LD) -G -h $(LIBSOMAJ) \
90 -o $(LIBSOMAJ) $(OBJSDLL)
91
92pngtest: pngtest.o $(LIBSO)
93 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
94
95test: pngtest
96 ./pngtest
97
98install:
99 @echo "The $@ target is no longer supported by this makefile."
100 @false
101
102install-static:
103 @echo "The $@ target is no longer supported by this makefile."
104 @false
105
106install-shared:
107 @echo "The $@ target is no longer supported by this makefile."
108 @false
109
110clean:
111 $(RM_F) *.o libpng.a pngtest pngout.png
112 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
113
114# DO NOT DELETE THIS LINE -- make depend depends on it.
115
116png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
118pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
119pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
120pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
121pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
122pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
123pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
124pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
129pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
131
132pngtest.o: png.h pngconf.h pnglibconf.h
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use