#
# The contents of this file are subject to the Netscape Public License
# Version 1.1 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#

DEPTH		= ../../..
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE		= widget
LIBRARY_NAME	= widget_mac
EXPORT_LIBRARY = 1
IS_COMPONENT	= 1
MODULE_NAME	= nsWidgetMacModule
XPIDL_MODULE	= widget_mac
REQUIRES	= xpcom \
		  gfx \
		  string \
		  uconv \
		  dom \
		  webshell \
		  docshell \
		  plugin \
		  content \
		  layout \
		  view \
		  xul \
		  necko \
          nkcache \
		  locale \
          pref \
          appshell \
          intl \
          mimetype \
		  unicharutil \
		  $(NULL)

GFX_LCPPSRCS = \
		nsRepeater.cpp \
		nsRegionMac.cpp \
		nsWatchTask.cpp \
		$(NULL)

CPPSRCS         = nsAppShell.cpp \
		nsBidiKeyboard.cpp \
		nsButton.cpp \
		nsChildWindow.cpp \
		nsClipboard.cpp \
		nsDeleteObserver.cpp \
		nsDragHelperService.cpp \
		nsDragService.cpp \
		nsFilePicker.cpp \
		nsLabel.cpp \
		nsLookAndFeel.cpp \
		nsMacControl.cpp \
		nsMacEventHandler.cpp \
		nsMacMessagePump.cpp \
		nsMacResources.cpp \
		nsMacTSMMessagePump.cpp \
		nsMacWindow.cpp \
		nsMenuX.cpp \
		nsMenuBarX.cpp \
		nsMenuItemX.cpp \
		nsMimeMapper.cpp \
		nsScrollbar.cpp \
		nsSound.cpp \
		nsTextWidget.cpp \
		nsTSMStrategy.cpp \
		nsToolkit.cpp \
		nsWidgetFactory.cpp \
		nsWidgetSupport.cpp \
		nsWindow.cpp \
		$(GFX_LCPPSRCS) \
		$(NULL)

XPIDLSRCS	+= \
		nsIChangeManager.idl \
		nsIMenuCommandDispatcher.idl \
		nsPIWidgetMac.idl \
		nsPIEventSinkStandalone.idl \
		nsIDragHelperService.idl \
		$(NULL)

GARBAGE		+= $(GFX_LCPPSRCS)

include $(topsrcdir)/config/rules.mk

export:: $(addprefix $(topsrcdir)/gfx/src/mac/,$(GFX_LCPPSRCS))
	$(INSTALL) $^ .

EXTRA_DSO_LDOPTS += \
		$(MOZ_UNICHARUTIL_LIBS) \
                $(DIST)/lib/libxpwidgets_s.a \
                $(TK_LIBS) \
                $(MOZ_COMPONENT_LIBS) \
                -lgkgfx \
                $(NULL)

LOCAL_INCLUDES	= \
	$(TK_CFLAGS) \
	-I$(topsrcdir)/gfx/src/mac \
	-I$(srcdir)/../xpwidgets \
	$(NULL)

# for "EnterMovies" in nsSound.cpp
LDFLAGS	+= -framework QuickTime

