#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

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

include $(DEPTH)/config/autoconf.mk

MODULE = shellservice

FORCE_STATIC_LIB = 1
USE_STATIC_LIBS = 1

ifeq ($(OS_ARCH),WINNT)
CPPSRCS = nsWindowsShellService.cpp
else
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS = nsMacShellService.cpp
else
ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
CPPSRCS = nsGNOMEShellService.cpp
endif
endif
endif

ifdef CPPSRCS
LIBRARY_NAME = shellservice_s
endif

EXTRA_COMPONENTS = nsSetDefaultBrowser.js nsSetDefaultBrowser.manifest

include $(topsrcdir)/config/rules.mk

DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
  -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"

CXXFLAGS += $(TK_CFLAGS)

clobber::
	rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
