2 # This is makefile rule for generating C sources from python generators
5 $(error LIBNAME not defined
, fix your library Makefile
)
17 # Headers goes into include/core/
19 INCLUDE_PREFIX
=$(TOPDIR
)/include/$(LIBNAME
)/
20 RGENHEADERS
=$(addprefix $(INCLUDE_PREFIX
),$(GENHEADERS
))
23 # Generate genfiles for generated sources
25 CSOURCES
+=$(GENSOURCES
)
28 # Make the genrated headers actually build
32 $(CSOURCES
): $(RGENHEADERS
)
37 CLEAN
+=$(GENSOURCES
) $(RGENHEADERS
)
40 # Currently, just depend on all python files
42 GENERATORS
=$(PYTHON_FILES
)
45 # Generated files depend on python generators and libs
47 %.gen.c
%.gen.h
: $(GENERATORS
)
49 ${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
"$@"
52 @
${PYTHON} ${TOPDIR}/pylib
/bin
/generate_file.py
"$@"