From: Michal Sojka Date: Sun, 18 Jan 2009 21:21:33 +0000 (+0100) Subject: Added support for .idl compilation X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/08da090a0f6bb4870bac2c51815e6008ffe98513 Added support for .idl compilation --- 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)))))