Make.common.in 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. VERSION=4.1.28
  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 = $(prefix)
  12. binprefix =
  13. manprefix =
  14. bindir = $(exec_prefix)/bin
  15. libdir = $(exec_prefix)/lib/mc
  16. suppbindir = $(libdir)/bin
  17. tidir = $(libdir)/term
  18. extfsdir = $(libdir)/extfs
  19. icondir = $(prefix)/share/icons/mc
  20. mandir = $(prefix)/man/man1
  21. datadir = $(prefix)/share
  22. localedir = $(datadir)/locale
  23. manext = 1
  24. man8dir = $(prefix)/man/man8
  25. man8ext = 8
  26. xv_bindir = @xv_bindir@
  27. # Tools & program stuff
  28. SEDCMD = @SEDCMD@
  29. SEDCMD2 = @SEDCMD2@
  30. STRIP = @STRIP@
  31. @SET_MAKE@
  32. CC = @CC@
  33. CPP = @CPP@
  34. AR = @AR@
  35. RANLIB = @RANLIB@
  36. RM = @RM@
  37. RMF = @RM@ -f
  38. MV = @MV@
  39. CP = @CP@
  40. LN_S = @LN_S@
  41. AWK = @AWK@
  42. AWK_VAR_OPTION = @AWK_VAR_OPTION@
  43. # Flags & libs
  44. # No way, to make make happy (except GNU), we cannot use := to append
  45. # something to these, so that's why there is a leading _
  46. XCFLAGS = @CFLAGS@
  47. XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\"
  48. XLDFLAGS = @LDFLAGS@
  49. XDEFS = @DEFS@
  50. XLIBS = @LIBS@
  51. # Where do we have the sources?
  52. # You shouldn't have to edit this :)
  53. mcsrcdir = $(rootdir)/src
  54. docdir = $(rootdir)/doc
  55. mclibdir = $(rootdir)/lib
  56. slangdir = $(rootdir)/slang
  57. vfsdir = $(rootdir)/vfs
  58. xvdir = $(rootdir)/xv
  59. tkdir = $(rootdir)/tk
  60. gnomedir = $(rootdir)/gnome
  61. icodir = $(rootdir)/icons
  62. hpath = -I$(mcsrcdir) -I$(slangdir) -I$(vfsdir) -I$(xvdir) -I$(xvdir)/support/xview_private -I$(tkdir)
  63. # Rules
  64. first_rule: all
  65. @PHONY@ all check cross TAGS clean install uninstall distcopy depend dep
  66. @PHONY@ fastdep fastdepslang fastdepvfs fastdeploc slowdep
  67. @PCENTRULE@../slang/%.o : ../slang/%.c
  68. @PCENTRULE@ cd ../slang; $(MAKE) libmcslang.a
  69. @PCENTRULE@../vfs/%.o : ../vfs/%.c
  70. @PCENTRULE@ cd ../vfs; $(MAKE) libvfs.a
  71. fastdep: dummy
  72. 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
  73. -$(MAKE) fastdeploc
  74. @WRITEDEP@
  75. fastdepslang:
  76. @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
  77. fastdepvfs:
  78. @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
  79. slowdep: dummy
  80. if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then \
  81. $(CPP) -M $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/*.c > .depend; fi
  82. @WRITEDEP@
  83. mcdep: @dep@
  84. dummy:
  85. # End of Make.common