Makefile
资源名称:ilib [点击查看]
上传用户:changbiao
上传日期:2007-01-13
资源大小:141k
文件大小:3k
源码类别:

图片显示

开发平台:

C/C++

  1. # __ILIB_SITE_SETTINGS__
  2. # -- Do not edit these parameters here.
  3. # -- Edit the toplevel makefile and then 'make makefiles'
  4. CC              = cc
  5. CFLAGS          = -g -Wall -DHAVE_GIFLIB -DHAVE_PNGLIB -DHAVE_JPEGLIB -I/usr/local/include -I/usr/local/include/giflib
  6. RANLIB          = ranlib
  7. STATIC          = yes
  8. DYNAMIC         = yes
  9. LIBS            = -L/usr/local/lib -lgif -lpng -ljpeg 
  10. MAJVERSION      = 1
  11. MINVERSION      = 1
  12. PATCHLEVEL      = 6
  13. VERSION         = 1.1.6
  14. SOVERSION       = 1.1
  15. # Install locations
  16. PREFIX          = /usr/local
  17. BINDIR          = /usr/local/bin
  18. LIBDIR          = /usr/local/lib
  19. MANDIR          = /usr/local/man
  20. DOCDIR          = /usr/local/share/Ilib
  21. DATDIR          = /usr/local/share/Ilib
  22. FNTDIR          = /usr/local/share/Ilib/bdf
  23. # Install commands
  24. INSTALL         = install
  25. INSTALL_PROGRAM = install -s -o bin  -g bin -m 00751
  26. INSTALL_DOC     = install -o bin -g bin -m 00644
  27. INSTALL_DATA    = install -o bin -g bin -m 00644
  28. INSTALL_FONT    = install -o bin -g bin -m 00644
  29. INSTALL_SCRIPT  = install -o bin -g bin -m 00755
  30. # __END_ILIB_SITE_SETTINGS__
  31. INCLIB = -L../../lib -lIlib
  32. ILIB = ../../lib/libIlib.a
  33. SILIB = ../../lib/libIlib.so.${SOVERSION}
  34. INCLUDES = -I../../include
  35. FONT2H = ../ifont2h/ifont2h
  36. all: helvB18.h courR10.h ifraggraph
  37. ifraggraph: helvB18.h courR10.h ifraggraph.o
  38. helvB18.h: $(FONT2H) ../../fonts/helvB18.bdf
  39. $(FONT2H) ../../fonts/helvB18.bdf > $@
  40. courR10.h: $(FONT2H) ../../fonts/courR10.bdf
  41. $(FONT2H) ../../fonts/courR10.bdf > $@
  42. .c.o:
  43. $(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $@
  44. static: ${ILIB} ifraggraph.o
  45. ${CC} ifraggraph.o ${LIBS} ${INCLIB} -lm -o ifraggraph
  46. dynamic: ${SILIB} ifraggraph.o
  47. ${CC} ifraggraph.o ${LIBS} ${INCLIB} -lm -o ifraggraph
  48. ifraggraph: ifraggraph.o
  49. @if [ "${DYNAMIC}." = "yes." ]; then 
  50.   make "CC=$(CC)" "CFLAGS=$(CFLAGS)" "RANLIB=$(RANLIB)" 
  51. "STATIC=${STATIC}" "DYNAMIC=${DYNAMIC}" 
  52. "LIBS=${LIBS}" "SOVERSION=${SOVERSION}" dynamic; 
  53. else 
  54.   make "CC=$(CC)" "CFLAGS=$(CFLAGS)" "RANLIB=$(RANLIB)" 
  55. "STATIC=${STATIC}" "DYNAMIC=${DYNAMIC}" 
  56. "LIBS=${LIBS}" "SOVERSION=${SOVERSION}" static; 
  57. fi
  58. install: ifraggraph
  59. @echo "Installing 'ifraggraph' in $(BINDIR)"; 
  60. $(INSTALL_PROGRAM) ifraggraph $(BINDIR)
  61. clean:
  62. @echo "Cleaning in `pwd`"
  63. rm -f *.o ifraggraph *core helvB18.h courR10.h *.gif
  64. makefiles: makefile
  65. makefile:
  66. @echo "Updating `pwd`/Makefile"; 
  67. if [ "$(SITE_DEF_FILE)." = "." ]; then 
  68. echo "You must run 'make makefiles' from the toplevel Makefile."; 
  69. exit 1; 
  70. fi; 
  71. sed -n '1,/^# __ILIB_SITE_SETTINGS__/ p' Makefile > Makefile.new; 
  72. cat $(SITE_DEF_FILE) >> Makefile.new; 
  73. sed -n '/^# __END_ILIB_SITE_SETTINGS__/,/^# START DEPENDENCIES/ p' Makefile >> Makefile.new; 
  74. $(CC) $(INCLUDES) -M *.c >> Makefile.new; 
  75. mv Makefile Makefile.bak; 
  76. mv Makefile.new Makefile
  77. # START DEPENDENCIES