1##===- bindings/ocaml/backends/Makefile --------------------*- Makefile -*-===## 2# 3# The LLVM Compiler Infrastructure 4# 5# This file is distributed under the University of Illinois Open Source 6# License. See LICENSE.TXT for details. 7# 8##===----------------------------------------------------------------------===## 9# 10# This is the master makefile for backend-specific bindings. It works by 11# creating a stub makefile for each configured target, e.g. Makefile.ARM, and 12# invoking it to compile the corresponding library, e.g. Llvm_ARM. 13# 14# This scheme allows to keep changes to Makefile.ocaml minimal. 15# 16##===----------------------------------------------------------------------===## 17 18LEVEL := ../../.. 19ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.common 20 21include $(LEVEL)/Makefile.config 22include $(LEVEL)/Makefile.common 23 24all-local:: all-backends 25clean-local:: clean-backends 26install-local:: install-backends 27uninstall-local:: uninstall-backends 28 29stubs: 30 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 31 $(ECHO) "TARGET := $$i" > Makefile.$$i; \ 32 $(ECHO) "include Makefile.common" >> Makefile.$$i; \ 33 done 34 35all-backends: stubs 36 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 37 $(MAKE) -f Makefile.$$i all; \ 38 done 39 40clean-backends: stubs 41 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 42 $(MAKE) -f Makefile.$$i clean; \ 43 $(RM) -f Makefile.$$i; \ 44 done 45 46install-backends: stubs 47 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 48 $(MAKE) -f Makefile.$$i install; \ 49 done 50 51uninstall-backends: stubs 52 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 53 $(MAKE) -f Makefile.$$i uninstall; \ 54 done 55 56ocamldoc: stubs 57 $(Verb) for i in $(TARGETS_TO_BUILD); do \ 58 $(MAKE) -f Makefile.$$i ocamldoc; \ 59 done 60 61.PHONY: all-backends clean-backends install-backends uninstall-backends ocamldoc 62