1 ###########################################################
2 ### SMB Build System ###
3 ### - create output for Makefile ###
5 ### Copyright (C) Stefan (metze) Metzmacher 2004 ###
6 ### Released under the GNU GPL ###
7 ###########################################################
12 sub _prepare_command_interpreters
($)
17 $output = << '__EOD__';
26 sub _prepare_path_vars
($)
31 $output = << '__EOD__';
33 exec_prefix
=@exec_prefix@
42 CONFIGDIR
= @configdir@
43 VARDIR
= @localstatedir@
45 # The permissions to give the executables
48 # set these to where to find various files
49 # These can be overridden by command line switches (see smbd(8))
50 # or in smb.conf (see smb.conf(5))
51 LOGFILEBASE
= @logfilebase@
52 CONFIGFILE
= $(CONFIGDIR
)/smb
.conf
53 LMHOSTSFILE
= $(CONFIGDIR
)/lmhosts
54 NCALRPCDIR
= @localstatedir@
/ncalrpc
56 # This is where smbpasswd et al go
57 PRIVATEDIR
= @privatedir@
58 SMB_PASSWD_FILE
= $(PRIVATEDIR
)/smbpasswd
60 # the directory where lock files go
63 # the directory where pid files go
66 PASSWD_FLAGS
= -DSMB_PASSWD_FILE
=\"$(SMB_PASSWD_FILE
)\" -DPRIVATE_DIR
=\"$(PRIVATEDIR
)\"
67 PATH_FLAGS1
= -DCONFIGFILE
=\"$(CONFIGFILE
)\" -DSBINDIR
=\"$(SBINDIR
)\"
68 PATH_FLAGS2
= $(PATH_FLAGS1
) -DBINDIR
=\"$(BINDIR
)\"
69 PATH_FLAGS3
= $(PATH_FLAGS2
) -DLMHOSTSFILE
=\"$(LMHOSTSFILE
)\"
70 PATH_FLAGS4
= $(PATH_FLAGS3
) -DLOCKDIR
=\"$(LOCKDIR
)\" -DPIDDIR
=\"$(PIDDIR
)\"
71 PATH_FLAGS5
= $(PATH_FLAGS4
) -DLIBDIR
=\"$(LIBDIR
)\" \
72 -DLOGFILEBASE
=\"$(LOGFILEBASE
)\" -DSHLIBEXT
=\"@SHLIBEXT@
\"
73 PATH_FLAGS6
= $(PATH_FLAGS5
) -DCONFIGDIR
=\"$(CONFIGDIR
)\" -DNCALRPCDIR
=\"$(NCALRPCDIR
)\"
74 PATH_FLAGS
= $(PATH_FLAGS6
) $(PASSWD_FLAGS
)
81 sub _prepare_compiler_linker
($)
86 $output = << '__EOD__';
88 CC_FLAGS
=-Iinclude
-I
. -I
$(srcdir
)/include
-I
$(srcdir
) -D_SAMBA_BUILD_
-Ilib
@CFLAGS@
@CPPFLAGS@
91 LD_FLAGS
=@LDFLAGS@
@CFLAGS@
97 SHLD_FLAGS
=@LDSHFLAGS@
@LDFLAGS@
104 sub _prepare_default_rule
($)
109 $output = << '__EOD__';
117 sub _prepare_SUFFIXES
($)
122 $output = << '__EOD__';
124 .SUFFIXES
: .c
.o
.h
.h
.gch
.a
.so
136 $output = << '__EOD__';
137 idl_full
: build
/pidl/idl.pm
138 CPP
="@CPP@" PERL
="$(PERL)" script
/build_idl
.sh FULL
140 idl
: build
/pidl/idl.pm
141 @CPP="@CPP@" PERL
="$(PERL)" script
/build_idl
.sh PARTIAL
143 build
/pidl/idl.pm
: build
/pidl/idl.yp
144 -yapp
-s build
/pidl/idl.yp
146 pch
: proto include
/includes
.h
.gch
149 -rm
-f include
/includes
.h
.gch
151 basics
: idl proto_exists
158 sub _prepare_dummy_MAKEDIR
()
163 $output = << '__EOD__';
167 dynconfig
.o
: dynconfig
.c Makefile
169 @
$(CC
) $(CC_FLAGS
) @PICFLAG@
$(PATH_FLAGS
) -c
$< -o
$@
170 @BROKEN_CC@
-mv
`echo $@ | sed 's%^.*/%%g'` $@
177 ###########################################################
178 # This function creates a standard make rule which is using $(CC)
180 # $output = _prepare_std_CC_rule($srcext,$destext,$flags,$message,$comment)
182 # $srcext - sourcefile extension
184 # $destext - destinationfile extension
186 # $flags - additional compiler flags
188 # $message - logmessage which is echoed while running this rule
190 # $comment - just a comment what this rule should do
192 # $output - the resulting output buffer
193 sub _prepare_std_CC_rule
($$$$$)
203 $output = << "__EOD__";
204 ###################################
207 \
@echo $message \
$\
*.$src
208 \@\
$(CC
) \
$(CC_FLAGS
) $flags -c \
$< -o \
$\@
209 \
@BROKEN_CC\@
-mv
`echo \$\@ | sed 's%^.*/%%g'` \
$\@
211 ###################################
218 sub array2oneperline
($)
224 foreach my $str (@
{$array}) {
225 if (!defined($str)) {
229 $output .= " \\\n\t\t";
242 foreach my $str (@
{$array}) {
243 if (!defined($str)) {
254 ###########################################################
255 # This function creates a object file list
257 # $output = _prepare_var_obj_list($var, $var_ctx)
259 # $var_ctx - the subsystem context
261 # $var_ctx->{NAME} - the <var> name
262 # $var_ctx->{OBJ_LIST} - the list of objectfiles which sould be linked to this <var>
264 # $output - the resulting output buffer
265 sub _prepare_obj_list
($$)
272 $tmpobjlist = array2oneperline
($ctx->{OBJ_LIST
});
274 $output = << "__EOD__";
275 ###################################
276 # Start $var $ctx->{NAME} OBJ LIST
277 $var\_
$ctx->{NAME
}_OBJS
=$tmpobjlist
278 # End $var $ctx->{NAME} OBJ LIST
279 ###################################
286 ###########################################################
287 # This function creates a object file list for a subsystem
289 # $output = _prepare_subsystem_obj_list($subsystem_ctx)
291 # $subsystem_ctx - the subsystem context
293 # $subsystem_ctx->{NAME} - the subsystem name
294 # $subsystem_ctx->{OBJ_LIST} - the list of objectfiles which sould be linked to this subsystem
296 # $output - the resulting output buffer
297 sub _prepare_subsystem_obj_list
($)
301 return _prepare_var_obj_list
("SUBSYSTEM",$ctx);
304 ###########################################################
305 # This function creates a object file list for a module
307 # $output = _prepare_module_obj_and_lib_list($module_ctx)
309 # $module_ctx - the module context
311 # $module_ctx->{NAME} - the module binary name
312 # $module_ctx->{OBJ_LIST} - the list of objectfiles which sould be linked to this module
314 # $output - the resulting output buffer
315 sub _prepare_module_obj_list
($)
319 return _prepare_var_obj_list
("MODULE",$ctx);
323 ###########################################################
324 # This function creates a make rule for linking a library
326 # $output = _prepare_shared_library_rule($library_ctx)
328 # $library_ctx - the library context
330 # $library_ctx->{NAME} - the library name
332 # $library_ctx->{DEPEND_LIST} - the list of rules on which this library depends
334 # $library_ctx->{LIBRARY_NAME} - the shared library name
335 # $library_ctx->{LIBRARY_REALNAME} - the shared library real name
336 # $library_ctx->{LIBRARY_SONAME} - the shared library soname
337 # $library_ctx->{LINK_LIST} - the list of objectfiles and external libraries
338 # which sould be linked to this shared library
339 # $library_ctx->{LINK_FLAGS} - linker flags used by this shared library
341 # $output - the resulting output buffer
342 sub _prepare_shared_library_rule
($)
352 my $outname = $ctx->{OUTPUT
};
354 $tmpdepend = array2oneperline
($ctx->{DEPEND_LIST
});
356 $tmpshlink = array2oneperline
($ctx->{LINK_LIST
});
357 $tmpshflag = array2oneperline
($ctx->{LINK_FLAGS
});
359 $output = << "__EOD__";
360 ###################################
361 # Start Library $ctx->{NAME}
363 LIBRARY_
$ctx->{NAME
}_DEPEND_LIST
=$tmpdepend
365 LIBRARY_
$ctx->{NAME
}_SHARED_LINK_LIST
=$tmpshlink
366 LIBRARY_
$ctx->{NAME
}_SHARED_LINK_FLAGS
=$tmpshflag
369 # Shared $ctx->{LIBRARY_NAME}
370 $ctx->{OUTPUT
}: \
$(LIBRARY_
$ctx->{NAME
}_DEPEND_LIST
) bin
/.dummy
372 \@\
$(SHLD
) \
$(SHLD_FLAGS
) -o \
$\@
\\
373 \
$(LIBRARY_
$ctx->{NAME
}_SHARED_LINK_FLAGS
) \\
374 \
$(LIBRARY_
$ctx->{NAME
}_SHARED_LINK_LIST
)
378 if (defined($ctx->{LIBRARY_SONAME
})) {
379 $output .= << "__EOD__";
380 # Symlink $ctx->{LIBRARY_SONAME}
381 bin
/$ctx->{LIBRARY_SONAME}: bin/$ctx->{LIBRARY_REALNAME
} bin
/.dummy
383 \
@ln -sf
$ctx->{LIBRARY_REALNAME
} \
$\@
384 # Symlink $ctx->{LIBRARY_NAME}
385 bin
/$ctx->{LIBRARY_NAME}: bin/$ctx->{LIBRARY_SONAME
} bin
/.dummy
387 \
@ln -sf
$ctx->{LIBRARY_SONAME
} \
$\@
390 $outname = $ctx->{LIBRARY_NAME
};
393 $output .= << "__EOD__";
394 library_
$ctx->{NAME
}: basics bin
/$outname
395 # End Library $ctx->{NAME}
396 ###################################
403 ###########################################################
404 # This function creates a make rule for linking a library
406 # $output = _prepare_static_library_rule($library_ctx)
408 # $library_ctx - the library context
410 # $library_ctx->{NAME} - the library name
412 # $library_ctx->{DEPEND_LIST} - the list of rules on which this library depends
414 # $library_ctx->{LIBRARY_NAME} - the static library name
415 # $library_ctx->{LINK_LIST} - the list of objectfiles which sould be linked
416 # to this static library
417 # $library_ctx->{LINK_FLAGS} - linker flags used by this static library
419 # $output - the resulting output buffer
420 sub _prepare_static_library_rule
($)
431 $tmpdepend = array2oneperline
($ctx->{DEPEND_LIST
});
433 $tmpstlink = array2oneperline
($ctx->{LINK_LIST
});
434 $tmpstflag = array2oneperline
($ctx->{LINK_FLAGS
});
436 $tmprules = "bin/$ctx->{LIBRARY_NAME}";
438 $output = << '__EOD__';
439 ###################################
440 # Start Library $ctx->{NAME}
442 LIBRARY_
$ctx->{NAME
}_DEPEND_LIST
=$tmpdepend
444 LIBRARY_
$ctx->{NAME
}_STATIC_LINK_LIST
=$tmpstlink
446 # Static $ctx->{LIBRARY_NAME}
447 $ctx->{OUTPUT
}: $(LIBRARY_
$ctx->{NAME
}_DEPEND_LIST
) bin
/.dummy
449 @
$(STLD
) $(STLD_FLAGS
) $@
\\
450 $(LIBRARY_
$ctx->{NAME
}_STATIC_LINK_LIST
)
452 library_
$ctx->{NAME
}: basics
$tmprules
453 # End Library $ctx->{NAME}
454 ###################################
463 ###########################################################
464 # This function creates a make rule for linking a binary
466 # $output = _prepare_binary_rule($binary_ctx)
468 # $binary_ctx - the binary context
470 # $binary_ctx->{NAME} - the binary name
471 # $binary_ctx->{BINARY} - the binary binary name
473 # $binary_ctx->{DEPEND_LIST} - the list of rules on which this binary depends
474 # $binary_ctx->{LINK_LIST} - the list of objectfiles and external libraries
475 # which sould be linked to this binary
476 # $binary_ctx->{LINK_FLAGS} - linker flags used by this binary
478 # $output - the resulting output buffer
479 sub _prepare_binary_rule
($)
487 $tmpdepend = array2oneperline
($ctx->{DEPEND_LIST
});
488 $tmplink = array2oneperline
($ctx->{LINK_LIST
});
489 $tmpflag = array2oneperline
($ctx->{LINK_FLAGS
});
491 $output = << "__EOD__";
492 ###################################
493 # Start Binary $ctx->{BINARY}
495 BINARY_
$ctx->{NAME
}_DEPEND_LIST
=$tmpdepend
496 BINARY_
$ctx->{NAME
}_LINK_LIST
=$tmplink
497 BINARY_
$ctx->{NAME
}_LINK_FLAGS
=$tmpflag
499 bin
/$ctx->{BINARY}: bin/.dummy \
$(BINARY_
$ctx->{NAME
}_DEPEND_LIST
)
501 \@\
$(LD
) \
$(LD_FLAGS
) -o \
$\@
\\
502 \
$\
(BINARY_
$ctx->{NAME
}_LINK_FLAGS
) \\
503 \
$\
(BINARY_
$ctx->{NAME
}_LINK_LIST
) \\
504 \
$\
(BINARY_
$ctx->{NAME
}_LINK_FLAGS
)
505 binary_
$ctx->{BINARY
}: basics bin
/$ctx->{BINARY
}
506 # End Binary $ctx->{BINARY}
507 ###################################
514 sub _prepare_proto_rules
()
518 $output .= << '__EOD__';
519 # Making this target will just make sure that the prototype files
520 # exist, not necessarily that they are up to date. Since they're
521 # removed by 'make clean' this will always be run when you do anything
523 proto_exists
: include
/proto.h include/build_env
.h
525 delheaders
: pch_clean
526 -rm
-f
$(builddir
)/include/proto
.h
$(builddir
)/include/build_env
.h
:
529 @cd $(srcdir
) && $(SHELL
) script
/mkproto
.sh
"$(PERL)" \
530 -h _PROTO_H_
$(builddir
)/include/proto
.h \
534 @echo Building include
/build_env
.h
535 @cd $(srcdir
) && $(SHELL
) script
/build_env.sh $(srcdir) $(builddir) $(CC) > $(builddir)/include
/build_env
.h
537 # 'make headers' or 'make proto' calls a subshell because we need to
538 # make sure these commands are executed in sequence even for a
540 headers
: delheaders proto_exists
545 @
[ -f
$(builddir
)/include/proto
.h
] || $(MAKE
) proto
548 -rm
-f
*.o
*/*.o */*/*.o */*/*/*.o bin
/*
553 -rm
-f include
/config
.h
556 -rm
-f config
.smb_build
.*
557 -rm
-f config
.log config
.cache
560 -rm
-f
*.bak
*~ */*.bak */*~ */*/*.bak
*/*/*~ */*/*/*.bak */*/*/*~
562 realdistclean
: distclean removebackup
563 -rm
-f include
/config
.h
.in
571 sub _prepare_make_target
($)
577 $tmpdepend = array2oneperline
($ctx->{DEPEND_LIST
});
579 $output = << "__EOD__";
580 ###################################
581 # Start Target $ctx->{TARGET}
582 $ctx->{TARGET
}: basics
$tmpdepend
583 # End Target $ctx->{TARGET}
584 ###################################
591 sub _prepare_obj_lists
($)
596 foreach my $key (values %{$CTX}) {
597 next if not defined($key->{OBJ_LIST
});
598 $output .= _prepare_obj_list
($key->{TYPE
}, $key);
604 sub _prepare_install_rules
($)
609 $output .= << '__EOD__';
612 @echo "Samba will be installed into:"
613 @echo " basedir: $(BASEDIR)"
614 @echo " bindir: $(BINDIR)"
615 @echo " sbindir: $(SBINDIR)"
616 @echo " libdir: $(LIBDIR)"
617 @echo " vardir: $(VARDIR)"
618 @echo " privatedir: $(PRIVATEDIR)"
619 @echo " piddir: $(PIDDIR)"
620 @echo " lockdir: $(LOCKDIR)"
623 @echo "Samba will be compiled with flags:"
624 @echo " CC_FLAGS = $(CC_FLAGS)"
625 @echo " LD_FLAGS = $(LD_FLAGS)"
626 @echo " STLD_FLAGS = $(STLD_FLAGS)"
627 @echo " SHLD_FLAGS = $(SHLD_FLAGS)"
629 SBIN_PROGS
= bin
/smbd
631 BIN_PROGS
= bin
/smbclient \
636 TORTURE_PROGS
= bin
/smbtorture \
642 LDB_PROGS
= bin
/ldbadd \
648 REG_PROGS
= bin
/regpatch \
654 install
: showlayout installbin installtorture installldb installreg installdat
656 # DESTDIR is used here to prevent packagers wasting their time
657 # duplicating the Makefile. Remove it and you will have the privelege
658 # of package each samba release for muliple versions of multiple
659 # distributions and operating systems, or at least supplying patches
660 # to all the packaging files required for this, prior to committing
661 # the removal of DESTDIR. Do not remove it even though you think it
665 @
$(SHELL
) $(srcdir
)/script/installdirs
.sh
$(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(SBINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(PRIVATEDIR
) $(DESTDIR
)$(PIDDIR
) $(DESTDIR
)$(LOCKDIR
)
667 installbin
: all installdirs
668 @
$(SHELL
) $(srcdir
)/script/installbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(SBINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(SBIN_PROGS
)
669 @
$(SHELL
) $(srcdir
)/script/installbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(BIN_PROGS
)
671 installtorture
: all installdirs
672 @
$(SHELL
) $(srcdir
)/script/installbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(TORTURE_PROGS
)
674 installldb
: all installdirs
675 @
$(SHELL
) $(srcdir
)/script/installbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(LDB_PROGS
)
677 installreg
: all installdirs
678 @
$(SHELL
) $(srcdir
)/script/installbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(REG_PROGS
)
680 installdat
: installdirs
681 @
$(SHELL
) $(srcdir
)/script/installdat
.sh
$(DESTDIR
)$(LIBDIR
) $(srcdir
)
683 uninstall
: uninstallbin uninstalltorture uninstallldb uninstallreg
686 @
$(SHELL
) $(srcdir
)/script/uninstallbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(SBINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(SBIN_PROGS
)
689 @
$(SHELL
) $(srcdir
)/script/uninstallbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(TORTURE_PROGS
)
692 @
$(SHELL
) $(srcdir
)/script/uninstallbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(LDB_PROGS
)
695 @
$(SHELL
) $(srcdir
)/script/uninstallbin
.sh
$(INSTALLPERMS
) $(DESTDIR
)$(BASEDIR
) $(DESTDIR
)$(BINDIR
) $(DESTDIR
)$(LIBDIR
) $(DESTDIR
)$(VARDIR
) $(DESTDIR
)$(REG_PROGS
)
699 swig
: scripting
/swig/_tdb
.so scripting
/swig/_dcerpc
.so
701 scripting
/swig/tdb_wrap
.c
: scripting
/swig/tdb
.i
702 swig
-python scripting
/swig/tdb
.i
704 scripting
/swig/_tdb
.so
: scripting
/swig/tdb_wrap
.o
$(LIBRARY_swig_tdb_DEPEND_LIST
)
705 $(SHLD
) $(SHLD_FLAGS
) -o scripting
/swig/_tdb
.so scripting
/swig/tdb_wrap
.o \
706 $(LIBRARY_swig_tdb_SHARED_LINK_LIST
) $(LIBRARY_swig_tdb_SHARED_LINK_FLAGS
)
708 SWIG_INCLUDES
= librpc
/gen_ndr/samr
.i librpc
/gen_ndr/lsa.i librpc
/gen_ndr/spoolss.i
710 scripting
/swig/dcerpc_wrap
.c
: scripting
/swig/dcerpc
.i scripting
/swig/samba
.i scripting
/swig/status_codes
.i
$(SWIG_INCLUDES
)
711 swig
-python scripting
/swig/dcerpc
.i
713 scripting
/swig/_dcerpc
.so
: scripting
/swig/dcerpc_wrap
.o
$(LIBRARY_swig_dcerpc_DEPEND_LIST
)
714 $(SHLD
) $(SHLD_FLAGS
) -o scripting
/swig/_dcerpc
.so scripting
/swig/dcerpc_wrap
.o
$(LIBRARY_swig_dcerpc_SHARED_LINK_LIST
) $(LIBRARY_swig_dcerpc_SHARED_LINK_FLAGS
)
717 -rm
-f scripting
/swig/_tdb
.so scripting
/swig/tdb
.pyc \
718 scripting
/swig/tdb
.py scripting
/swig/tdb_wrap
.c \
719 scripting
/swig/tdb_wrap
.o
724 etags
`find $(srcdir) -name "*.[ch]"`
727 ctags
`find $(srcdir) -name "*.[ch]"`
734 sub _prepare_rule_lists
($)
739 foreach my $key (values %{$depend}) {
740 next if not defined $key->{OUTPUT_TYPE
};
741 ($output .= _prepare_static_library_rule
($key)) if $key->{OUTPUT_TYPE
} eq "STATIC_LIBRARY";
742 ($output .= _prepare_shared_library_rule
($key)) if $key->{OUTPUT_TYPE
} eq "SHARED_LIBRARY";
743 ($output .= _prepare_binary_rule
($key)) if $key->{OUTPUT_TYPE
} eq "BINARY";
747 $output .= _prepare_IDL
($idl_ctx);
749 $output .= _prepare_proto_rules
();
751 $output .= _prepare_install_rules
($depend);
756 ###########################################################
757 # This function prepares the output for Makefile
759 # $output = _prepare_makefile_in($SMB_BUILD_CTX)
761 # $SMB_BUILD_CTX - the global SMB_BUILD context
763 # $output - the resulting output buffer
764 sub _prepare_makefile_in
($)
769 $output = "########################################\n";
770 $output .= "# Autogenerated by config.smb_build.pl #\n";
771 $output .= "########################################\n";
775 $output .= _prepare_command_interpreters
($cmd_ctx);
778 $output .= _prepare_path_vars
($path_ctx);
781 $output .= _prepare_compiler_linker
($compiler_ctx);
784 $output .= _prepare_default_rule
($rules_ctx);
787 $output .= _prepare_SUFFIXES
($suffix_ctx);
789 $output .= _prepare_dummy_MAKEDIR
();
791 $output .= _prepare_std_CC_rule
("c","o",'@PICFLAG@',"Compiling","Rule for std objectfiles");
792 $output .= _prepare_std_CC_rule
("h","h.gch",'@PICFLAG@',"Precompiling","Rule for precompiled headerfiles");
794 $output .= _prepare_obj_lists
($CTX);
796 $output .= _prepare_rule_lists
($CTX);
800 foreach my $part (values %{$CTX}) {
801 push (@all, $part->{OUTPUT
}) if defined ($part->{OUTPUT_TYPE
}) and $part->{OUTPUT_TYPE
} eq "BINARY";
804 $output .= _prepare_make_target
({ TARGET
=> "all", DEPEND_LIST
=> \
@all });
809 ###########################################################
810 # This function creates Makefile.in from the SMB_BUILD
813 # create_makefile_in($SMB_BUILD_CTX)
815 # $SMB_BUILD_CTX - the global SMB_BUILD context
817 # $output - the resulting output buffer
818 sub create_makefile_in
($)
822 open(MAKEFILE_IN
,"> Makefile.in") || die ("Can't open Makefile.in\n");
823 print MAKEFILE_IN _prepare_makefile_in
($CTX);
826 print "config.smb_build.pl: creating Makefile.in\n";