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
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
17 # Shared library names:
19 LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
22 # gcc 2.95 doesn't work.
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 "..".
36 #ZLIBLIB=/usr/local/lib
37 #ZLIBINC=/usr/local/include
38 #Use the preinstalled zlib that comes with Solaris 9:
42 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
44 LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
46 # Pre-built configuration
47 # See scripts/pnglibconf.mak for more options
48 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
50 OBJS = 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
54 OBJSDLL = $(OBJS:.o=.pic.o)
56 .SUFFIXES: .c .o .pic.o
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
62 $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
64 all: libpng.a $(LIBSO) pngtest
66 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
67 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
74 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
76 $(LIBSOMAJ): $(OBJSDLL)
77 @case "`type ld`" in *ucb*) \
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.'; \
89 $(LD) -G -h $(LIBSOMAJ) \
90 -o $(LIBSOMAJ) $(OBJSDLL)
92 pngtest: pngtest.o $(LIBSO)
93 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
99 @echo "The $@ target is no longer supported by this makefile."
103 @echo "The $@ target is no longer supported by this makefile."
107 @echo "The $@ target is no longer supported by this makefile."
111 $(RM_F) *.o libpng.a pngtest pngout.png
112 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
114 # DO NOT DELETE THIS LINE -- make depend depends on it.
116 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
118 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
119 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
120 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
121 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
122 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
123 pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
124 pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126 pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128 pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
129 pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130 pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
132 pngtest.o: png.h pngconf.h pnglibconf.h