Make.common.in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. VERSION = @VERSION@
  2. SHELL = /bin/sh
  3. # This variable makes it possible to move the installation root to another
  4. # directory. This is useful when you're creating a binary distribution of mc.
  5. # If empty, normal root will be used.
  6. # You can run e.g. 'make install DESTDIR=/packages/mc/3.0' to accomplish
  7. # that.
  8. # DESTDIR = /opt/apps/mc/$(VERSION)
  9. # Installation target directories & other installation stuff
  10. prefix = @prefix@
  11. exec_prefix = @exec_prefix@
  12. binprefix =
  13. manprefix =
  14. builddir = @builddir@
  15. bindir = @bindir@
  16. libdir = $(exec_prefix)/lib/mc
  17. suppbindir = $(libdir)/bin
  18. tidir = $(libdir)/term
  19. extfsdir = $(libdir)/extfs
  20. datadir = @datadir@
  21. icondir = $(datadir)/icons/mc
  22. localedir = $(datadir)/locale
  23. basemandir = @mandir@
  24. mandir = $(basemandir)/man1
  25. manext = 1
  26. man8dir = $(basemandir)/man8
  27. man8ext = 8
  28. xv_bindir = @xv_bindir@
  29. # Tools & program stuff
  30. SEDCMD = @SEDCMD@
  31. SEDCMD2 = @SEDCMD2@
  32. STRIP = @STRIP@
  33. @SET_MAKE@
  34. CC = @CC@
  35. CPP = @CPP@
  36. AR = @AR@
  37. RANLIB = @RANLIB@
  38. RM = @RM@
  39. RMF = @RM@ -f
  40. MV = @MV@
  41. CP = @CP@
  42. LN_S = @LN_S@
  43. AWK = @AWK@
  44. AWK_VAR_OPTION = @AWK_VAR_OPTION@
  45. # Flags & libs
  46. # No way, to make make happy (except GNU), we cannot use := to append
  47. # something to these, so that's why there is a leading _
  48. XCFLAGS = @CFLAGS@
  49. XCPPFLAGS = @CPPFLAGS@ @MCCPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\"
  50. XLDFLAGS = @LDFLAGS@
  51. XDEFS = @DEFS@
  52. XLIBS = @LIBS@
  53. # Where do we have the sources?
  54. # You shouldn't have to edit this :)
  55. mcsrcdir = $(rootdir)/src
  56. docdir = $(rootdir)/doc
  57. mclibdir = $(rootdir)/lib
  58. slangdir = $(rootdir)/slang
  59. vfsdir = $(rootdir)/vfs
  60. xvdir = $(rootdir)/xv
  61. tkdir = $(rootdir)/tk
  62. gnomedir = $(rootdir)/gnome
  63. icodir = $(rootdir)/icons
  64. hpath = -I$(mcsrcdir) -I$(slangdir) -I$(vfsdir) -I$(xvdir) -I$(xvdir)/support/xview_private -I$(tkdir)
  65. # Rules
  66. first_rule: all
  67. @PHONY@ all check cross TAGS clean install uninstall distcopy depend dep
  68. @PHONY@ fastdep fastdepslang fastdepvfs fastdeploc slowdep
  69. @PCENTRULE@../slang/%.o : ../slang/%.c
  70. @PCENTRULE@ cd ../slang; $(MAKE) libmcslang.a
  71. @PCENTRULE@../vfs/%.o : ../vfs/%.c
  72. @PCENTRULE@ cd ../vfs; $(MAKE) libvfs.a
  73. fastdep: dummy
  74. if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then { cd $(srcdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(srcdir)" *.[ch];} > .depend; fi
  75. -$(MAKE) fastdeploc
  76. @WRITEDEP@
  77. fastdepslang:
  78. @PCENTRULE@ { { { cd ../slang; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(slangdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../slang libmcslang.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(slangdir)";};} >> .depend
  79. fastdepvfs:
  80. @PCENTRULE@ { { { cd ../vfs; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(vfsdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../vfs libvfs.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(vfsdir)";};} >> .depend
  81. slowdep: dummy
  82. if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then \
  83. $(CPP) -M $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/*.c > .depend; fi
  84. @WRITEDEP@
  85. mcdep: @dep@
  86. dummy:
  87. # End of Make.common