2 # This is makefile rule for generating C sources from python templates
13 # We add these to CSOURCES which is handled in post.mk
15 CSOURCES
+=$(GENSOURCES
)
18 # Make the genrated headers actually build
20 ALL
+=$(GENHEADERS
) $(GENSOURCES
)
23 # Base common templates location
25 TEMPLATE_DIR
=$(TOPDIR
)/pylib
/templates
/
30 CLEAN
+=$(GENSOURCES
) $(GENHEADERS
)
33 # Some base dependencies
35 $(GENSOURCES
): $(TEMPLATE_DIR
)/base.c.t
$(TEMPLATE_DIR
)/common.c.t
36 $(GENHEADERS
): $(TEMPLATE_DIR
)/base.h.t
39 # Generated files depend on python generators and the template
41 $(GENSOURCES
) $(GENHEADERS
): %: %.t
43 ${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
-t
$(TEMPLATE_DIR
) "$@.t" "$@"
46 @
${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
-t
$(TEMPLATE_DIR
) "$@.t" "$@"