Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / config.mk
1 # -*- Mode: makefile -*-
2
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 #
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
10 #
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
15
16 # The Original Code is Mozilla Communicator client code, released
17 # March 31, 1998.
18
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1998-1999
22 # the Initial Developer. All Rights Reserved.
23
24 # Contributor(s):
25
26 # Alternatively, the contents of this file may be used under the terms of
27 # either of the GNU General Public License Version 2 or later (the "GPL"),
28 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
37
38 # ***** END LICENSE BLOCK *****
39
40 # This file was adapted from mozilla/js/src/config.mk
41
42 # Set os+release dependent make variables
43 OS_ARCH         := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
44
45 # Attempt to differentiate between SunOS 5.4 and x86 5.4
46 OS_CPUARCH      := $(shell uname -m)
47 ifeq ($(OS_CPUARCH),i86pc)
48 OS_RELEASE      := $(shell uname -r)_$(OS_CPUARCH)
49 else
50 ifeq ($(OS_ARCH),AIX)
51 OS_RELEASE      := $(shell uname -v).$(shell uname -r)
52 else
53 OS_RELEASE      := $(shell uname -r)
54 endif
55 endif
56 ifeq ($(OS_ARCH),IRIX64)
57 OS_ARCH         := IRIX
58 endif
59
60 # Handle output from win32 unames other than Netscape's version
61 ifeq (,$(filter-out Windows_95 Windows_98 CYGWIN_95-4.0 CYGWIN_98-4.10, $(OS_ARCH)))
62         OS_ARCH   := WIN95
63 endif
64 ifeq ($(OS_ARCH),WIN95)
65         OS_ARCH    := WINNT
66         OS_RELEASE := 4.0
67 endif
68 ifeq ($(OS_ARCH), Windows_NT)
69         OS_ARCH    := WINNT
70         OS_MINOR_RELEASE := $(shell uname -v)
71         ifeq ($(OS_MINOR_RELEASE),00)
72                 OS_MINOR_RELEASE = 0
73         endif
74         OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
75 endif
76 ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
77         OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
78         OS_ARCH    := WINNT
79 endif
80 ifeq ($(OS_ARCH), CYGWIN32_NT)
81         OS_ARCH    := WINNT
82 endif
83
84 # Virtually all Linux versions are identical.
85 # Any distinctions are handled in linux.h
86 ifeq ($(OS_ARCH),Linux)
87 OS_CONFIG      := Linux_All
88 else
89 ifeq ($(OS_ARCH),dgux)
90 OS_CONFIG      := dgux
91 else
92 ifeq ($(OS_ARCH),Darwin)
93 OS_CONFIG      := Darwin
94 else
95 OS_CONFIG       := $(OS_ARCH)$(OS_OBJTYPE)$(OS_RELEASE)
96 endif
97 endif
98 endif
99
100 ifeq "$(TEST_OPTDEBUG)" "opt"
101 OBJDIR_TAG = _OPT
102 else
103 OBJDIR_TAG = _DBG
104 endif
105
106
107 # Name of the binary code directories
108 ifdef BUILD_IDG
109 JS_OBJDIR          = $(OS_CONFIG)$(OBJDIR_TAG).OBJD
110 else
111 JS_OBJDIR          = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
112 endif
113