2 # This is makefile rule for generating C sources from python generators
5 $(error LIBNAME not defined
, fix your library Makefile
)
17 # Generate genfiles for generated sources
19 CSOURCES
+=$(GENSOURCES
)
22 # Make the genrated headers actually build
24 all: $(GENHEADERS
) $(GENSOURCES
)
27 # Base common templates location
29 TEMPLATE_DIR
=$(TOPDIR
)/pylib
/templates
/
34 CLEAN
+=$(GENSOURCES
) $(GENHEADERS
)
37 # Some base dependencies
39 $(GENSOURCES
): $(TEMPLATE_DIR
)/base.c.t
$(TEMPLATE_DIR
)/common.c.t
40 $(GENHEADERS
): $(TEMPLATE_DIR
)/base.h.t
43 # Generated files depend on python generators and the template
45 $(GENSOURCES
) $(GENHEADERS
): %: %.t
47 ${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
-t
$(TEMPLATE_DIR
) "$@.t" "$@"
50 @
${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
-t
$(TEMPLATE_DIR
) "$@.t" "$@"