]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/mach/Makefile
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / mach / Makefile
index 4d4e4c01e2e35b1223ba66b6dcb208de0eb49a2f..5808f51abc0a761472ca479459e5286f7e20f354 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1993,94,96,97,2002 Free Software Foundation, Inc.
+# Copyright (C) 1993-2019 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
 # Lesser General Public License for more details.
 
 # You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
 
 ifdef in-Makerules
 
@@ -27,6 +26,9 @@ ifneq (mach,$(subdir))
 # So make sure we get a chance to run in mach/ to make them before all else.
 
 mach-objpfx = $(common-objpfx)mach/
+else
+mach-objpfx = $(objpfx)
+endif
 
 # These are all the generated files that <mach.h> includes.
 # Actually, it's only some of them.  We omit mach_interface.h
@@ -37,12 +39,41 @@ mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
                       $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
                                  port host)
 
+ifneq (mach,$(subdir))
 # This patsubst generates patterns like `m%h-shortcuts.h', which are damn
 # likely to match just the corresponding particular file we want.
-$(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist.
-       $(MAKE) -C $(..)mach generated no_deps=t
+$(patsubst mach%,m\%h%,$(mach-before-compile)): mach-before-compile # Run only if doesn't exist.
+.PHONY: mach-before-compile
+mach-before-compile:
+       $(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t generating=t
 
 before-compile += $(mach-before-compile)
 endif
 
+ifeq (crypt,$(subdir))
+  LDLIBS-crypt.so += $(objdir)/mach/libmachuser.so
+else ifeq (dlfcn,$(subdir))
+  LDLIBS-dl.so += $(objdir)/mach/libmachuser.so
+else ifeq (nis,$(subdir))
+  LDLIBS-nsl.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_nis.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_nisplus.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
+else ifeq (nss,$(subdir))
+  LDLIBS-nss.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_files.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_db.so += $(objdir)/mach/libmachuser.so
+  LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
+else ifeq (hesiod,$(subdir))
+  LDLIBS-nss_hesiod.so += $(objdir)/mach/libmachuser.so
+else ifeq (posix,$(subdir))
+  LDLIBS-tst-rfc3484 += $(objdir)/mach/libmachuser.so
+  LDLIBS-tst-rfc3484-2 += $(objdir)/mach/libmachuser.so
+  LDLIBS-tst-rfc3484-3 += $(objdir)/mach/libmachuser.so
+else ifeq (nscd,$(subdir))
+  LDLIBS-nscd += $(objdir)/mach/libmachuser.so
+endif
+
+LDLIBS-pthread.so += $(objdir)/mach/libmachuser.so
+
 endif  # in-Makerules