Makefile.in 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. BINDIR = @bindir@
  21. # we don't use sbindir because we want full compatibility with
  22. # the previous releases of Samba
  23. SBINDIR = @bindir@
  24. LIBDIR = @libdir@
  25. VARDIR = @localstatedir@
  26. MANDIR = @mandir@
  27. # The permissions to give the executables
  28. INSTALLPERMS = 0755
  29. # set these to where to find various files
  30. # These can be overridden by command line switches (see smbd(8))
  31. # or in smb.conf (see smb.conf(5))
  32. SMBLOGFILE = $(VARDIR)/log.smb
  33. NMBLOGFILE = $(VARDIR)/log.nmb
  34. CONFIGFILE = @configdir@/smb.conf
  35. LMHOSTSFILE = @configdir@/lmhosts
  36. DRIVERFILE = $(LIBDIR)/printers.def
  37. PASSWD_PROGRAM = /bin/passwd
  38. # This is where smbpasswd et al go
  39. PRIVATEDIR = @privatedir@
  40. SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
  41. # the directory where lock files go
  42. LOCKDIR = @lockdir@
  43. # The directory where code page definition files go
  44. CODEPAGEDIR = @codepagedir@
  45. # The current codepage definition list.
  46. CODEPAGELIST= 437 737 850 852 861 932 866 949 950 936
  47. # where you are going to have the smbrun binary. This defaults to the
  48. # install directory. This binary is needed for correct printing
  49. # and magic script execution. This should be an absolute path!
  50. # Also not that this should include the name "smbrun" on the end (the
  51. # name of the executable)
  52. SMBRUN = $(BINDIR)/smbrun
  53. PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\"
  54. FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include $(CPPFLAGS) -DSMBLOGFILE=\"$(SMBLOGFILE)\" -DNMBLOGFILE=\"$(NMBLOGFILE)\"
  55. FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
  56. FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DSMBRUN=\"$(SMBRUN)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
  57. FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\"
  58. FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
  59. FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
  60. SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd
  61. ######################################################################
  62. # object file lists
  63. ######################################################################
  64. SAMBAFILES= \
  65. param/loadparm.o \
  66. param/params.o \
  67. lib/time.o \
  68. lib/slprintf.o \
  69. lib/util.o \
  70. lib/debug.o \
  71. lib/system.o \
  72. lib/util_str.o \
  73. lib/kanji.o \
  74. lib/charcnv.o \
  75. lib/charset.o \
  76. lib/username.o \
  77. lib/util_file.o \
  78. lib/util_sock.o \
  79. lib/genrand.o \
  80. lib/md4.o \
  81. lib/doscalls.o \
  82. lib/util_unistr.o \
  83. lib/interface.o \
  84. lib/netmask.o \
  85. libsmb/clientgen.o \
  86. libsmb/pwd_cache.o \
  87. libsmb/smbencrypt.o \
  88. libsmb/smbdes.o \
  89. libsmb/nmblib.o \
  90. libsmb/namequery.o\
  91. libsmb/nterr.o \
  92. libsmb/smberr.o
  93. ######################################################################
  94. # now the rules...
  95. ######################################################################
  96. all : CHECK libsamba.a
  97. .SUFFIXES:
  98. .SUFFIXES: .c .o
  99. CHECK:
  100. @echo "Using FLAGS = $(FLAGS)"
  101. MAKEDIR = || exec false; \
  102. if test -d "$$dir"; then :; else \
  103. echo mkdir "$$dir"; \
  104. mkdir -p "$$dir" >/dev/null 2>&1 || \
  105. test -d "$$dir" || \
  106. mkdir "$$dir" || \
  107. exec false; fi || exec false
  108. libsamba.a: $(SAMBAFILES)
  109. $(AR) cr libsamba.a $(SAMBAFILES)
  110. .c.o:
  111. @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
  112. dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
  113. @echo Compiling $*.c
  114. @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \
  115. -o $@
  116. @BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
  117. etags:
  118. etags `find . -name "*.[ch]"`
  119. ctags:
  120. ctags `find . -name "*.[ch]"`
  121. mostlyclean:
  122. rm -f core */*~ *~ */*.o config.log
  123. clean: mostlyclean
  124. rm -f *.a
  125. distclean: clean
  126. rm -f config.log
  127. rm -f include/config.h include/stamp-h Makefile
  128. rm -f config.status config.cache so_locations
  129. #
  130. # This target is for documenation updators. It regenerates
  131. # the man pages and HTML docs from the YODL source files.
  132. # In order for this target to work YODL must be installed
  133. # and working on your system. JRA.
  134. yodldocs:
  135. @$(SHELL) $(srcdir)/script/makeyodldocs.sh $(srcdir)
  136. # this target is really just for my use. It only works on a limited
  137. # range of machines and is used to produce a list of potentially
  138. # dead (ie. unused) functions in the code. (tridge)
  139. finddead:
  140. nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
  141. nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
  142. comm -13 nmused.txt nmfns.txt
  143. # Rules for maintainers (--enable-maintainer-mode)
  144. AUTOCONF=@AUTOCONF@
  145. AUTOHEADER=@AUTOHEADER@
  146. # when configure.in is updated, reconfigure
  147. $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
  148. cd $(srcdir) && $(AUTOCONF)
  149. config.status: $(srcdir)/configure
  150. $(SHELL) ./config.status --recheck
  151. Makefile: $(srcdir)/Makefile.in config.status \
  152. include/stamp-h # just to ensure that config.h is up-to-date
  153. CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  154. # note that nothing depends on config.h, so will probably be rebuilt
  155. # only when explicitly requested, unless dependency tracking is enabled
  156. include/config.h: include/stamp-h
  157. @:
  158. include/stamp-h: $(srcdir)/include/config.h.in config.status
  159. CONFIG_FILES= CONFIG_HEADERS=include/config.h $(SHELL) ./config.status
  160. @echo > include/stamp-h
  161. $(srcdir)/include/config.h.in: $(srcdir)/include/stamp-h.in
  162. @:
  163. $(srcdir)/include/stamp-h.in: @MAINT@ $(srcdir)/configure.in
  164. cd $(srcdir) && $(AUTOHEADER)
  165. @date -u > $@
  166. # Added for compatibility with Automake-generated makefiles
  167. distdir:
  168. dvi:
  169. check:
  170. install:
  171. installcheck:
  172. uninstall: