|
1 # |
|
2 # This Source Code Form is subject to the terms of the Mozilla Public |
|
3 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 |
|
6 XP_DEFINE += -DXP_UNIX |
|
7 LIB_SUFFIX = a |
|
8 DLL_SUFFIX = so |
|
9 AR = ar cr $@ |
|
10 LDOPTS += -L$(SOURCE_LIB_DIR) |
|
11 |
|
12 ifdef BUILD_OPT |
|
13 OPTIMIZER += -O |
|
14 DEFINES += -UDEBUG -DNDEBUG |
|
15 else |
|
16 OPTIMIZER += -g |
|
17 USERNAME := $(shell whoami) |
|
18 USERNAME := $(subst -,_,$(USERNAME)) |
|
19 DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME) |
|
20 endif |
|
21 |
|
22 ifdef BUILD_TREE |
|
23 NSINSTALL_DIR = $(BUILD_TREE)/nss |
|
24 NSINSTALL = $(BUILD_TREE)/nss/nsinstall |
|
25 else |
|
26 NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall |
|
27 NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall |
|
28 endif |
|
29 |
|
30 MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend |
|
31 MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend |
|
32 MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk |
|
33 |
|
34 #################################################################### |
|
35 # |
|
36 # One can define the makefile variable NSDISTMODE to control |
|
37 # how files are published to the 'dist' directory. If not |
|
38 # defined, the default is "install using relative symbolic |
|
39 # links". The two possible values are "copy", which copies files |
|
40 # but preserves source mtime, and "absolute_symlink", which |
|
41 # installs using absolute symbolic links. |
|
42 # - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97 |
|
43 # - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY |
|
44 #################################################################### |
|
45 |
|
46 ifeq ($(NSDISTMODE),copy) |
|
47 # copy files, but preserve source mtime |
|
48 INSTALL = $(NSINSTALL) |
|
49 INSTALL += -t |
|
50 else |
|
51 ifeq ($(NSDISTMODE),absolute_symlink) |
|
52 # install using absolute symbolic links |
|
53 INSTALL = $(NSINSTALL) |
|
54 INSTALL += -L `pwd` |
|
55 else |
|
56 # install using relative symbolic links |
|
57 INSTALL = $(NSINSTALL) |
|
58 INSTALL += -R |
|
59 endif |
|
60 endif |
|
61 |
|
62 define MAKE_OBJDIR |
|
63 if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi |
|
64 endef |