# todo - add standard Mozilla license.

# The Python DOM ScriptLanguage implementation.

DEPTH=../../../..

topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

LIBRARY_NAME	= pydom
IS_COMPONENT	= 1
REQUIRES	= pyxpcom xpcom string xpcom_obsolete dom \
		  widget js gfx gklayout content layout necko xpconnect $(NULL)

FORCE_SHARED_LIB = 1 
FORCE_USE_PIC = 1


# We always need the Python and pyxpcom includes and libs.
LOCAL_INCLUDES = $(MOZ_PYTHON_INCLUDES)
EXTRA_LIBS += $(MOZ_PYTHON_LIBS) \
              $(call EXPAND_LIBNAME_PATH,pyxpcom,$(DIST)/lib) \
              $(NULL)

# In the shorter term we need JS too.
EXTRA_LIBS += $(MOZ_JS_LIBS)

CPPSRCS		=                   \
		nsPyArgArray.cpp    \
		nsPyContext.cpp     \
		nsPyRuntime.cpp     \
		nsPyDOMModule.cpp   \
                nsPyDOMISupports.cpp \
                nsPyTimeout.cpp \
		$(NULL)

include $(topsrcdir)/config/config.mk

CXXFLAGS += -DPYTHON_SO=\"libpython$(MOZ_PYTHON_VER_DOTTED).so\"

EXTRA_DSO_LDOPTS += $(XPCOM_GLUE_LDOPTS) \
                    $(MOZ_COMPONENT_LIBS) \
                    $(NULL)

include $(topsrcdir)/config/rules.mk

clobber::
	rm -f *.ilk
