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 = xpcomsample |
---|
30 | XPIDL_MODULE = xpcomsample |
---|
31 | LIBRARY_NAME = xpcomsample |
---|
32 | SHORT_LIBNAME = xpcomsmp |
---|
33 | |
---|
34 | IS_COMPONENT = 1 |
---|
35 | MODULE_NAME = nsSampleModule |
---|
36 | |
---|
37 | # Ensure that the xpcom classes that we build |
---|
38 | # do not export themselves |
---|
39 | DEFINES += -DXPCOM_GLUE |
---|
40 | |
---|
41 | |
---|
42 | REQUIRES = string \ |
---|
43 | xpcom \ |
---|
44 | $(NULL) |
---|
45 | |
---|
46 | CPPSRCS = \ |
---|
47 | nsSample.cpp \ |
---|
48 | nsSampleModule.cpp \ |
---|
49 | $(NULL) |
---|
50 | |
---|
51 | XPIDLSRCS = nsISample.idl |
---|
52 | |
---|
53 | TESTCPPSRCS = nsTestSample.cpp |
---|
54 | |
---|
55 | CPPSRCS += $(TESTCPPSRCS) |
---|
56 | |
---|
57 | SIMPLE_PROGRAMS = $(TESTCPPSRCS:.cpp=$(BIN_SUFFIX)) |
---|
58 | |
---|
59 | include $(topsrcdir)/config/config.mk |
---|
60 | |
---|
61 | EXTRA_COMPONENTS = nsSample.js |
---|
62 | |
---|
63 | # separate libraries linked in. |
---|
64 | EXTRA_DSO_LDOPTS = \ |
---|
65 | $(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \ |
---|
66 | $(NSPR_LIBS) \ |
---|
67 | $(NULL) |
---|
68 | |
---|
69 | LIBS = \ |
---|
70 | $(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \ |
---|
71 | $(NSPR_LIBS) \ |
---|
72 | $(NULL) |
---|
73 | |
---|
74 | # Needed to resolve __yylex (?) |
---|
75 | ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2) |
---|
76 | LIBS += -lpcap |
---|
77 | endif |
---|
78 | |
---|
79 | # Need to link with CoreFoundation on Mac |
---|
80 | ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) |
---|
81 | EXTRA_DSO_LDOPTS += \ |
---|
82 | $(TK_LIBS) \ |
---|
83 | $(NULL) |
---|
84 | |
---|
85 | LIBS += \ |
---|
86 | $(TK_LIBS) \ |
---|
87 | $(NULL) |
---|
88 | endif |
---|
89 | |
---|
90 | include $(topsrcdir)/config/rules.mk |
---|
91 | |
---|
92 | libs:: $(TARGETS) |
---|
93 | $(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples |
---|
94 | |
---|
95 | install:: $(TARGETS) |
---|
96 | $(SYSINSTALL) $(IFLAGS1) $(srcdir)/xpconnect-sample.html $(DESTDIR)$(mozappdir)/res/samples |
---|
97 | |
---|