makefile.atari 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # makefile for libpng
  2. # Copyright (C) 2002 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. CFLAGS=-I..\zlib -O
  13. LBR = png.lib
  14. LDFLAGS=-lpng -lz -lm
  15. # where make install puts libpng.a and png.h
  16. prefix=/usr/local
  17. INCPATH=$(prefix)/include
  18. LIBPATH=$(prefix)/lib
  19. # override DESTDIR= on the make install command line to easily support
  20. # installing into a temporary location. Example:
  21. #
  22. # make install DESTDIR=/tmp/build/libpng
  23. #
  24. # If you're going to install into a temporary location
  25. # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
  26. # you execute make install.
  27. DESTDIR=
  28. OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
  29. $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
  30. $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
  31. $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
  32. $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
  33. all: $(LBR) pngtest.ttp
  34. $(LBR): $(OBJS)
  35. $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
  36. pnglibconf.h: scripts/pnglibconf.h.prebuilt
  37. cp scripts/pnglibconf.h.prebuilt pnglibconf.h
  38. pngtest.ttp: pngtest.o $(LBR)
  39. $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
  40. install: libpng.a
  41. -@mkdir $(DESTDIR)$(INCPATH)
  42. -@mkdir $(DESTDIR)$(INCPATH)/libpng
  43. -@mkdir $(DESTDIR)$(LIBPATH)
  44. -@rm -f $(DESTDIR)$(INCPATH)/png.h
  45. -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
  46. -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
  47. cp png.h $(DESTDIR)$(INCPATH)/libpng
  48. cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
  49. cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
  50. chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
  51. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
  52. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
  53. (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
  54. ln -f -s $(LIBNAME)/* .)