Home | History | Annotate | Download | only in backends
      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 
     18 LEVEL := ../../..
     19 ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.common
     20 
     21 include $(LEVEL)/Makefile.config
     22 include $(LEVEL)/Makefile.common
     23 
     24 all-local:: all-backends
     25 clean-local:: clean-backends
     26 install-local:: install-backends
     27 uninstall-local:: uninstall-backends
     28 
     29 stubs:
     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 
     35 all-backends: stubs
     36 	$(Verb) for i in $(TARGETS_TO_BUILD); do \
     37 		$(MAKE) -f Makefile.$$i all; \
     38 	done
     39 
     40 clean-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 
     46 install-backends: stubs
     47 	$(Verb) for i in $(TARGETS_TO_BUILD); do \
     48 		$(MAKE) -f Makefile.$$i install; \
     49 	done
     50 
     51 uninstall-backends: stubs
     52 	$(Verb) for i in $(TARGETS_TO_BUILD); do \
     53 		$(MAKE) -f Makefile.$$i uninstall; \
     54 	done
     55 
     56 ocamldoc: 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