Blame project/codegen.mk

f98ae1
clean:		clean-gen
f98ae1
f98ae1
clean-gen:
f98ae1
		rm -f gen.tag
f98ae1
		rm -f $(GEN_IR_SRCS)
f98ae1
		rm -f $(GEN_IR_HEADERS)
f98ae1
f98ae1
GEN_ALL 	= $(GEN_IR_SRCS) \
f98ae1
		  $(GEN_IR_HEADERS) \
f98ae1
f98ae1
f98ae1
# gen-ir
f98ae1
GEN_IR_TOOL = $(SOURCE_DIR)/scripts/gen_ir.py
f98ae1
GEN_IR_SPEC = $(SOURCE_DIR)/scripts/ir_spec.py
f98ae1
f98ae1
f98ae1
build/gen/ir/ir/%.c:	$(SOURCE_DIR)/scripts/templates/%.c \
f98ae1
			$(GEN_IR_TOOL) $(GEN_IR_SPEC) tree.tag
f98ae1
	$(GEN_IR_TOOL) $(GEN_IR_SPEC) $< > $@
f98ae1
f98ae1
f98ae1
build/gen/ir/ir/%.h:	$(SOURCE_DIR)/scripts/templates/%.h \
f98ae1
			$(GEN_IR_TOOL) $(GEN_IR_SPEC) tree.tag
f98ae1
	$(GEN_IR_TOOL) $(GEN_IR_SPEC) $< > $@
f98ae1
f98ae1
f98ae1
build/gen/include/libfirm/nodes.h:	$(SOURCE_DIR)/scripts/templates/nodes.h \
f98ae1
					$(GEN_IR_TOOL) $(GEN_IR_SPEC) tree.tag
f98ae1
	$(GEN_IR_TOOL) $(GEN_IR_SPEC) $< > $@
f98ae1
f98ae1
f98ae1
f98ae1
# gen-all
f98ae1
gen-ir:			$(GEN_IR_SRCS) $(GEN_IR_HEADERS)
f98ae1
f98ae1
gen-all:		gen-ir
f98ae1
f98ae1
gen.tag:		$(GEN_ALL)
f98ae1
			touch gen.tag
f98ae1
f98ae1
gen:			gen.tag
f98ae1
f98ae1
f98ae1
.PHONY:	clean-gen \
f98ae1
	gen gen-all \
f98ae1
	gen-ir