makefile.atari 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
  30. $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
  31. $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
  32. $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
  33. $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
  34. all: $(LBR) pngtest.ttp
  35. .c.o:
  36. $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  37. $(LBR): $(OBJS)
  38. $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
  39. pnglibconf.h: scripts/pnglibconf.h.prebuilt
  40. cp scripts/pnglibconf.h.prebuilt pnglibconf.h
  41. pngtest.ttp: pngtest.o $(LBR)
  42. $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
  43. install: libpng.a
  44. -@mkdir $(DESTDIR)$(INCPATH)
  45. -@mkdir $(DESTDIR)$(INCPATH)/libpng
  46. -@mkdir $(DESTDIR)$(LIBPATH)
  47. -@rm -f $(DESTDIR)$(INCPATH)/png.h
  48. -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
  49. -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
  50. cp png.h $(DESTDIR)$(INCPATH)/libpng
  51. cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
  52. cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
  53. chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
  54. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
  55. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
  56. (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
  57. ln -f -s $(LIBNAME)/* .)