Makefile.in 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. ###########################################################################
  2. # Makefile.in for Samba - rewritten for autoconf support
  3. # Copyright Andrew Tridgell 1992-1998
  4. ###########################################################################
  5. prefix=@prefix@
  6. exec_prefix=@exec_prefix@
  7. mandir=@mandir@
  8. CC=@CC@
  9. CFLAGS=@CFLAGS@
  10. CPPFLAGS=@CPPFLAGS@
  11. LDFLAGS=@LDFLAGS@
  12. AWK=@AWK@
  13. AR=@AR@
  14. INSTALLCMD=@INSTALL@
  15. VPATH=@srcdir@
  16. srcdir=@srcdir@
  17. builddir=@builddir@
  18. SHELL=@SHELL@
  19. BASEDIR= @prefix@
  20. LIBDIR = @libdir@
  21. VARDIR = @localstatedir@
  22. # The permissions to give the executables
  23. INSTALLPERMS = 0755
  24. # set these to where to find various files
  25. # These can be overridden by command line switches (see smbd(8))
  26. # or in smb.conf (see smb.conf(5))
  27. CONFIGFILE = @configdir@/smb.conf
  28. LMHOSTSFILE = @configdir@/lmhosts
  29. DRIVERFILE = $(LIBDIR)/printers.def
  30. # The directory where code page definition files go
  31. CODEPAGEDIR = @codepagedir@
  32. FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include $(CPPFLAGS)
  33. FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
  34. FLAGS3 = -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
  35. FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\"
  36. FLAGS = $(ISA) $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
  37. ######################################################################
  38. # object file lists
  39. ######################################################################
  40. SAMBAFILES= \
  41. param/loadparm.o \
  42. param/params.o \
  43. lib/time.o \
  44. lib/slprintf.o \
  45. lib/util.o \
  46. lib/debug.o \
  47. lib/system.o \
  48. lib/util_str.o \
  49. lib/kanji.o \
  50. lib/charcnv.o \
  51. lib/charset.o \
  52. lib/username.o \
  53. lib/util_file.o \
  54. lib/util_sock.o \
  55. lib/md4.o \
  56. lib/interface.o \
  57. lib/netmask.o \
  58. libsmb/clientgen.o \
  59. libsmb/pwd_cache.o \
  60. libsmb/smbencrypt.o \
  61. libsmb/smbdes.o \
  62. libsmb/nmblib.o \
  63. libsmb/namequery.o\
  64. libsmb/nterr.o \
  65. libsmb/smberr.o
  66. ######################################################################
  67. # now the rules...
  68. ######################################################################
  69. all : CHECK libsamba.a
  70. .SUFFIXES:
  71. .SUFFIXES: .c .o
  72. CHECK:
  73. @echo "Using FLAGS = $(FLAGS)"
  74. MAKEDIR = || exec false; \
  75. if test -d "$$dir"; then :; else \
  76. echo mkdir "$$dir"; \
  77. mkdir -p "$$dir" >/dev/null 2>&1 || \
  78. test -d "$$dir" || \
  79. mkdir "$$dir" || \
  80. exec false; fi || exec false
  81. libsamba.a: $(SAMBAFILES)
  82. $(AR) cr libsamba.a $(SAMBAFILES)
  83. .c.o:
  84. @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
  85. dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
  86. @echo Compiling $*.c
  87. @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \
  88. -o $@
  89. @BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
  90. etags:
  91. etags `find . -name "*.[ch]"`
  92. ctags:
  93. ctags `find . -name "*.[ch]"`
  94. mostlyclean:
  95. rm -f core */*~ *~ */*.o config.log
  96. clean: mostlyclean
  97. rm -f *.a
  98. distclean: clean
  99. rm -f config.log
  100. rm -f include/config.h include/stamp-h Makefile
  101. rm -f config.status config.cache so_locations
  102. # this target is really just for my use. It only works on a limited
  103. # range of machines and is used to produce a list of potentially
  104. # dead (ie. unused) functions in the code. (tridge)
  105. finddead:
  106. nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
  107. nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
  108. comm -13 nmused.txt nmfns.txt
  109. # Rules for maintainers (--enable-maintainer-mode)
  110. AUTOCONF=@AUTOCONF@
  111. AUTOHEADER=@AUTOHEADER@
  112. # when configure.ac is updated, reconfigure
  113. $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
  114. cd $(srcdir) && $(AUTOCONF)
  115. config.status: $(srcdir)/configure
  116. $(SHELL) ./config.status --recheck
  117. Makefile: $(srcdir)/Makefile.in config.status \
  118. include/stamp-h # just to ensure that config.h is up-to-date
  119. CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  120. # note that nothing depends on config.h, so will probably be rebuilt
  121. # only when explicitly requested, unless dependency tracking is enabled
  122. include/config.h: include/stamp-h
  123. @:
  124. include/stamp-h: $(srcdir)/include/config.h.in config.status
  125. CONFIG_FILES= CONFIG_HEADERS=include/config.h $(SHELL) ./config.status
  126. @echo > include/stamp-h
  127. $(srcdir)/include/config.h.in: $(srcdir)/include/stamp-h.in
  128. @:
  129. $(srcdir)/include/stamp-h.in: @MAINT@ $(srcdir)/configure.ac
  130. cd $(srcdir) && $(AUTOHEADER)
  131. @date -u > $@
  132. # Added for compatibility with Automake-generated makefiles
  133. distdir:
  134. dvi:
  135. check:
  136. install:
  137. installcheck:
  138. uninstall: