Add x86 32 bit vDSO time function support
[platform/upstream/glibc.git] / mach / Makefile
index 563c792..51ba076 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (C) 1991,92,93,94,95,96,97,98,2001,02
-#      Free Software Foundation, Inc.
+# Copyright (C) 1991-2015 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
 # 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
+# <http://www.gnu.org/licenses/>.
 
 subdir := mach
 
-all:
-
-# Some things below (but before including Rules) use configuration variables.
 include ../Makeconfig
 
-
 headers = mach_init.h mach.h mach_error.h mach-shortcuts.h mach/mach_traps.h \
          $(interface-headers) mach/mach.h mach/mig_support.h mach/error.h \
          $(lock-headers) machine-sp.h
-distribute = thread_state.h
 lock = spin-solid spin-lock mutex-init mutex-solid
 lock-headers = lock-intern.h machine-lock.h spin-lock.h
 routines = $(mach-syscalls) $(mach-shortcuts) \
@@ -53,17 +46,11 @@ mach/memory_object_user.defs = mach/memory_object.defs
 
 user-interfaces := $(addprefix mach/,$(mach-interface-list)    \
                                     mach_port mach_host exc    \
-                   )\
+                   )\
                   $(addprefix device/,device device_request)
 
 server-interfaces := mach/exc
 
-# It is important that we do not use the wildcard function to expand
-# `err_*.sub'.  Leaving the wildcard allows Make-dist to find all matching
-# files in all sysdep directories.
-distribute += Machrules syscalls.awk shortcut.awk \
-             errorlib.h err_*.sub errsystems.awk
-
 # Clear any environment        value.
 generated =
 \f
@@ -79,12 +66,17 @@ $(objpfx)mach-syscalls.mk: syscalls.awk Makefile
        $(make-target-directory)
 # We must use $(CFLAGS) to get -O flags that affect #if's in header files.
        echo '#include <mach/syscall_sw.h>' | \
-       DEPENDENCIES_OUTPUT='$@-dep $@' \
-       $(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - \
+       $(CC) $(CFLAGS) $(CPPFLAGS) -E -MD -MP -MF $@-dep -MT $@ \
+             -x c-header - \
              -D_MACH_`echo $(mach-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
        sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
        | $(AWK) -f $< > $@-new
-       cat $@-dep >> $@-new; rm -f $@-dep
+ifneq (,$(objpfx))
+       sed $(sed-remove-objpfx) $@-dep >> $@-new
+else
+       cat $@-dep >> $@-new
+endif
+       rm -f $@-dep
        mv -f $@-new $@
 generated += mach-syscalls.mk