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

图片显示

开发平台:

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