#
# 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/.

MIDL_GENERATED_FILES = msgMapi.h msgMapi_p.c msgMapi_i.c dlldata.c

INSTALL_TARGETS += msgmapi
msgmapi_FILES := msgMapi.h
msgmapi_DEST = $(DIST)/include
msgmapi_TARGET := export

SRCDIR_CSRCS	= $(addprefix $(srcdir)/,$(CSRCS))

GARBAGE	+= $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS)

EMBED_MANIFEST_AT = 2

CSRCS += \
  dlldata.c \
  msgMapi_i.c \
  msgMapi_p.c \
  $(NULL)

include $(topsrcdir)/config/rules.mk

$(MIDL_GENERATED_FILES): done_gen

done_gen: msgMapi.idl
	$(RM) $(SRCDIR_CSRCS)
	$(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl
	touch $@

export:: done_gen