1 | #
|
---|
2 | # The contents of this file are subject to the Netscape Public
|
---|
3 | # License Version 1.1 (the "License"); you may not use this file
|
---|
4 | # except in compliance with the License. You may obtain a copy of
|
---|
5 | # the License at http://www.mozilla.org/NPL/
|
---|
6 | #
|
---|
7 | # Software distributed under the License is distributed on an "AS
|
---|
8 | # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
---|
9 | # implied. See the License for the specific language governing
|
---|
10 | # rights and limitations under the License.
|
---|
11 | #
|
---|
12 | # The Original Code is mozilla.org code.
|
---|
13 | #
|
---|
14 | # The Initial Developer of the Original Code is Netscape
|
---|
15 | # Communications Corporation. Portions created by Netscape are
|
---|
16 | # Copyright (C) 1998 Netscape Communications Corporation. All
|
---|
17 | # Rights Reserved.
|
---|
18 | #
|
---|
19 | # Contributor(s):
|
---|
20 | #
|
---|
21 |
|
---|
22 | DEPTH = ../../..
|
---|
23 | topsrcdir = @top_srcdir@
|
---|
24 | srcdir = @srcdir@
|
---|
25 | VPATH = @srcdir@
|
---|
26 |
|
---|
27 | include $(DEPTH)/config/autoconf.mk
|
---|
28 |
|
---|
29 | MODULE = xpcom
|
---|
30 | PROGRAM = xpidl$(BIN_SUFFIX)
|
---|
31 | INTERNAL_TOOLS = 1
|
---|
32 |
|
---|
33 | # glib and libIDL link against the non-debug msvcrt
|
---|
34 | MOZ_NO_DEBUG_RTL=1
|
---|
35 |
|
---|
36 | CSRCS = \
|
---|
37 | xpidl.c \
|
---|
38 | xpidl_idl.c \
|
---|
39 | xpidl_util.c \
|
---|
40 | xpidl_header.c \
|
---|
41 | xpidl_typelib.c \
|
---|
42 | xpidl_doc.c \
|
---|
43 | xpidl_java.c \
|
---|
44 | $(NULL)
|
---|
45 |
|
---|
46 | SDK_BINARY = \
|
---|
47 | $(PROGRAM) \
|
---|
48 | $(NULL)
|
---|
49 |
|
---|
50 | ifdef CROSS_COMPILE
|
---|
51 | HOST_PROGRAM = host_xpidl$(HOST_BIN_SUFFIX)
|
---|
52 | HOST_CSRCS = $(CSRCS)
|
---|
53 | endif
|
---|
54 |
|
---|
55 | include $(topsrcdir)/config/rules.mk
|
---|
56 |
|
---|
57 | CFLAGS += $(LIBIDL_CFLAGS)
|
---|
58 |
|
---|
59 | # Compile directly against the static lib, so we can use xpidl during the build
|
---|
60 | # without the shared library path being set.
|
---|
61 | ifeq (WINNT,$(OS_ARCH))
|
---|
62 | DEFINES += -DEXPORT_XPT_API
|
---|
63 | ifndef GNU_CC
|
---|
64 | LDFLAGS += -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRTD
|
---|
65 | endif
|
---|
66 | endif
|
---|
67 |
|
---|
68 | # Tell the $(PROGRAM) target that we need to be recompiled when libxpt changes.
|
---|
69 | LIBS = $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) $(LIBIDL_LIBS)
|
---|
70 | EXTRA_DEPS = $(wildcard $(DIST)/lib/$(LIB_PREFIX)xpt.*)
|
---|
71 |
|
---|
72 | ifdef CROSS_COMPILE
|
---|
73 | HOST_CFLAGS += $(HOST_LIBIDL_CFLAGS)
|
---|
74 | HOST_LIBS = $(DIST)/host/lib/libhostxpt.$(LIB_SUFFIX) $(HOST_LIBIDL_LIBS)
|
---|
75 | HOST_EXTRA_DEPS = $(wildcard $(DIST)/host/lib/libhostxpt.*)
|
---|
76 |
|
---|
77 | ifdef HOST_NSPR_MDCPUCFG
|
---|
78 | HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
|
---|
79 | endif
|
---|
80 | endif
|
---|
81 |
|
---|
82 | ifdef MACOS_SDK_DIR
|
---|
83 | NEXT_ROOT=
|
---|
84 | OS_LIBS := $(patsubst -L$(MACOS_SDK_DIR)/usr/lib%,,$(OS_LIBS))
|
---|
85 | endif
|
---|
86 |
|
---|
87 | export::
|
---|
88 | @$(MAKE) libs
|
---|