1 # makefile for SCO OSr5 ELF and Unixware 7 with Native cc
2 # Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
3 # force ELF build dynamic linking, SONAME setting in lib and RPATH in app
4 # Copyright (C) 2020-2022 Cosmin Truta
5 # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
6 # Copyright (C) 1998 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)
30 # Where the zlib library and include files are located
31 #ZLIBLIB=/usr/local/lib
32 #ZLIBINC=/usr/local/include
38 LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
40 # Pre-built configuration
41 # See scripts/pnglibconf.mak for more options
42 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
44 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
45 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
46 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
48 OBJSDLL = $(OBJS:.o=.pic.o)
50 .SUFFIXES: .c .o .pic.o
53 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
56 $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
58 all: libpng.a $(LIBSO) pngtest
60 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
61 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
68 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
70 $(LIBSOMAJ): $(OBJSDLL)
71 $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \
74 pngtest: pngtest.o $(LIBSO)
75 LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
81 @echo "The $@ target is no longer supported by this makefile."
85 @echo "The $@ target is no longer supported by this makefile."
89 @echo "The $@ target is no longer supported by this makefile."
93 $(RM_F) *.o libpng.a pngtest pngout.png
94 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pngtest-static pnglibconf.h
96 # DO NOT DELETE THIS LINE -- make depend depends on it.
98 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
99 pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
100 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
101 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
103 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
104 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105 pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106 pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108 pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110 pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111 pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112 pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114 pngtest.o: png.h pngconf.h pnglibconf.h