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 TEMPLATEDIR
=$(TOPDIR
)/gen
/include/
26 CCT
=$(TOPDIR
)/gen
/bin
/cct.py
31 CLEAN
+=$(GENSOURCES
) $(GENHEADERS
)
34 # Some base dependencies
36 $(GENSOURCES
): $(TEMPLATEDIR
)/source.t
$(TEMPLATEDIR
)/license.t
37 $(GENHEADERS
): $(TEMPLATEDIR
)/header.t
$(TEMPLATEDIR
)/license.t
40 # Generated files depend on python generators and the template
42 $(GENSOURCES
) $(GENHEADERS
): %: %.t
44 PYTHONPATH
=$(TEMPLATEDIR
) ${CCT} -I
$(TEMPLATEDIR
) "$@.t"
47 @PYTHONPATH
=$(TEMPLATEDIR
) ${CCT} -I
$(TEMPLATEDIR
) "$@.t"