Makefile 1.79 KB
Newer Older
Michael Hanus's avatar
Michael Hanus committed
1
2
3
# Makefile for generating Curry Browser

# Required:
4
# - installed Curry System (PAKCS or KiCS2) specified by variable REPL
Michael Hanus's avatar
Michael Hanus committed
5
6
# - root location of the Curry System specified by variable ROOT

7
CURRYTOOLS = ..
Björn Peemöller 's avatar
Björn Peemöller committed
8
9
CASS       = $(CURRYTOOLS)/CASS
ANADIR     = $(CURRYTOOLS)/analysis
Michael Hanus's avatar
Michael Hanus committed
10

11
12
# binary
TOOL       = $(BINDIR)/currybrowse
Michael Hanus's avatar
Michael Hanus committed
13
14

# source modules of the Curry Browser:
15
DEPS = BrowserGUI.curry Imports.curry \
16
17
       AnalysisTypes.curry BrowserAnalysis.curry \
       ShowFlatCurry.curry ShowGraph.curry \
18
19
       $(CASS)/AnalysisServer.curry $(CASS)/AnalysisDoc.curry \
       $(CASS)/Registry.curry \
Michael Hanus's avatar
Michael Hanus committed
20
21
       $(CURRYTOOLS)/addtypes/AddTypes.curry \
       $(CURRYTOOLS)/importcalls/ImportCalls.curry \
Björn Peemöller 's avatar
Björn Peemöller committed
22
       $(LIBDIR)/GUI.curry $(LIBDIR)/IOExts.curry  $(LIBDIR)/System.curry \
23
24
       $(LIBDIR)/FlatCurry/Types.curry $(LIBDIR)/FlatCurry/Files.curry \
       $(LIBDIR)/FlatCurry/Show.curry \
Michael Hanus's avatar
Michael Hanus committed
25
26
       analysis/*.curry $(ANADIR)/*.curry

27
LOADPATH = analysis:$(CASS):$(ANADIR):$(CURRYTOOLS)/importcalls:$(CURRYTOOLS)/addtypes
Michael Hanus's avatar
Michael Hanus committed
28

29
30
.PHONY: all compile install clean uninstall

31
all: install
32

33
compile: GenInt BrowserGUI SourceProgGUI
34

35
36
install: compile
	rm -f $(TOOL)
37
	ln -s $(CURDIR)/BrowserGUI $(TOOL)
38

39
clean:
40
	$(CLEANCURRY) -r
41
	rm -f BrowserGUI SourceProgGUI GenInt
Michael Hanus's avatar
Michael Hanus committed
42

43
uninstall: clean
Björn Peemöller 's avatar
Björn Peemöller committed
44
	rm -f $(TOOL)
Michael Hanus's avatar
Michael Hanus committed
45

46
47
48
49
50
# generate executables:
GenInt: ShowFlatCurry.curry $(LIBDIR)/FlatCurry/*.curry
	$(REPL) $(REPL_OPTS) :load ShowFlatCurry :save :quit
	rm -f GenInt && ln -s ShowFlatCurry GenInt

Michael Hanus's avatar
Michael Hanus committed
51
BrowserGUI: $(DEPS)
Björn Peemöller 's avatar
Björn Peemöller committed
52
53
	$(REPL) $(REPL_OPTS) :set path $(LOADPATH) \
	  :load BrowserGUI :eval "patchReadmeVersion" :save :quit
Michael Hanus's avatar
Michael Hanus committed
54

55
56
57
SourceProgGUI: SourceProgGUI.curry $(LIBDIR)/GUI.curry
	$(REPL) $(REPL_OPTS) :load SourceProgGUI :save :quit

Michael Hanus's avatar
Michael Hanus committed
58
59
60
# load the Curry Browser program into the Curry system:
.PHONY: load
load: $(DEPS)
Björn Peemöller 's avatar
Björn Peemöller committed
61
	$(REPL) $(REPL_OPTS) :set path $(LOADPATH) :load BrowserGUI