Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlprof / Makefile
1 ## Copyright (C) 2009,2018 Matthew Fluet.
2 # Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
3 # Jagannathan, and Stephen Weeks.
4 # Copyright (C) 1997-2000 NEC Research Institute.
5 #
6 # MLton is released under a BSD-style license.
7 # See the file MLton-LICENSE for details.
8 ##
9
10 MLTON_RUNTIME_ARGS :=
11 MLTON_COMPILE_ARGS :=
12
13 ######################################################################
14 ######################################################################
15
16 SRC := $(shell cd .. && pwd)
17 BUILD := $(SRC)/build
18 BIN := $(BUILD)/bin
19
20 PATH := $(BIN):$(shell echo $$PATH)
21
22 TARGET := self
23
24 ######################################################################
25
26 MLTON := mlton
27 NAME := mlprof
28
29 all: $(NAME)
30
31 $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
32 @echo 'Compiling $(NAME)'
33 "$(MLTON)" @MLton $(MLTON_RUNTIME_ARGS) -- $(MLTON_COMPILE_ARGS) -target $(TARGET) $(NAME).mlb
34
35 .PHONY: clean
36 clean:
37 ../bin/clean