1 # makefile for libpng on BeOS x86 ELF with gcc
2 # modified from makefile.linux by Sander Stoks
3 # Copyright (C) 2020-2022 Cosmin Truta
4 # Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
5 # Copyright (C) 1999 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)
29 # Where the zlib library and include files are located
30 ZLIBLIB=/usr/local/lib
31 ZLIBINC=/usr/local/include
35 # ALIGN=-malign-loops=2 -malign-functions=2
37 WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
38 -Wmissing-declarations -Wtraditional -Wcast-align \
39 -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
41 # On BeOS, -O1 is actually better than -O3. This is a known bug but it's
43 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
44 CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
45 # LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
46 LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
48 # Pre-built configuration
49 # See scripts/pnglibconf.mak for more options
50 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
52 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
53 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
54 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
61 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
63 all: libpng.a $(LIBSO) pngtest
65 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
66 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
73 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
74 cp $(LIBSO)* /boot/home/config/lib
76 $(LIBSOMAJ): $(OBJSDLL)
77 $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) \
78 -o $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
80 pngtest: pngtest.o $(LIBSO)
81 $(CC) -L$(ZLIBLIB) -L. -lz -lpng16 -o pngtest pngtest.o
87 @echo "The $@ target is no longer supported by this makefile."
91 @echo "The $@ target is no longer supported by this makefile."
95 @echo "The $@ target is no longer supported by this makefile."
99 $(RM_F) *.o libpng.a pngtest pngout.png
100 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
102 # DO NOT DELETE THIS LINE -- make depend depends on it.
104 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105 pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111 pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112 pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114 pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116 pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
118 pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
120 pngtest.o: png.h pngconf.h pnglibconf.h