-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
47 lines (38 loc) · 867 Bytes
/
Makefile
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
#
# Makefile for ECO32 project
#
VERSION = 0.29
DIRS = binutils lib libtest tools sim simtest \
fpga hwtests monitor disk stdalone
BUILD = `pwd`/build
.PHONY: all doc compiler builddir clean dist
all: compiler
for i in $(DIRS) ; do \
$(MAKE) -C $$i install ; \
done
doc:
$(MAKE) -C doc install
compiler: builddir
$(MAKE) -C lcc BUILDDIR=$(BUILD)/bin \
HOSTFILE=etc/eco32-linux.c lcc
$(MAKE) -C lcc BUILDDIR=$(BUILD)/bin all
rm -f $(BUILD)/bin/*.c
rm -f $(BUILD)/bin/*.o
rm -f $(BUILD)/bin/*.a
builddir:
mkdir -p $(BUILD)
mkdir -p $(BUILD)/bin
clean:
rm -f lcc/lburg/gram.c
for i in $(DIRS) ; do \
$(MAKE) -C $$i clean ; \
done
$(MAKE) -C doc clean
rm -rf $(BUILD)
rm -f *~
dist: clean
(cd .. ; \
tar --exclude-vcs -cvf \
eco32-$(VERSION).tar \
eco32/* ; \
gzip -f eco32-$(VERSION).tar)