michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: IA2DIR = $(topsrcdir)/other-licenses/ia2 michael@0: michael@0: GARBAGE += $(MIDL_GENERATED_FILES) michael@0: michael@0: # Please keep this list in sync with the moz.build file until the rest of this michael@0: # Makefile is ported over. michael@0: MIDL_INTERFACES = \ michael@0: Accessible2.idl \ michael@0: Accessible2_2.idl \ michael@0: AccessibleAction.idl \ michael@0: AccessibleApplication.idl \ michael@0: AccessibleComponent.idl \ michael@0: AccessibleDocument.idl \ michael@0: AccessibleEditableText.idl \ michael@0: AccessibleHyperlink.idl \ michael@0: AccessibleHypertext.idl \ michael@0: AccessibleHypertext2.idl \ michael@0: AccessibleImage.idl \ michael@0: AccessibleRelation.idl \ michael@0: AccessibleTable.idl \ michael@0: AccessibleTable2.idl \ michael@0: AccessibleTableCell.idl \ michael@0: AccessibleText.idl \ michael@0: AccessibleText2.idl \ michael@0: AccessibleValue.idl \ michael@0: $(NULL) michael@0: michael@0: # Please keep this list in sync with the moz.build file until the rest of this michael@0: # Makefile is ported over. michael@0: MIDL_ENUMS = \ michael@0: AccessibleEventId.idl \ michael@0: AccessibleRole.idl \ michael@0: AccessibleStates.idl \ michael@0: IA2CommonTypes.idl \ michael@0: $(NULL) michael@0: michael@0: CSRCS = \ michael@0: dlldata.c \ michael@0: $(MIDL_INTERFACES:%.idl=%_p.c) \ michael@0: $(MIDL_INTERFACES:%.idl=%_i.c) \ michael@0: $(NULL) michael@0: michael@0: MIDL_GENERATED_FILES = \ michael@0: dlldata.c \ michael@0: $(MIDL_INTERFACES:%.idl=%_p.c) \ michael@0: $(MIDL_INTERFACES:%.idl=%_i.c) \ michael@0: $(MIDL_INTERFACES:%.idl=%.h) \ michael@0: $(MIDL_ENUMS:%.idl=%.h) \ michael@0: $(NULL) michael@0: michael@0: EMBED_MANIFEST_AT = 2 michael@0: michael@0: INSTALL_TARGETS += midl michael@0: midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES)) michael@0: midl_DEST = $(DIST)/include michael@0: midl_TARGET := export michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: OS_LIBS = $(call EXPAND_LIBNAME,uuid kernel32 rpcns4 rpcrt4 ole32 oleaut32) michael@0: michael@0: # generate list of to-be-generated files that are missing michael@0: # but ignore special file dlldata.c michael@0: missing:=$(strip $(foreach onefile,$(strip $(subst dlldata.c,,$(MIDL_GENERATED_FILES))),$(if $(wildcard $(onefile)),,$(onefile)))) michael@0: michael@0: missing_base:=$(sort $(basename $(subst _p.c,,$(subst _i.c,,$(missing))))) michael@0: michael@0: $(MIDL_GENERATED_FILES) : midl_done michael@0: michael@0: ifneq ("$(missing)","") michael@0: midl_done : FORCE michael@0: endif michael@0: michael@0: midl_done : $(addprefix $(IA2DIR)/,$(MIDL_INTERFACES) $(MIDL_ENUMS)) michael@0: for idl in $(sort $(subst FORCE,,$?) $(addsuffix .idl,$(addprefix $(IA2DIR)/,$(missing_base)))); do \ michael@0: $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -Oicf $$idl; \ michael@0: done michael@0: touch $@ michael@0: michael@0: # This marshall dll is also registered in the installer michael@0: register:: michael@0: regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)