Make "runghc -f path-to-ghc Main.hs" work
[ghc-hetmet.git] / utils / heap-view / Makefile.original
1 CC=gcc
2 GLHC18 = glhc18
3 GLHC19 = /users/fp/partain/bin/sun4/glhc
4 HC= ghc -hi-diffs -fglasgow-exts -fhaskell-1.3
5 HC_FLAGS = -O -prof -auto-all
6 #HC_FLAGS = -O
7 LIBS=-lX11
8 FILES2 = Life2.o HaskXLib.o
9 FILESS = LifeWithStability.o HaskXLib.o
10 FILES = Life.o HaskXLib.o
11
12 all : hpView hpView2
13
14 # ADR's heap profile viewer
15 hpView: HpView.o Parse.o HaskXLib.o
16         $(HC) -o hpView $(HC_FLAGS) HpView.o Parse.o HaskXLib.o $(LIBS) -L/usr/X11/lib
17 clean::
18         rm -f hpView
19
20 # ADR's continuous heap profile viewer (handles output of -p)
21 hpView2:        HpView2.o Parse.o HaskXLib.o
22         $(HC) -o hpView2 $(HC_FLAGS) HpView2.o Parse.o HaskXLib.o $(LIBS) -L/usr/X11/lib
23 clean::
24         rm -f hpView2
25
26
27 # ADR's continuous graph program (handles output of -Sstderr)
28 graph:  Graph.o HaskXLib.o
29         $(HC) -o graph $(HC_FLAGS) Graph.o HaskXLib.o $(LIBS) -L/usr/X11/lib
30 clean::
31         rm -f graph
32
33 # ADR's continuous graph program (part of heap profile viewer) that
34 # crashes the compiler
35 bugGraph:       bugGraph.o HaskXLib.o
36         $(HC) -o bugGraph $(HC_FLAGS) bugGraph.o HaskXLib.o $(LIBS) -L/usr/X11/lib
37 clean::
38         rm -f bugGraph
39
40 %.o:%.c
41         $(CC) -c -ansi -traditional -g -I/usr/X11/include/ $< $(INC)
42
43 %.o:%.lhs
44         $(HC) $(HC_FLAGS) -c $< $(INC)
45         
46 clean::
47         rm -f core *.o *% #* 
48         rm -f *.hc