Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
authorJelmer Vernooij <jelmer@samba.org>
Wed, 27 Feb 2008 12:19:07 +0000 (13:19 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 27 Feb 2008 12:19:07 +0000 (13:19 +0100)
Conflicts:

source/build/smb_build/makefile.pm
(This used to be commit c45b97c4714dd0565949732394c9c1e8eedbb99a)

1  2 
source4/build/make/rules.mk

index 794eed0f66b5dc2a35aa6edec77b6982cffdd616,9791466712368350492dec554b05917706377751..44277fe3e201473afd11b73168f34c70ad962f34
@@@ -81,54 -100,13 +81,61 @@@ check:: tes
  unused_macros:
        $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
  
+ # Create a static library
+ %.a:
+       @echo Linking $@
+       @rm -f $@
+       @mkdir -p $(@D)
+       @$(STLD) $(STLD_FLAGS) $@ $^
 +###############################################################################
 +# Templates
 +###############################################################################
 +
 +# Partially link
 +# Arguments: target object file, source object files
 +define partial_link_template 
 +$(1): $(2) ;
 +      @echo Partially linking $$@
 +      @mkdir -p $$(@D)
 +      $$(PARTLINK) -o $$@ $$^
 +endef
 +
 +# Link a binary
 +# Arguments: target file, depends, flags
 +define binary_link_template
 +$(1): $(2) ;
 +      @echo Linking $$@
 +      @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
 +endef
 +
 +# Link a host-machine binary
 +# Arguments: target file, depends, flags
 +define host_binary_link_template
 +$(1): $(2) ;
 +      @echo Linking $$@
 +      @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
 +endef
 +
 +# Create a prototype header
 +# Arguments: header file, c files
 +define proto_header_template
 +$(1): $(2) ;
 +      @echo "Creating $$@"
 +      @$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --all=$$@ $$^
 +endef
 +
 +# Shared module
 +# Arguments: Target, dependencies, objects
 +define shared_module_template
 +
 +$(1): $(2) ;
 +      @echo Linking $$@
 +      @mkdir -p $$(@D)
 +      @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
 +
 +endef
 +
  ###############################################################################
  # File types
  ###############################################################################