filters/gp_filter_resize_alloc: Check w and h
[gfxprim.git] / gen.mk
blob235cd5fc6e976eed65a73a92e1e015169b949cd4
2 # This is makefile rule for generating C sources from python templates
4 ifndef GENHEADERS
5 GENHEADERS=
6 endif
8 ifndef GENSOURCES
9 GENSOURCES=
10 endif
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
29 # And clean them
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
43 ifdef VERBOSE
44 PYTHONPATH=$(TEMPLATEDIR) ${CCT} -I $(TEMPLATEDIR) "$@.t"
45 else
46 @echo "CCT $@"
47 @PYTHONPATH=$(TEMPLATEDIR) ${CCT} -I $(TEMPLATEDIR) "$@.t"
48 endif