summaryrefslogtreecommitdiff
path: root/source4/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rules.mk')
-rw-r--r--source4/rules.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/rules.mk b/source4/rules.mk
index 06f425df44..d39910dafc 100644
--- a/source4/rules.mk
+++ b/source4/rules.mk
@@ -99,6 +99,30 @@ $(1): $(2)
$(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: proto header, private header, c files
+define proto_header_template
+$(1) $(2): $(3)
+ @echo "Creating $@"
+ @$(PERL) $(srcdir)/script/mkproto.pl --srcdir=$(srcdir) --builddir=$(builddir) --private=$(2) --public=$(1) $(3)
+endef
+
###############################################################################
# File types
###############################################################################