From 08da090a0f6bb4870bac2c51815e6008ffe98513 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 18 Jan 2009 22:21:33 +0100 Subject: [PATCH] Added support for .idl compilation --- snippets/Makefile.rules.test | 3 ++- snippets/cprog.omk | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/snippets/Makefile.rules.test b/snippets/Makefile.rules.test index f058504..0a14ffd 100644 --- a/snippets/Makefile.rules.test +++ b/snippets/Makefile.rules.test @@ -108,8 +108,9 @@ S_o_cmd = \ IDL_CLIENT_SOURCES ?= $(1:%.idl=%-stubs.c) $(1:%.idl=%-common.c) IDL_SERVER_SOURCES ?= $(1:%.idl=%-skels.c) $(1:%.idl=%-common.c) IDL_TARGETS ?= $(1:%.idl=%-stubs.c) $(1:%.idl=%-skels.c) $(1:%.idl=%-common.c) $(1:%.idl=%.h) +IDL_FLAGS ?= --output-dir=$(USER_OBJS_DIR) -idl_src_cmd = $(IDL_COMPILER) $(IDL_FLAGS) $($(1)_IDLFLAGS) $(1) +idl_src_cmd = $(IDL_COMPILER) $(IDL_FLAGS) $($(1)_IDLFLAGS) $$< # TODO: Implement CMETRIC diff --git a/snippets/cprog.omk b/snippets/cprog.omk index f130f76..6630152 100644 --- a/snippets/cprog.omk +++ b/snippets/cprog.omk @@ -89,3 +89,10 @@ $(foreach src,$(filter %.c,$(USER_SOURCES)),\ include include.omk #omkbuild $(eval $(call include-pass-template,$(USER_INCLUDE_DIR),include)) + +$(foreach idl,$(USER_IDLS),\ + $(eval $(call prepare_rule_goal,\ + $(addprefix $(USER_OBJS_DIR)/,$(call IDL_TARGETS,$(idl))),\ + $(SOURCES_DIR)/$(idl),\ + "IDL ",\ + $(call idl_src_cmd,$(idl))))) -- 2.39.2