Old generators transformed to use new layout
[gfxprim.git] / gen.mk
blobf15aae630739c5736375343ae148efbbfc2df7b0
2 # This is makefile rule for generating C sources from python generators
4 ifndef LIBNAME
5 $(error LIBNAME not defined, fix your library Makefile)
6 endif
9 # Headers goes into include/core/
11 INCLUDE_PREFIX=$(TOPDIR)/include/$(LIBNAME)/
12 RGENHEADERS=$(addprefix $(INCLUDE_PREFIX),$(GENHEADERS))
15 # Generate genfiles for generated sources
17 CSOURCES+=$(GENSOURCES)
20 # Make the genrated headers actually build
22 all: $(RGENHEADERS)
25 # And clean them
27 CLEAN+=$(GENSOURCES) $(RGENHEADERS)
30 # Currently, just depend on all python files
32 GENERATORS=$(PYTHON_FILES)
35 # Generated files depend on python generators and libs
37 %.gen.c %.gen.h: $(GENERATORS)
38 ifdef VERBOSE
39 ${PYTHON} ${TOPDIR}/pylib/bin/generate_file.py "$@"
40 else
41 @echo "GEN $@"
42 @${PYTHON} ${TOPDIR}/pylib/bin/generate_file.py "$@"
43 endif