~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/js/src/config.mk

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
ifdef JS_DIST
 
41
DIST = $(JS_DIST)
 
42
else
 
43
DIST = $(DEPTH)/../../dist/$(OBJDIR)
 
44
endif
 
45
 
 
46
# Set os+release dependent make variables
 
47
OS_ARCH         := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
 
48
 
 
49
# Attempt to differentiate between SunOS 5.4 and x86 5.4
 
50
OS_CPUARCH      := $(shell uname -m)
 
51
ifeq ($(OS_CPUARCH),i86pc)
 
52
OS_RELEASE      := $(shell uname -r)_$(OS_CPUARCH)
 
53
else
 
54
ifeq ($(OS_ARCH),AIX)
 
55
OS_RELEASE      := $(shell uname -v).$(shell uname -r)
 
56
else
 
57
OS_RELEASE      := $(shell uname -r)
 
58
endif
 
59
endif
 
60
ifeq ($(OS_ARCH),IRIX64)
 
61
OS_ARCH         := IRIX
 
62
endif
 
63
 
 
64
# Handle output from win32 unames other than Netscape's version
 
65
ifeq (,$(filter-out Windows_95 Windows_98 CYGWIN_95-4.0 CYGWIN_98-4.10, $(OS_ARCH)))
 
66
        OS_ARCH   := WIN95
 
67
endif
 
68
ifeq ($(OS_ARCH),WIN95)
 
69
        OS_ARCH    := WINNT
 
70
        OS_RELEASE := 4.0
 
71
endif
 
72
ifeq ($(OS_ARCH), Windows_NT)
 
73
        OS_ARCH    := WINNT
 
74
        OS_MINOR_RELEASE := $(shell uname -v)
 
75
        ifeq ($(OS_MINOR_RELEASE),00)
 
76
                OS_MINOR_RELEASE = 0
 
77
        endif
 
78
        OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
 
79
endif
 
80
ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
 
81
        OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
 
82
        OS_ARCH    := WINNT
 
83
endif
 
84
ifeq ($(OS_ARCH), CYGWIN32_NT)
 
85
        OS_ARCH    := WINNT
 
86
endif
 
87
 
 
88
# Virtually all Linux versions are identical.
 
89
# Any distinctions are handled in linux.h
 
90
ifeq ($(OS_ARCH),Linux)
 
91
OS_CONFIG      := Linux_All
 
92
else
 
93
ifeq ($(OS_ARCH),dgux)
 
94
OS_CONFIG      := dgux
 
95
else
 
96
ifeq ($(OS_ARCH),Darwin)
 
97
OS_CONFIG      := Darwin
 
98
else
 
99
OS_CONFIG       := $(OS_ARCH)$(OS_OBJTYPE)$(OS_RELEASE)
 
100
endif
 
101
endif
 
102
endif
 
103
 
 
104
ASFLAGS         =
 
105
DEFINES         =
 
106
 
 
107
ifeq ($(OS_ARCH), WINNT)
 
108
INSTALL = nsinstall
 
109
CP = cp
 
110
else
 
111
INSTALL = $(DEPTH)/../../dist/$(OBJDIR)/bin/nsinstall
 
112
CP = cp
 
113
endif
 
114
 
 
115
ifdef BUILD_OPT
 
116
OPTIMIZER  = -O
 
117
DEFINES    += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)
 
118
OBJDIR_TAG = _OPT
 
119
else
 
120
ifdef USE_MSVC
 
121
OPTIMIZER  = -Zi
 
122
else
 
123
OPTIMIZER  = -g
 
124
endif
 
125
DEFINES    += -DDEBUG -DDEBUG_$(shell whoami)
 
126
OBJDIR_TAG = _DBG
 
127
endif
 
128
 
 
129
SO_SUFFIX = so
 
130
 
 
131
NS_USE_NATIVE = 1
 
132
 
 
133
# Java stuff
 
134
CLASSDIR     = $(DEPTH)/liveconnect/classes
 
135
JAVA_CLASSES = $(patsubst %.java,%.class,$(JAVA_SRCS))
 
136
TARGETS     += $(addprefix $(CLASSDIR)/$(OBJDIR)/$(JARPATH)/, $(JAVA_CLASSES))
 
137
JAVAC        = $(JDK)/bin/javac
 
138
JAVAC_FLAGS  = -classpath "$(CLASSPATH)" -d $(CLASSDIR)/$(OBJDIR)
 
139
ifeq ($(OS_ARCH), WINNT)
 
140
  SEP        = ;
 
141
else
 
142
  SEP        = :
 
143
endif
 
144
CLASSPATH    = $(JDK)/lib/classes.zip$(SEP)$(CLASSDIR)/$(OBJDIR)
 
145
 
 
146
include $(DEPTH)/config/$(OS_CONFIG).mk
 
147
 
 
148
# Name of the binary code directories
 
149
ifdef BUILD_IDG
 
150
OBJDIR          = $(OS_CONFIG)$(OBJDIR_TAG).OBJD
 
151
else
 
152
OBJDIR          = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
 
153
endif
 
154
VPATH           = $(OBJDIR)
 
155
 
 
156
# Automatic make dependencies file
 
157
DEPENDENCIES    = $(OBJDIR)/.md
 
158
 
 
159
LCJAR = js15lc30.jar
 
160
 
 
161
# Library name
 
162
LIBDIR := lib
 
163
ifeq ($(CPU_ARCH), x86_64)
 
164
LIBDIR := lib64
 
165
endif
 
166