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: courR10.h idisplayfont
  37. courR10.h: $(FONT2H) ../../fonts/courR10.bdf
  38. $(FONT2H) ../../fonts/courR10.bdf > $@
  39. .c.o:
  40. $(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $@
  41. static: ${ILIB} idisplayfont.o courR10.h
  42. $(CC) idisplayfont.o $(LIBS) -lm ${INCLIB} -o idisplayfont
  43. dynamic: ${SILIB} idisplayfont.o courR10.h
  44. $(CC) idisplayfont.o $(LIBS) -lm ${INCLIB} -o idisplayfont
  45. idisplayfont: idisplayfont.o courR10.h
  46. @if [ "${DYNAMIC}." = "yes." ]; then 
  47.   make "CC=$(CC)" "CFLAGS=$(CFLAGS)" "RANLIB=$(RANLIB)" 
  48. "STATIC=${STATIC}" "DYNAMIC=${DYNAMIC}" 
  49. "LIBS=${LIBS}" "SOVERSION=${SOVERSION}" dynamic; 
  50. else 
  51. make "CC=$(CC)" "CFLAGS=$(CFLAGS)" "RANLIB=$(RANLIB)" 
  52. "STATIC=${STATIC}" "DYNAMIC=${DYNAMIC}" 
  53. "LIBS=${LIBS}" "SOVERSION=${SOVERSION}" static; 
  54. fi
  55. install: idisplayfont
  56. @echo "Installing 'idisplayfont' in $(BINDIR)"; 
  57. $(INSTALL_PROGRAM) idisplayfont $(BINDIR)
  58. clean:
  59. @echo "Cleaning in `pwd`"
  60. rm -f *.o idisplayfont *core courR10.h
  61. makefiles: makefile
  62. makefile:
  63. @echo "Updating `pwd`/Makefile"; 
  64. if [ "$(SITE_DEF_FILE)." = "." ]; then 
  65. echo "You must run 'make makefiles' from the toplevel Makefile."; 
  66. exit 1; 
  67. fi; 
  68. sed -n '1,/^# __ILIB_SITE_SETTINGS__/ p' Makefile > Makefile.new; 
  69. cat $(SITE_DEF_FILE) >> Makefile.new; 
  70. sed -n '/^# __END_ILIB_SITE_SETTINGS__/,/^# START DEPENDENCIES/ p' Makefile >> Makefile.new; 
  71. $(CC) $(INCLUDES) -M *.c >> Makefile.new; 
  72. mv Makefile Makefile.bak; 
  73. mv Makefile.new Makefile
  74. # START DEPENDENCIES