nsprpub/config/Makefile.in

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:710f3db1d498
1 #! gmake
2 #
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 MOD_DEPTH = ..
8 topsrcdir = @top_srcdir@
9 srcdir = @srcdir@
10 VPATH = @srcdir@
11
12 include $(MOD_DEPTH)/config/autoconf.mk
13
14 # Indicate that this directory builds build tools.
15 INTERNAL_TOOLS = 1
16
17 # For sanity's sake, we compile nsinstall without the wrapped system
18 # headers, so that we can use it to set up the wrapped system headers.
19 VISIBILITY_FLAGS =
20
21 # autoconf.mk must be deleted last (from the top-level directory)
22 # because it is included by every makefile.
23 DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config nspr.pc
24
25 RELEASE_BINS = nspr-config
26
27 include $(topsrcdir)/config/config.mk
28
29 CSRCS = now.c
30
31 # This version hasn't been ported for us; the one in mozilla/config has
32 ifneq ($(OS_ARCH),OS2)
33 CSRCS += nsinstall.c
34
35 PLSRCS = nfspwd.pl
36 endif
37
38 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
39 PROG_SUFFIX = .exe
40 else
41 PROG_SUFFIX =
42 endif
43
44 # Temporary workaround to disable the generation of
45 # library build time because now.c uses the 'long long'
46 # data type that's not available on some platforms.
47 ifeq (,$(filter-out QNX SCOOS UNIXWARE,$(OS_ARCH)))
48 DEFINES += -DOMIT_LIB_BUILD_TIME
49 endif
50
51 ifeq ($(OS_ARCH), IRIX)
52 ifeq ($(basename $(OS_RELEASE)),6)
53 ifndef NS_USE_GCC
54 ifeq ($(USE_N32),1)
55 XLDOPTS += -n32 -Wl,-woff,85
56 else
57 ifeq ($(USE_64),1)
58 XLDOPTS += -64
59 else
60 XLDOPTS += -32
61 endif
62 endif
63 endif
64 endif
65 endif
66
67 ifeq ($(OS_ARCH), HP-UX)
68 ifeq ($(USE_64),1)
69 XLDOPTS += +DD64
70 endif
71 endif
72
73 ifeq ($(OS_ARCH), OS2)
74 XCFLAGS = $(OS_CFLAGS)
75 endif
76
77 include $(topsrcdir)/config/rules.mk
78
79 PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
80
81 ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
82 TARGETS = $(PROGS)
83 else
84 ifeq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH)))
85 TARGETS = $(PROGS)
86 else
87 PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
88 TARGETS = $(PROGS) $(PLSRCS:.pl=)
89 endif
90 endif
91
92 OUTOPTION = -o # end of the line
93 ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET)))
94 ifndef NS_USE_GCC
95 OUTOPTION = -Fe
96 endif
97 endif
98
99 # Redefine MAKE_OBJDIR for just this directory
100 define MAKE_OBJDIR
101 if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
102 endef
103
104 export:: $(TARGETS)
105 rm -f $(dist_bindir)/nspr-config
106
107 ifdef WRAP_SYSTEM_INCLUDES
108 export::
109 if test ! -d system_wrappers; then mkdir system_wrappers; fi
110 $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers < $(srcdir)/system-headers
111 $(INSTALL) system_wrappers $(dist_includedir)
112 endif
113
114 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
115 @$(MAKE_OBJDIR)
116 $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
117
118 install:: nspr.m4
119 $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
120 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
121
122 install:: nspr.pc
123 $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
124 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig

mercurial