7887be7f1ddcd5018a171a3dc6a9b2c4439e8b59
[ghc-hetmet.git] / ghc / utils / prof / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.5 2000/09/05 10:16:41 simonmar Exp $
3 #
4 # (c) The GHC Team, 2000
5 #
6
7 TOP=../..
8 include $(TOP)/mk/boilerplate.mk
9
10 INSTALLING=1
11
12 ifeq "$(INSTALLING)" "1"
13 SUBDIRS = cgprof icons
14 endif
15
16 SCRIPT_SUBST_VARS= \
17  FPTOOLS_TOP_ABS \
18  INSTALLING \
19  DEFAULT_TMPDIR \
20  TARGETPLATFORM
21
22 INSTALLED_SCRIPT_PROG  = ghcprof
23 INPLACE_SCRIPT_PROG    = ghcprof-inplace
24
25 ifeq "$(INSTALLING)" "1"
26 SCRIPT_PROG     =  $(INSTALLED_SCRIPT_PROG)
27 else
28 SCRIPT_PROG     =  $(INPLACE_SCRIPT_PROG)
29 endif
30
31 ifneq "$(BIN_DIST)" "1"
32 SCRIPT_SUBST_VARS += libdir libexecdir
33 endif
34
35 # don't recurse on 'make install'
36 #
37 ifeq "$(INSTALLING)" "1"
38 all clean distclean mostlyclean maintainer-clean ::
39         $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@
40 endif
41
42 INTERP          = perl
43 SCRIPT_OBJS     = ghcprof.prl
44 INSTALL_SCRIPTS += $(SCRIPT_PROG)
45
46 include $(TOP)/mk/target.mk