summaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/llvm/Makefile
blob: fb682c731b4ca515c923fac925832ad897c33e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
##===- bindings/ocaml/llvm/Makefile ------------------------*- Makefile -*-===##
#
#                     The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm interface.
#
##===----------------------------------------------------------------------===##

LEVEL := ../../..
LIBRARYNAME := llvm
UsedComponents := core transformutils
UsedOcamlLibs := llvm
ExtraLibs := -lstdc++

include ../Makefile.ocaml

all-local:: copy-meta
install-local:: install-meta
uninstall-local:: uninstall-meta

DestMETA := $(PROJ_libocamldir)/META.llvm

# Easy way of generating META in the objdir
copy-meta: $(OcamlDir)/META.llvm

$(OcamlDir)/META.llvm: META.llvm
	$(Verb) $(CP) -f $< $@

install-meta:: $(OcamlDir)/META.llvm
	$(Echo) "Install $(BuildMode) $(DestMETA)"
	$(Verb) $(MKDIR) $(PROJ_libocamldir)
	$(Verb) $(DataInstall) $< "$(DestMETA)"

uninstall-meta::
	$(Echo) "Uninstalling $(DestMETA)"
	-$(Verb) $(RM) -f "$(DestMETA)"

.PHONY: copy-meta install-meta uninstall-meta