Blame sysdeps/mach/Makefile

Packit Service 82fcde
# Copyright (C) 1993-2018 Free Software Foundation, Inc.
Packit Service 82fcde
# This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
# The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
# modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
# License as published by the Free Software Foundation; either
Packit Service 82fcde
# version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
# The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
# Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
# You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
# License along with the GNU C Library; if not, see
Packit Service 82fcde
# <http://www.gnu.org/licenses/>.
Packit Service 82fcde
Packit Service 82fcde
ifdef in-Makerules
Packit Service 82fcde
Packit Service 82fcde
# Look for header files in mach/ under the top-level library source directory.
Packit Service 82fcde
# Look for generated header files where they get created.
Packit Service 82fcde
includes += -I$(..)mach -I$(common-objpfx)mach/
Packit Service 82fcde
Packit Service 82fcde
ifneq (mach,$(subdir))
Packit Service 82fcde
# Subdirectories other than mach/ might use the generated Mach headers.
Packit Service 82fcde
# So make sure we get a chance to run in mach/ to make them before all else.
Packit Service 82fcde
Packit Service 82fcde
mach-objpfx = $(common-objpfx)mach/
Packit Service 82fcde
else
Packit Service 82fcde
mach-objpfx = $(objpfx)
Packit Service 82fcde
endif
Packit Service 82fcde
Packit Service 82fcde
# These are all the generated files that <mach.h> includes.
Packit Service 82fcde
# Actually, it's only some of them.  We omit mach_interface.h
Packit Service 82fcde
# because it's different in Darwin and the conditional crap is
Packit Service 82fcde
# too much trouble.  This should suffice for getting the mach/Makefile
Packit Service 82fcde
# rules invoked when they need to be.
Packit Service 82fcde
mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
Packit Service 82fcde
		       $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
Packit Service 82fcde
				  port host)
Packit Service 82fcde
Packit Service 82fcde
ifneq (mach,$(subdir))
Packit Service 82fcde
# This patsubst generates patterns like `m%h-shortcuts.h', which are damn
Packit Service 82fcde
# likely to match just the corresponding particular file we want.
Packit Service 82fcde
$(patsubst mach%,m\%h%,$(mach-before-compile)): mach-before-compile # Run only if doesn't exist.
Packit Service 82fcde
.PHONY: mach-before-compile
Packit Service 82fcde
mach-before-compile:
Packit Service 82fcde
	$(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t generating=t
Packit Service 82fcde
Packit Service 82fcde
before-compile += $(mach-before-compile)
Packit Service 82fcde
endif
Packit Service 82fcde
Packit Service 82fcde
ifeq (crypt,$(subdir))
Packit Service 82fcde
  LDLIBS-crypt.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (dlfcn,$(subdir))
Packit Service 82fcde
  LDLIBS-dl.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (nis,$(subdir))
Packit Service 82fcde
  LDLIBS-nsl.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_nis.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_nisplus.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (nss,$(subdir))
Packit Service 82fcde
  LDLIBS-nss.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_files.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_db.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-nss_compat.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (hesiod,$(subdir))
Packit Service 82fcde
  LDLIBS-nss_hesiod.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (posix,$(subdir))
Packit Service 82fcde
  LDLIBS-tst-rfc3484 += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-tst-rfc3484-2 += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
  LDLIBS-tst-rfc3484-3 += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
else ifeq (nscd,$(subdir))
Packit Service 82fcde
  LDLIBS-nscd += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
endif
Packit Service 82fcde
Packit Service 82fcde
LDLIBS-pthread.so += $(objdir)/mach/libmachuser.so
Packit Service 82fcde
Packit Service 82fcde
endif	# in-Makerules