1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

r15301: Use static libraries internally. This required a few hacks in the build

system - these should be removed later on.
This commit is contained in:
Jelmer Vernooij 2006-04-27 21:46:44 +00:00 committed by Gerald (Jerry) Carter
parent d9f1c19f58
commit 0654739166
26 changed files with 45 additions and 188 deletions

View File

@ -99,10 +99,8 @@ AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep)
AC_CHECK_FUNCS(backtrace setbuffer)
AC_SUBST(BLDSHARED)
AC_SUBST(BLDMERGED)
# Assume non-shared by default and override below
BLDSHARED="false"
BLDMERGED="true"
# these are the defaults, good for lots of systems
HOST_OS="$host_os"
@ -245,13 +243,11 @@ case "$host_os" in
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
*-vms)
BLDMERGED="false"
BLDSHARED="false"
LDSHFLAGS=""
;;
*vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
BLDSHARED="false"
BLDMERGED="false"
LDSHFLAGS=""
;;
*)

View File

@ -35,6 +35,7 @@ my $section_types = {
"PUBLIC_HEADERS" => "list",
"CFLAGS" => "string",
"LDFLAGS" => "list",
"STANDARD_VISIBILITY" => "string"
},
"MODULE" => {
@ -97,6 +98,7 @@ my $section_types = {
"PRIVATE_PROTO_HEADER" => "string",
"CFLAGS" => "string",
"LDFLAGS" => "list",
"STANDARD_VISIBILITY" => "string"
}
};

View File

