aboutsummaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
Diffstat (limited to 'mach')
-rw-r--r--mach/Machrules28
-rw-r--r--mach/Makefile2
2 files changed, 8 insertions, 22 deletions
diff --git a/mach/Machrules b/mach/Machrules
index 4f91d9bab7..93916a0a27 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -175,38 +175,24 @@ interface-headers: $(interface-headers)
omit-deps += $(interface-routines)
# Specify the static dependencies of the generated files.
-$(foreach if,$(user-interfaces),$($(if)-calls:%=$(objpfx)RPC_%.o))): \
+$(foreach o,$(object-suffixes),\
+$(foreach if,$(user-interfaces),$($(if)-calls:%=$(objpfx)RPC_%$o))): \
mach/boolean.h mach/kern_return.h mach/message.h mach/notify.h \
mach/mach_types.h mach/mig_errors.h mach/mig_support.h mach/msg_type.h \
$(..)libc-symbols.h $(objpfx)config.h
-$(server-interfaces:%=$(objpfx)%.o): \
+$(foreach o,$(object-suffixes),\
+$(server-interfaces:%=$(objpfx)%$o)): \
mach/boolean.h mach/kern_return.h mach/message.h mach/mig_errors.h \
mach/mig_support.h mach/std_types.h
# The MiG-generated sources also depend on the imports in their .defs files.
# These dependencies are generated into the .ir files above.
-# If defined, $(interface-library) is `libNAME.a'. It is to be a library
+# If defined, $(interface-library) is `libNAME'. It is to be a library
# containing all the MiG-generated functions for the specified interfaces.
ifdef interface-library
-$(interface-library)-objs := $(interface-routines:%=%.o)
-
-install-lib += $(interface-library)
-extra-objs += $($(interface-library)-objs)
-
-$(objpfx)$(interface-library): $(addprefix $(objpfx),\
- $($(interface-library)-objs))
-ifdef objdir
- cd $(objdir); $(AR) cru$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%)
-else
- $(AR) cru$(verbose) $@ $^
-endif
- $(RANLIB) $@
-
-lib-noranlib: $(objpfx)$(interface-library)
-
-mostlyclean:
- -rm -f $(objpfx)$(interface-library)
+$(interface-library)-routines = $(interface-routines)
+extra-libs += $(interface-library)
endif
diff --git a/mach/Makefile b/mach/Makefile
index 5f1ecae342..f9a3815f39 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -37,7 +37,7 @@ routines = $(mach-syscalls) $(mach-shortcuts) \
mach_error errstring error_compat errsystems \
devstream bootprivport setup-thread $(lock)
# The RPC interfaces go in a separate library.
-interface-library := libmachuser.a
+interface-library := libmachuser
user-interfaces := $(addprefix mach/,mach_interface mach_port mach_host \
memory_object_user \
memory_object_default \