]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Added support for .idl compilation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 18 Jan 2009 21:21:33 +0000 (22:21 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 18 Jan 2009 21:21:33 +0000 (22:21 +0100)
snippets/Makefile.rules.test
snippets/cprog.omk

index f058504780c91590ae8b7ef499aef77fb9644456..0a14ffd3a2c7929d001d3aa896bd00b6064e6967 100644 (file)
@@ -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
 
index f130f76f76c4da17424665c7ce9a9265c39922a8..663015240a1d4ffa7b58d36131cca13455c88d64 100644 (file)
@@ -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)))))