+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) dquote$(OBJ_EXT) time64$(OBJ_EXT)
+
+# split the objects into 3 exclusive sets: those used by both miniperl and
+# perl, and those used by just one or the other. Doesn't include the
+# actual perl(mini)main.o, nor any dtrace objects.
+
+common_objs = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
+mini_only_objs = opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
+main_only_objs = op$(OBJ_EXT) perl$(OBJ_EXT)
+
+miniperl_objs_nodt = $(mini_only_objs) $(common_objs) miniperlmain$(OBJ_EXT)
+perllib_objs_nodt = $(main_only_objs) $(common_objs)
+
+!NO!SUBS!
+
+# dtrace with -G modifies the source object files, which can cause
+# dependency issues, and can cause the dtrace -G to fail on FreeBSD
+# so separate the objects generated by $(CC) from those used to link
+# the executable when dtrace -G is involved.
+#
+# $(FOO:op%os=np%ns) isn't generally portable but is portable to
+# the makes on darwin, Solaris, FreeBSD and Linux, which is where we
+# use dtrace
+
+case "$usedtrace:$dtraceobject" in
+define:define)
+ $spitshell >>$Makefile <<'!NO!SUBS!'