forked from Ibadinov/gnustep-make
-
Notifications
You must be signed in to change notification settings - Fork 1
/
names.make
70 lines (56 loc) · 2.42 KB
/
names.make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# names.make
#
# Determine the host and target systems
#
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Author: Scott Christley <[email protected]>
# Date: October 1997
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Run config.guess to guess the host
ifeq ($(GNUSTEP_HOST),)
GNUSTEP_HOST_GUESS := $(shell (cd /tmp; $(CONFIG_GUESS_SCRIPT)))
GNUSTEP_HOST := $(shell (cd /tmp; $(CONFIG_SUB_SCRIPT) $(GNUSTEP_HOST_GUESS)))
GNUSTEP_HOST_CPU := $(shell (cd /tmp; $(CONFIG_CPU_SCRIPT) $(GNUSTEP_HOST)))
GNUSTEP_HOST_VENDOR := $(shell (cd /tmp; $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_HOST)))
GNUSTEP_HOST_OS := $(shell (cd /tmp; $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST)))
GNUSTEP_HOST_CPU := $(shell (cd /tmp; $(CLEAN_CPU_SCRIPT) $(GNUSTEP_HOST_CPU)))
GNUSTEP_HOST_VENDOR := $(shell (cd /tmp; $(CLEAN_VENDOR_SCRIPT) $(GNUSTEP_HOST_VENDOR)))
GNUSTEP_HOST_OS := $(shell (cd /tmp; $(CLEAN_OS_SCRIPT) $(GNUSTEP_HOST_OS)))
endif
#
# The user can specify a `target' variable when running make
#
ifeq ($(strip $(target)),)
# The host is the default target
GNUSTEP_TARGET := $(GNUSTEP_HOST)
GNUSTEP_TARGET_CPU := $(GNUSTEP_HOST_CPU)
GNUSTEP_TARGET_VENDOR := $(GNUSTEP_HOST_VENDOR)
GNUSTEP_TARGET_OS := $(GNUSTEP_HOST_OS)
else
#
# Parse the target variable
#
GNUSTEP_TARGET := $(shell (cd /tmp; $(CONFIG_SUB_SCRIPT) $(target)))
GNUSTEP_TARGET_CPU := $(shell (cd /tmp; $(CONFIG_CPU_SCRIPT) $(GNUSTEP_TARGET)))
GNUSTEP_TARGET_VENDOR := $(shell (cd /tmp; $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_TARGET)))
GNUSTEP_TARGET_OS := $(shell (cd /tmp; $(CONFIG_OS_SCRIPT) $(GNUSTEP_TARGET)))
GNUSTEP_TARGET_CPU := $(shell (cd /tmp; $(CLEAN_CPU_SCRIPT) $(GNUSTEP_TARGET_CPU)))
GNUSTEP_TARGET_VENDOR := $(shell (cd /tmp; $(CLEAN_VENDOR_SCRIPT) $(GNUSTEP_TARGET_VENDOR)))
GNUSTEP_TARGET_OS := $(shell (cd /tmp; $(CLEAN_OS_SCRIPT) $(GNUSTEP_TARGET_OS)))
endif
ifneq ($(arch),)
export CLEANED_ARCH = $(foreach a, $(arch), $(shell (cd /tmp; $(CLEAN_CPU_SCRIPT) $(a))))
endif