New generating arch, cont. (incl makefiles)
[gfxprim.git] / gen.mk
blob28b1bc6fbcbc5c8d2fd8e61a74823b1821227291
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)