makefile.std 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Makefile for PngMinus (png2pnm and pnm2png)
  2. # Linux / Unix
  3. #CC=cc
  4. CC=gcc
  5. LD=$(CC)
  6. RM=rm -f
  7. #PNGPATH = /usr/local
  8. #PNGINC = -I$(PNGPATH)/include/libpng16
  9. #PNGLIB = -L$(PNGPATH)/lib -lpng16
  10. #PNGLIBS = $(PNGPATH)/lib/libpng16.a
  11. PNGINC = -I../..
  12. PNGLIB = -L../.. -lpng
  13. PNGLIBS = ../../libpng.a
  14. #ZPATH = /usr/local
  15. #ZINC = -I$(ZPATH)/include
  16. #ZLIB = -L$(ZPATH)/lib -lz
  17. #ZLIBS = $(ZPATH)/lib/libz.a
  18. ZINC = -I../../../zlib
  19. ZLIB = -L../../../zlib -lz
  20. ZLIBS = ../../../zlib/libz.a
  21. CPPFLAGS=$(PNGINC) $(ZINC)
  22. CFLAGS=
  23. LDLIBS=$(PNGLIB) $(ZLIB)
  24. LDLIBSS=$(PNGLIBS) $(ZLIBS)
  25. C=.c
  26. O=.o
  27. L=.a
  28. E=
  29. # dependencies
  30. #all: png2pnm$(E) pnm2png$(E)
  31. all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
  32. png2pnm$(O): png2pnm$(C)
  33. $(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C)
  34. png2pnm$(E): png2pnm$(O)
  35. $(LD) $(LDFLAGS) -o png2pnm$(E) png2pnm$(O) $(LDLIBS) -lm
  36. png2pnm-static$(E): png2pnm$(O)
  37. $(LD) $(LDFLAGS) -o png2pnm-static$(E) png2pnm$(O) $(LDLIBSS) -lm
  38. pnm2png$(O): pnm2png$(C)
  39. $(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C)
  40. pnm2png$(E): pnm2png$(O)
  41. $(LD) $(LDFLAGS) -o pnm2png$(E) pnm2png$(O) $(LDLIBS) -lm
  42. pnm2png-static$(E): pnm2png$(O)
  43. $(LD) $(LDFLAGS) -o pnm2png-static$(E) pnm2png$(O) $(LDLIBSS) -lm
  44. clean:
  45. $(RM) png2pnm$(O)
  46. $(RM) pnm2png$(O)
  47. $(RM) png2pnm$(E)
  48. $(RM) pnm2png$(E)
  49. $(RM) png2pnm-static$(E)
  50. $(RM) pnm2png-static$(E)
  51. # End of makefile for png2pnm / pnm2png