Files
oldlinux-files/gnu/glibc/glibc-1.05.tar/glibc-1.05/Rules
2024-02-19 00:24:47 -05:00

115 lines
3.2 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Copyright (C) 1991, 1992 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
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
#
# Propagated rules for making the GNU C library
#
ifneq (,)
This makefile requires GNU Make.
endif
include ../Makeconfig
ifndef subdir
Each subdirectory makefile must define the `subdir' variable.
endif
# This is benign and useless in GNU make before 3.63.
export subdir := $(subdir)
# This is the default target; it makes the library.
.PHONY: all
all: lib
ifneq "$(findstring env,$(origin headers))" ""
headers :=
endif
ifeq "$(strip $(headers))" ""
ifneq "$(wildcard $(subdir).h)" ""
override headers := $(subdir).h
endif
endif
include ../Makerules
.PHONY: subdir_lib
subdir_lib: lib-noranlib
# This makes all the auxilliary and test programs.
.PHONY: others tests
others: $(addprefix $(objpfx),$(others))
tests: $(tests:%=$(objpfx)%.out)
ifneq "$(strip $(others) $(tests))" ""
$(addprefix $(objpfx),$(others) $(tests)): %: %.o $(libc.a)
$(+link)
endif
ifneq "$(strip $(tests))" ""
# These are the implicit rules for making test outputs
# from the test programs and whatever input files are present.
$(objpfx)%.out: $(objpfx)% %.args %.input
$(dir $<)$(notdir $<) `cat $(word 2,$^)` < $(word 3,$^) > $@
$(objpfx)%.out: $(objpfx)% %.args
$(dir $<)$(notdir $<) `cat $(word 2,$^)` > $@
$(objpfx)%.out: $(objpfx)% %.input
$(dir $<)$(notdir $<) < $(word 2,$^) > $@
$(objpfx)%.out: $(objpfx)%
$(dir $<)$(notdir $<) > $@
endif # tests
export others := $(others)
export tests := $(tests)
# This removes everything that can be regenerated
# except for the object files and the object-file library members.
.PHONY: mostlyclean
mostlyclean:
-rm -f $(addprefix $(objpfx),$(tests) $(others))
-rm -f core TAGS depend
# This removes absolutely everything that can be regenerated.
.PHONY: subdir_clean clean realclean
subdir_clean realclean: clean
+objs := $(objects)
clean: mostlyclean
-rm -f $(+objs) $(+depfiles)
.PHONY: subdir_echo-headers
subdir_echo-headers: echo-headers
.PHONY: subdir_echo-distinfo
subdir_echo-distinfo:
@echo $(addprefix +header+,$(headers)) \
$(addprefix +nodist+,$(dont_distribute))
.PHONY: subdir_install
subdir_install: install
.PHONY: subdir_TAGS
subdir_TAGS: TAGS
# Make the distribution tarfile for the parent makefile.
export distribute := $(distribute)
export dont_distribute := $(dont_distribute)
.PHONY: subdir_dist dist
subdir_dist: dist
dist: ../Make-dist
$(MAKE) -f $< $(Make-dist-args)