@ -30,6 +30,7 @@ sub _prepare_build_h($)
foreach my $key (values %{$depend}) {
my $DEFINE = ();
next if ($key->{TYPE} ne "LIBRARY" and
$key->{TYPE} ne "MODULE" and
$key->{TYPE} ne "SUBSYSTEM" and
$key->{TYPE} ne "BINARY");
next unless defined($key->{INIT_FUNCTIONS});

View File

@ -124,7 +124,7 @@ sub import_integrated($$)
next if($mod->{SUBSYSTEM} ne $lib->{NAME});
next if($mod->{ENABLE} ne "YES");
push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{TYPE}_$mod->{NAME}_OBJ_LIST)");
push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{TYPE}_$mod->{NAME}_FULL_OBJ_LIST)");
push (@{$lib->{LINK_FLAGS}}, "\$($mod->{TYPE}_$mod->{NAME}_LINK_FLAGS)");
push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PUBLIC_DEPENDENCIES}}) if defined($mod->{PUBLIC_DEPENDENCIES});
push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PRIVATE_DEPENDENCIES}}) if defined($mod->{PRIVATE_DEPENDENCIES});
@ -146,8 +146,6 @@ sub calc_unique_deps($$$$$$)
if (defined ($dep->{OUTPUT_TYPE}) &&
($withlibs or
($dep->{OUTPUT_TYPE} eq "OBJ_LIST") or
($dep->{OUTPUT_TYPE} eq "MERGEDOBJ") or
($dep->{OUTPUT_TYPE} eq "INTEGRATED") or
($dep->{OUTPUT_TYPE} eq "STATIC_LIBRARY"))) {
push (@$busy, $dep->{NAME});

View File

@ -23,10 +23,8 @@ my $subsystem_output_type;
if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) {
$subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE};
} elsif ($config::config{BLDMERGED} eq "true") {
$subsystem_output_type = "MERGEDOBJ";
} else {
$subsystem_output_type = "OBJ_LIST";
$subsystem_output_type = "STATIC_LIBRARY";
}
my $library_output_type;
@ -34,10 +32,8 @@ if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) {
$library_output_type = $ENV{LIBRARY_OUTPUT_TYPE};
} elsif ($config::config{BLDSHARED} eq "true") {
$library_output_type = "SHARED_LIBRARY";
} elsif ($config::config{BLDMERGED} eq "true") {
$library_output_type = "MERGEDOBJ";
} else {
$library_output_type = "OBJ_LIST";
$library_output_type = "STATIC_LIBRARY";
}
my $module_output_type;
@ -67,8 +63,6 @@ foreach my $key (values %$OUTPUT) {
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
$mkenv->MergedObj($key) if $key->{OUTPUT_TYPE} eq "MERGEDOBJ";
$mkenv->ObjList($key) if $key->{OUTPUT_TYPE} eq "OBJLIST";
$mkenv->StaticLibrary($key) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
$mkenv->PkgConfig($key) if ($key->{OUTPUT_TYPE} eq "SHARED_LIBRARY") and
defined($key->{VERSION});

View File

@ -202,6 +202,7 @@ sub Integrated($$)
my ($self,$ctx) = @_;
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
}
@ -316,41 +317,6 @@ __EOD__
);
}
sub MergedObj($$)
{
my ($self,$ctx) = @_;
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "DEPEND_LIST");
return unless $ctx->{TARGET};
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
$self->output("$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)\n");
$self->output("\t\@echo \"Pre-Linking $ctx->{TYPE} $ctx->{NAME}\"\n");
$self->output("\t@\$(LD) -r \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) -o $ctx->{TARGET}\n");
$self->output("\n");
}
sub ObjList($$)
{
my ($self,$ctx) = @_;
return unless $ctx->{TARGET};
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->output("$ctx->{TARGET}: ");
$self->output("\$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)\n");
$self->output("\t\@touch $ctx->{TARGET}\n");
}
sub StaticLibrary($$)
{
my ($self,$ctx) = @_;

View File

@ -26,21 +26,6 @@ sub add_dir($$)
return @ret;
}
sub generate_mergedobj($)
{
my $subsys = shift;
$subsys->{OUTPUT} = $subsys->{TARGET} = "bin/subsystems/$subsys->{TYPE}_$subsys->{NAME}.o";
}
sub generate_objlist($)
{
my $subsys = shift;
$subsys->{TARGET} = "bin/.$subsys->{TYPE}_$subsys->{NAME}";
$subsys->{OUTPUT} = "\$($subsys->{TYPE}_$subsys->{NAME}_OBJ_LIST)";
}
sub generate_shared_library($)
{
my $lib = shift;
@ -129,15 +114,7 @@ sub create_output($$)
# Combine object lists
push(@{$part->{OBJ_LIST}}, add_dir($part->{BASEDIR}, $part->{OBJ_FILES})) if defined($part->{OBJ_FILES});
if ((not defined($part->{OBJ_LIST}) or
scalar(@{$part->{OBJ_LIST}}) == 0) and
$part->{OUTPUT_TYPE} eq "MERGEDOBJ") {
$part->{OUTPUT_TYPE} = "OBJLIST";
}
generate_binary($part) if $part->{OUTPUT_TYPE} eq "BINARY";
generate_mergedobj($part) if $part->{OUTPUT_TYPE} eq "MERGEDOBJ";
generate_objlist($part) if $part->{OUTPUT_TYPE} eq "OBJLIST";
generate_shared_library($part) if $part->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
generate_static_library($part) if $part->{OUTPUT_TYPE} eq "STATIC_LIBRARY";

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM CLDAPD
[SUBSYSTEM::CLDAPD]
[MODULE::CLDAPD]
INIT_FUNCTION = server_service_cldapd_init
SUBSYSTEM = service
PRIVATE_PROTO_HEADER = proto.h
OBJ_FILES = \
cldap_server.o \

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM KDC
[SUBSYSTEM::KDC]
[MODULE::KDC]
INIT_FUNCTION = server_service_kdc_init
SUBSYSTEM = service
OBJ_FILES = \
kdc.o \
kpasswdd.o

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM LDAP
[SUBSYSTEM::LDAP]
[MODULE::LDAP]
INIT_FUNCTION = server_service_ldap_init
SUBSYSTEM = service
PRIVATE_PROTO_HEADER = proto.h
OBJ_FILES = \
ldap_server.o \

View File

@ -177,7 +177,7 @@ OBJ_FILES = \
OBJ_FILES= \
tools/cmdline.o
PUBLIC_DEPENDENCIES = ldb LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS
PRIVATE_DEPENDENCIES = gensec LIBCLI_RESOLVE
PRIVATE_DEPENDENCIES = gensec
# End SUBSYSTEM LIBLDB_CMDLINE
################################################
@ -188,7 +188,7 @@ INSTALLDIR = BINDIR
OBJ_FILES = \
tools/ldbadd.o
PRIVATE_DEPENDENCIES = \
LIBLDB_CMDLINE
LIBLDB_CMDLINE LIBCLI_RESOLVE
MANPAGE = man/ldbadd.1
# End BINARY ldbadd
################################################

View File

@ -9,7 +9,6 @@ AC_DEFUN([AC_CHECK_FUNC_EXT], [
])
AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
AC_DEFUN([SMB_EXT_LIB_ENABLE], [echo -n ""])
AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/ldb.h)

