makefile.atari 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # makefile for libpng
  2. # Copyright (C) 2002, 2014 Glenn Randers-Pehrson
  3. # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  4. #
  5. # This code is released under the libpng license.
  6. # For conditions of distribution and use, see the disclaimer
  7. # and license in png.h
  8. #
  9. # Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
  10. # rules for library management
  11. #
  12. CPPFLAGS = -I..\zlib
  13. CFLAGS = -O
  14. LBR = png.lib
  15. LDFLAGS = -L. -L..\zlib -lpng -lz -lm
  16. # where make install puts libpng.a and png.h
  17. prefix=/usr/local
  18. INCPATH=$(prefix)/include
  19. LIBPATH=$(prefix)/lib
  20. # override DESTDIR= on the make install command line to easily support
  21. # installing into a temporary location. Example:
  22. #
  23. # make install DESTDIR=/tmp/build/libpng
  24. #
  25. # If you're going to install into a temporary location
  26. # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
  27. # you execute make install.
  28. DESTDIR=
  29. # Pre-built configuration
  30. # See scripts/pnglibconf.mak for more options
  31. PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
  32. OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
  33. $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
  34. $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
  35. $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
  36. $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
  37. all: $(LBR) pngtest.ttp
  38. .c.o:
  39. $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  40. $(LBR): $(OBJS)
  41. $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
  42. pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
  43. cp $(PNGLIBCONF_H_PREBUILT) $@
  44. pngtest.ttp: pngtest.o $(LBR)
  45. $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
  46. install: libpng.a
  47. -@mkdir $(DESTDIR)$(INCPATH)
  48. -@mkdir $(DESTDIR)$(INCPATH)/libpng
  49. -@mkdir $(DESTDIR)$(LIBPATH)
  50. -@rm -f $(DESTDIR)$(INCPATH)/png.h
  51. -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
  52. -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
  53. cp png.h $(DESTDIR)$(INCPATH)/libpng
  54. cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
  55. cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
  56. chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
  57. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
  58. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
  59. (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
  60. ln -f -s $(LIBNAME)/* .)