home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / src / png / scripts / makefile.gcc < prev    next >
Makefile  |  2002-07-08  |  2KB  |  67 lines

  1. # makefile for libpng using gcc (generic, static library)
  2. # Copyright (C) 2000 Cosmin Truta
  3. # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  4. # For conditions of distribution and use, see copyright notice in png.h
  5.  
  6. # Location of the zlib library and include files
  7. ZLIBINC = ../zlib
  8. ZLIBLIB = ../zlib
  9.  
  10. # Compiler, linker, lib and other tools
  11. CC = gcc
  12. LD = $(CC)
  13. AR = ar rcs
  14. RANLIB = ranlib
  15. RM = rm -f
  16.  
  17. CDEBUG = -g -DPNG_DEBUG=5
  18. LDDEBUG =
  19. CRELEASE = -O2
  20. LDRELEASE = -s
  21. CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
  22. LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
  23.  
  24. # File extensions
  25. O=.o
  26. A=.a
  27. E=
  28.  
  29. # Variables
  30. OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
  31.     pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
  32.     pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
  33.  
  34. # Targets
  35. all: libpng$(A) pngtest$(E)
  36.  
  37. libpng$(A): $(OBJS)
  38.     $(AR) $@ $(OBJS)
  39.     $(RANLIB) $@
  40.  
  41. test: pngtest$(E)
  42.     ./pngtest$(E)
  43.  
  44. pngtest$(E): pngtest$(O) libpng$(A)
  45.     $(LD) -o $@ pngtest$(O) $(LDFLAGS)
  46.  
  47. clean:
  48.     $(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
  49.  
  50. png$(O): png.h pngconf.h
  51. pngerror$(O): png.h pngconf.h
  52. pngget$(O): png.h pngconf.h
  53. pngmem$(O): png.h pngconf.h
  54. pngpread$(O): png.h pngconf.h
  55. pngread$(O): png.h pngconf.h
  56. pngrio$(O): png.h pngconf.h
  57. pngrtran$(O): png.h pngconf.h
  58. pngrutil$(O): png.h pngconf.h
  59. pngset$(O): png.h pngconf.h
  60. pngtest$(O): png.h pngconf.h
  61. pngtrans$(O): png.h pngconf.h
  62. pngwio$(O): png.h pngconf.h
  63. pngwrite$(O): png.h pngconf.h
  64. pngwtran$(O): png.h pngconf.h
  65. pngwutil$(O): png.h pngconf.h
  66.  
  67.