1 # makefile for libpng on Solaris 2.x with cc
2 # Contributed by William L. Sebok, based on makefile.linux
3 # Copyright (C) 2020-2022 Cosmin Truta
4 # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
5 # Copyright (C) 1998 Greg Roelofs
6 # Copyright (C) 1996, 1997 Andreas Dilger
8 # This code is released under the libpng license.
9 # For conditions of distribution and use, see the disclaimer
10 # and license in png.h
16 # Shared library names:
18 LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
28 SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
29 SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
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 "..".
40 WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
41 -Wmissing-declarations -Wtraditional -Wcast-align \
42 -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
43 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
44 CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
45 LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
47 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
48 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
49 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
51 OBJSDLL = $(OBJS:.o=.pic.o)
53 .SUFFIXES: .c .o .pic.o
56 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
61 all: libpng.a $(LIBSO) pngtest
63 include scripts/pnglibconf.mak
65 DFNFLAGS = $(DEFS) $(CPPFLAGS)
72 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
74 $(LIBSOMAJ): $(OBJSDLL)
75 @case "`type ld`" in *ucb*) \
78 echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
79 echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
80 echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
81 echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
82 echo '## at all. If it is, things are likely to break because of'; \
83 echo '## the libucb dependency that is created.'; \
87 $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
88 -o $(LIBSOMAJ) $(OBJSDLL)
90 pngtest: pngtest.o $(LIBSO)
91 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
97 @echo "The $@ target is no longer supported by this makefile."
101 @echo "The $@ target is no longer supported by this makefile."
105 @echo "The $@ target is no longer supported by this makefile."
109 $(RM_F) *.o libpng.a pngtest pngout.png
110 $(RM_F) $(LIBSO) $(LIBSOMAJ)*
112 # DO NOT DELETE THIS LINE -- make depend depends on it.
114 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115 pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
118 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
119 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
120 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
121 pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
122 pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
123 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
124 pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126 pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127 pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128 pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130 pngtest.o: png.h pngconf.h pnglibconf.h