View File

@ -41,6 +41,7 @@ OBJ_FILES = \
access.o \
connect_multi.o \
connect.o
LDFLAGS = -lcli_resolve -lcli_nbt -lndr_nbt -lndr_svcctl
PUBLIC_DEPENDENCIES = LIBTALLOC
PRIVATE_DEPENDENCIES = SOCKET_WRAPPER LIBCLI_COMPOSITE
#LIBCLI_RESOLVE

View File

@ -1,5 +1,6 @@
AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/tdb.h)
AC_CONFIG_HEADER(include/config.h)
AC_PROG_CC

View File

@ -123,6 +123,7 @@ OBJ_FILES = clireadwrite.o \
PRIVATE_PROTO_HEADER = raw/raw_proto.h
PRIVATE_DEPENDENCIES = LIBCLI_COMPOSITE
PUBLIC_DEPENDENCIES = LIBCLI_RAW_KRB5
LDFLAGS = -lcli_smb_composite
OBJ_FILES = raw/rawfile.o \
raw/smb_signing.o \
raw/clisocket.o \

View File

@ -350,16 +350,12 @@ librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES)
@$(PERL) $(srcdir)/librpc/tables.pl --output=librpc/gen_ndr/tables.c $(IDL_NDR_PARSE_H_FILES) > librpc/gen_ndr/tables.x
mv librpc/gen_ndr/tables.x librpc/gen_ndr/tables.c
[SUBSYSTEM::NDR_IFACE_TABLE]
OBJ_FILES = gen_ndr/tables.o
[LIBRARY::NDR_TABLE]
VERSION = 0.0.1
SO_VERSION = 0
OBJ_FILES = rpc/table.o
OBJ_FILES = rpc/table.o gen_ndr/tables.o
PRIVATE_PROTO_HEADER = rpc/dcerpc_table.h
PUBLIC_DEPENDENCIES = \
NDR_IFACE_TABLE \
NDR_AUDIOSRV NDR_ECHO NDR_DCERPC \
NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
NDR_POLICYAGENT NDR_UNIXINFO NDR_SAMR NDR_SPOOLSS NDR_WKSSVC NDR_SRVSVC NDR_ATSVC \

View File

@ -54,7 +54,9 @@ PUBLIC_DEPENDENCIES = \
#######################
# Start SUBSYSTEM NBTD
[SUBSYSTEM::NBTD]
[MODULE::NBTD]
INIT_FUNCTION = server_service_nbtd_init
SUBSYSTEM = service
OBJ_FILES = \
nbt_server.o \
interfaces.o \

View File

@ -205,12 +205,11 @@ PUBLIC_DEPENDENCIES = \
################################################
# Start SUBSYSTEM dcerpc_server
[LIBRARY::dcerpc_server]
DESCRIPTION = DCE/RPC Server implementation
VERSION = 0.0.1
SO_VERSION = 0
PUBLIC_HEADERS = dcerpc_server.h
PUBLIC_PROTO_HEADER = dcerpc_server_proto.h
[MODULE::dcerpc_server]
INIT_FUNCTION = server_service_rpc_init
SUBSYSTEM = service
#PUBLIC_HEADERS = dcerpc_server.h
PRIVATE_PROTO_HEADER = dcerpc_server_proto.h
OBJ_FILES = \
dcerpc_server.o \
dcerpc_sock.o \

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM SMB
[SUBSYSTEM::SMB_SERVER]
[MODULE::SMB_SERVER]
INIT_FUNCTION = server_service_smb_init
SUBSYSTEM = service
OBJ_FILES = \
smb_server.o \
tcon.o \

