]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/config_h
There has to be copy of all config headers for kernel build too.
[omk.git] / snippets / config_h
index 6f23528985776dd780bd4387ecd8b4457ecd758b..03b65bf216d1f6c420daf70daf72997d023644ab 100644 (file)
@@ -54,10 +54,27 @@ config_h_stamp_files = $(addprefix $(USER_OBJS_DIR)/,$(notdir $(addsuffix .stamp
 # Add some hooks to standard passes
 include-pass-local: $(config_h_stamp_files)
 
+ifneq ($(KERN_CONFIG_HEADERS_REQUIRED),)
+
+ifdef LOCAL_CONFIG_H
+$(eval $(call BUILD_CONFIG_H_template,$(KERN_OBJS_DIR),$(KERN_OBJS_DIR)/$(LOCAL_CONFIG_H),default_CONFIG,_LOCAL_CONFIG_H) )
+endif
+
+$(foreach confh,$(config_include_HEADERS),$(eval $(call BUILD_CONFIG_H_template,$(KERN_OBJS_DIR),$(addprefix $(KERN_INCLUDE_DIR)/,$(confh)),$(basename $(notdir $(confh)))_DEFINES,\
+_$(basename $(notdir $(confh)))_H \
+)))
+
+kern_config_h_stamp_files = $(addprefix $(KERN_OBJS_DIR)/,$(notdir $(addsuffix .stamp,$(config_include_HEADERS) $(LOCAL_CONFIG_H))))
+
+# Add some hooks to standard passes
+include-pass-local: $(kern_config_h_stamp_files)
+
+endif
+
 clean-local: clean-local-config-h
 
 clean-local-config-h:
-       @$(foreach confh,$(config_h_stamp_files),\
+       @$(foreach confh,$(config_h_stamp_files) $(kern_config_h_stamp_files),\
            if [ -e $(confh) ] ; then rm $(confh) ; fi ; \
        )