3 include $(SRCDIR)/config/aros.cfg
5 #MM workbench-libs-png : workbench-libs-z
6 #MM- workbench-libs-png-includes : workbench-libs-png-generated
8 FILES := png pngerror \
9 pngget pngmem pngpread pngread pngrio pngrtran pngrutil \
10 pngset pngtrans pngwio pngwrite pngwtran pngwutil
12 NOWARN_FLAGS := $(NOWARN_DEPRECATED_DECLARATIONS) $(NOWARN_IMPLICIT_FUNCTION_DECL)
13 USER_CFLAGS := $(NOWARN_FLAGS)
15 #MM- core-linklibs : linklibs-png
16 #MM- linklibs-png : workbench-libs-png-pkgconfig
18 %build_module mmake=workbench-libs-png \
19 modname=png modtype=library \
20 files="$(FILES)" linklibname="png"
22 #MM- linklibs: linklibs-png-nostdio
23 #MM linklibs-png-nostdio : workbench-libs-png-generated
25 USER_CPPFLAGS += -DPNG_NO_STDIO -DPNG_NO_WRITE_TIME
27 %build_linklib mmake=linklibs-png-nostdio libname=png_nostdio \
28 files=$(FILES) objdir=$(OBJDIR)/no_stdio
31 workbench-libs-png-pkgconfig : $(AROS_LIB)/pkgconfig/libpng.pc
33 $(AROS_LIB)/pkgconfig/libpng.pc : $(SRCDIR)/$(CURDIR)/libpng.pc.in $(SRCDIR)/$(CURDIR)/mmakefile.src
34 %mkdir_q dir=$(AROS_LIB)/pkgconfig
35 @$(SED) -e 's|@exec_prefix@|$${prefix}|' \
36 -e 's|@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@|$${prefix}/include|' \
37 -e 's|-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@|-lpng|' \
38 -e 's|@libdir@|$(AROS_LIB)|' \
39 -e 's|@prefix@|/Developer|' \
41 -e 's|@PNGLIB_VERSION@|1.6.3|' \
42 -e 's| -I$${includedir}||' \
45 $(AROS_INCLUDES)/pnglibconf.h : $(SRCDIR)/$(CURDIR)/scripts/pnglibconf.h.prebuilt
46 $(SED) "s|.*PNG_ERROR_NUMBERS_SUPPORTED.*|#if defined(__AROS__)\\n#define PNG_ERROR_NUMBERS_SUPPORTED\\n#else\\n/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/\\n#endif|g" $< > $@
49 workbench-libs-png-generated : $(AROS_INCLUDES)/pnglibconf.h
52 INCLUDE_FILES := png.h pngconf.h