-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (35 loc) · 990 Bytes
/
Copy pathMakefile
File metadata and controls
53 lines (35 loc) · 990 Bytes
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
44
45
46
47
48
49
50
51
52
53
# TODO: this suffix is out of our control, and needs to be detected.
OS_SUFFIX=x86-darwin
ML_BUILD = ml-build
ML_BUILD_FLAGS =
ML_MAKEDEPEND = ml-makedepend
ML_MAKEDEPEND_FLAGS =
ROOT_SRC = src/
ROOT_BIN = bin/
ROOT_HEAP = $(ROOT_BIN).heap/
PROGRAM_NAME = sml-language-server
PROGRAM = $(ROOT_HEAP)$(PROGRAM_NAME)
HEAP_IMAGE = $(ROOT_HEAP)$(PROGRAM_NAME).$(OS_SUFFIX)
ROOT_CM = $(ROOT_SRC)main/sources.cm
CM_FILES = $(ROOT_CM)
CLEAN_FILES = \
$(HEAP_IMAGE) \
.depend
.PHONY: build
build: $(HEAP_IMAGE) .depend
$(HEAP_IMAGE):
$(ML_BUILD) $(ML_BUILD_FLAGS) $(ROOT_CM) Main.main $(PROGRAM)
touch $(HEAP_IMAGE)
.depend: $(CM_FILES)
touch .depend
$(ML_MAKEDEPEND) $(ML_MAKEDEPEND_FLAGS) -n -f .depend $(ROOT_CM) $(HEAP_IMAGE)
# includes the generated *.sml file dependencies
ifneq ($(MAKECMDGOALS),clean)
sinclude .depend
endif
.PHONY: clean
clean:
rm -rf `find src -name ".cm" -type d`
rm -rf `find lib/smlnj -name ".cm" -type d`
rm -rf .cm
rm -f $(CLEAN_FILES)