View File

@ -16,5 +16,6 @@ OBJ_FILES = \
signing.o
PUBLIC_DEPENDENCIES = \
ntvfs LIBPACKET
LDFLAGS = -lsmb_server
# End SUBSYSTEM SMB_PROTOCOL
#######################

View File

@ -11,5 +11,6 @@ OBJ_FILES = \
keepalive.o
PUBLIC_DEPENDENCIES = \
ntvfs LIBPACKET LIBCLI_SMB2
LDFLAGS = -lsmb_server
# End SUBSYSTEM SMB2_PROTOCOL
#######################

View File

@ -10,98 +10,6 @@ PUBLIC_DEPENDENCIES = \
# End MODULE server_auth
################################################
################################################
# Start MODULE service_smb
[MODULE::service_smb]
INIT_FUNCTION = server_service_smb_init
OUTPUT_TYPE = INTEGRATED
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
SMB_SERVER
# End MODULE server_smb
################################################
################################################
# Start MODULE service_rpc
[MODULE::service_rpc]
INIT_FUNCTION = server_service_rpc_init
SUBSYSTEM = service
OUTPUT_TYPE = INTEGRATED
PUBLIC_DEPENDENCIES = \
dcerpc_server
# End MODULE server_rpc
################################################
################################################
# Start MODULE service_ldap
[MODULE::service_ldap]
INIT_FUNCTION = server_service_ldap_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
LDAP
# End MODULE server_ldap
################################################
################################################
# Start MODULE service_nbtd
[MODULE::service_nbtd]
INIT_FUNCTION = server_service_nbtd_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
NBTD
# End MODULE service_nbtd
################################################
################################################
# Start MODULE service_wrepl
[MODULE::service_wrepl]
INIT_FUNCTION = server_service_wrepl_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
WREPL_SRV
# End MODULE service_wrepl
################################################
################################################
# Start MODULE service_cldapd
[MODULE::service_cldap]
INIT_FUNCTION = server_service_cldapd_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
CLDAPD
# End MODULE service_cldapd
################################################
################################################
# Start MODULE service_web
[MODULE::service_web]
INIT_FUNCTION = server_service_web_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
WEB
# End MODULE service_web
################################################
################################################
# Start MODULE service_web
[MODULE::service_kdc]
INIT_FUNCTION = server_service_kdc_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
KDC
# End MODULE service_web
################################################
################################################
# Start MODULE service_winbind
[MODULE::service_winbind]
INIT_FUNCTION = server_service_winbind_init
SUBSYSTEM = service
PUBLIC_DEPENDENCIES = \
WINBIND
# End MODULE service_winbind
################################################
#######################
# Start SUBSERVICE
[SUBSYSTEM::service]

View File

@ -176,7 +176,7 @@ OBJ_FILES = \
auth/ntlmssp.o \
auth/pac.o
PUBLIC_DEPENDENCIES = \
LIBSMB gensec auth
LIBSMB gensec auth LIBSAMBA3
# End SUBSYSTEM TORTURE_AUTH
#################################

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM WEB
[SUBSYSTEM::WEB]
[MODULE::WEB]
INIT_FUNCTION = server_service_web_init
SUBSYSTEM = service
PRIVATE_PROTO_HEADER = proto.h
OBJ_FILES = \
web_server.o \

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM WINBIND
[SUBSYSTEM::WINBIND]
[MODULE::WINBIND]
INIT_FUNCTION = server_service_winbind_init
SUBSYSTEM = service
PRIVATE_PROTO_HEADER = wb_proto.h
OBJ_FILES = \
wb_server.o \

View File

@ -2,7 +2,9 @@
#######################
# Start SUBSYSTEM WREPL_SRV
[SUBSYSTEM::WREPL_SRV]
[MODULE::WREPL_SRV]
INIT_FUNCTION = server_service_wrepl_init
SUBSYSTEM = service
OBJ_FILES = \
wrepl_server.o \
wrepl_in_connection.o \