makefile.sun 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # makefile for libpng
  2. # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  3. # For conditions of distribution and use, see copyright notice in png.h
  4. # Where the zlib library and include files are located
  5. #ZLIBLIB=/usr/local/lib
  6. #ZLIBINC=/usr/local/include
  7. ZLIBLIB=../zlib
  8. ZLIBINC=../zlib
  9. WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
  10. -Wmissing-declarations -Wtraditional -Wcast-align \
  11. -Wstrict-prototypes -Wmissing-prototypes
  12. CC=gcc
  13. CFLAGS=-I$(ZLIBINC) -O $(WARNMORE) -DPNG_DEBUG=4
  14. LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
  15. RANLIB=ranlib
  16. #RANLIB=echo
  17. # where make install puts libpng.a and png.h
  18. prefix=/usr/local
  19. OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
  20. pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
  21. pngwtran.o pngmem.o pngerror.o pngpread.o
  22. all: libpng.a pngtest
  23. libpng.a: $(OBJS)
  24. ar rc $@ $(OBJS)
  25. $(RANLIB) $@
  26. pngtest: pngtest.o libpng.a
  27. $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
  28. test: pngtest
  29. ./pngtest
  30. install: libpng.a
  31. -@mkdir $(prefix)/include
  32. -@mkdir $(prefix)/lib
  33. cp png.h $(prefix)/include
  34. cp pngconf.h $(prefix)/include
  35. chmod 644 $(prefix)/include/png.h
  36. chmod 644 $(prefix)/include/pngconf.h
  37. cp libpng.a $(prefix)/lib
  38. chmod 644 $(prefix)/lib/libpng.a
  39. clean:
  40. rm -f *.o libpng.a pngtest pngout.png
  41. # DO NOT DELETE THIS LINE -- make depend depends on it.
  42. png.o: png.h pngconf.h
  43. pngerror.o: png.h pngconf.h
  44. pngrio.o: png.h pngconf.h
  45. pngwio.o: png.h pngconf.h
  46. pngmem.o: png.h pngconf.h
  47. pngset.o: png.h pngconf.h
  48. pngget.o: png.h pngconf.h
  49. pngread.o: png.h pngconf.h
  50. pngrtran.o: png.h pngconf.h
  51. pngrutil.o: png.h pngconf.h
  52. pngtest.o: png.h pngconf.h
  53. pngtrans.o: png.h pngconf.h
  54. pngwrite.o: png.h pngconf.h
  55. pngwtran.o: png.h pngconf.h
  56. pngwutil.o: png.h pngconf.h
  57. pngpread.o: png.h pngconf.h