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