Makefile 830 Bytes
Newer Older
1
SUBDIRS=compiler lib test examples
2
export LABCOMM_JAR=$(shell pwd)/compiler/labcomm_compiler.jar
3
4
export LABCOMM=java -jar $(LABCOMM_JAR) 

Anders Blomdell's avatar
Anders Blomdell committed
5
all: $(SUBDIRS:%=make-%)
6

Anders Blomdell's avatar
Anders Blomdell committed
7
8
.PHONY: make-compiler
make-compiler:
9
10
	cd compiler ; ant jar

Anders Blomdell's avatar
Anders Blomdell committed
11
12
.PHONY: make-%
make-%:
Anders Blomdell's avatar
Anders Blomdell committed
13
	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* -e 
14
15

.PHONY: test
Anders Blomdell's avatar
Anders Blomdell committed
16
17
18
19
test: $(SUBDIRS:%=test-%)

.PHONY: test-compiler
test-compiler:
20
	$(MAKE) -C test compiler_errors
Anders Blomdell's avatar
Anders Blomdell committed
21
22
23

.PHONY: test-%
test-%:
Anders Blomdell's avatar
Anders Blomdell committed
24
	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* -e test
Anders Blomdell's avatar
Anders Blomdell committed
25
26
27
28
29
30
31
32
33
34
35

.PHONY: clean
clean: $(SUBDIRS:%=clean-%)

.PHONY: clean-compiler
clean-compiler:
	cd compiler ; ant clean

.PHONY: clean-%
clean-%:
	$(MAKE) -C $* -e clean
Anders Blomdell's avatar
Anders Blomdell committed
36
37
38
39
40
41
42
43
44
45
46

.PHONY: distclean
distclean: $(SUBDIRS:%=distclean-%)

.PHONY: distclean-compiler
distclean-compiler:
	cd compiler ; ant clean

.PHONY: distclean-%
distclean-%:
	$(MAKE) -C $* -e distclean