Bug 1731343 [wpt PR 30843] - Add README.md to wpt/webtransport, a=testonly
[gecko.git] / nsprpub / config / Makefile.in
blob7c6c815de68de06b6889e9e1ec8f02c3c5063ae9
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/.
7 MOD_DEPTH = ..
8 topsrcdir = @top_srcdir@
9 srcdir = @srcdir@
10 VPATH = @srcdir@
12 include $(MOD_DEPTH)/config/autoconf.mk
14 # Indicate that this directory builds build tools.
15 INTERNAL_TOOLS = 1
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 =
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
25 RELEASE_BINS = nspr-config
27 include $(topsrcdir)/config/config.mk
29 CSRCS = now.c
31 # This version hasn't been ported for us; the one in mozilla/config has
32 ifneq ($(OS_ARCH),OS2)
33 CSRCS += nsinstall.c
35 PLSRCS = nfspwd.pl
36 endif
38 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
39 PROG_SUFFIX = .exe
40 else
41 PROG_SUFFIX =
42 endif
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
51 ifeq ($(OS_ARCH), HP-UX)
52 ifeq ($(USE_64),1)
53 XLDOPTS += +DD64
54 endif
55 endif
57 ifeq ($(OS_ARCH), OS2)
58 XCFLAGS = $(OS_CFLAGS)
59 endif
61 include $(topsrcdir)/config/rules.mk
63 PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
65 ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
66 TARGETS = $(PROGS)
67 else
68 ifeq (,$(filter-out WINCE,$(OS_ARCH)))
69 TARGETS = $(PROGS)
70 else
71 PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
72 TARGETS = $(PROGS) $(PLSRCS:.pl=)
73 endif
74 endif
76 OUTOPTION = -o # end of the line
77 ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET)))
78 ifndef NS_USE_GCC
79 OUTOPTION = -Fe
80 endif
81 endif
83 # Redefine MAKE_OBJDIR for just this directory
84 define MAKE_OBJDIR
85 if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
86 endef
88 export:: $(TARGETS)
89 rm -f $(dist_bindir)/nspr-config
91 ifdef WRAP_SYSTEM_INCLUDES
92 export::
93 if test ! -d system_wrappers; then mkdir system_wrappers; fi
94 $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers < $(srcdir)/system-headers
95 $(INSTALL) system_wrappers $(dist_includedir)
96 endif
98 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
99 @$(MAKE_OBJDIR)
100 $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
102 install:: nspr.m4
103 $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
104 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
106 install:: nspr.pc
107 $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
108 $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig