-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·115 lines (95 loc) · 2.92 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# leJOS main make file
#
SHELL=/bin/sh
ANT=ant
TEMP=/usr/tmp
# OSTYPE is not set by default on Mac OS X
ifndef OSTYPE
OSTYPE = $(shell uname -s|awk '{print tolower($$0)}')
endif
# determine LEJOS_HOME and path separators
PWD=$(shell pwd)
ifneq (,$(findstring cygwin,$(OSTYPE)))
OSTYPE=cygwin
LEJOS_HOME=$(shell cygpath -m "$(PWD)")
PATH_SEP=;
else
LEJOS_HOME=$(PWD)
PATH_SEP=:
endif
MFLAGS = OSTYPE=$(OSTYPE) LEJOS_HOME=$(LEJOS_HOME) BIN_TARGET=$(LEJOS_HOME)/bin
REGRESSION_SRC="test/regression"
JVM_SRC="src/javavm"
EMU_SRC="src/tools/emu-lejos"
PLAT_RCX_SRC="src/platform/rcx"
PLAT_UNIX_SRC="src/platform/unix"
PLAT_GBOY_SRC="src/platform/gameboy"
IRTRCX_LIB_SRC="src/comms/libirtrcx"
JIRTRCX_LIB_SRC="src/comms/libjirtrcx"
export JAVA
default: emulator irtrcx_libs all_java scripts tinyvm_emul
all: default lejos_bin
all_java:
${ANT} irctrcx.libs jirctrcx.libs lejos.libs
scripts:
chmod 775 $(LEJOS_HOME)/bin/lejosjc
chmod 775 $(LEJOS_HOME)/bin/lejoslink
chmod 775 $(LEJOS_HOME)/bin/lejosdl
chmod 775 $(LEJOS_HOME)/bin/firmdl
emulator:
@echo ""
@echo "====> Making Emulator emu-lejos"
@echo ""
chmod 775 $(LEJOS_HOME)/release/cctest.sh
cd $(EMU_SRC); $(MAKE) $(MFLAGS)
irtrcx_libs:
@echo ""
@echo "====> Making IR RCX communication libraries"
@echo ""
cd $(IRTRCX_LIB_SRC); $(MAKE) $(MFLAGS) clean; $(MAKE) $(MFLAGS)
cd $(JIRTRCX_LIB_SRC); $(MAKE) $(MFLAGS) clean; $(MAKE) $(MFLAGS)
lejos_bin:
@echo ""
@echo "====> Making leJOS RCX binary (lejos.srec)"
@echo ""
cd $(PLAT_RCX_SRC); $(MAKE) $(MFLAGS)
tinyvm_emul:
@echo ""
@echo "====> Making leJOS Unix binaries (lejos, for emulation)"
@echo ""
cd $(PLAT_UNIX_SRC); $(MAKE) $(MFLAGS)
clean:
${ANT} clean
rm -f `find . -name '*.o'`
rm -f `find . -name '*.a'`
rm -f `find . -name '*~'`
rm -f `find . -name '*.core'`
rm -f `find . -name '*.tvm'`
rm -f `find . -name '*.bin'`
rm -f `find . -name '*.sig'`
rm -f `find . -name '*.bak'`
rm -f `find . -name '*.stackdump'`
rm -f `find . -name '*.backtrace'`
distclean: clean
rm -f `find . -name '.#*'`
rm -f `find . -name '*.lst'`
rm -f `find . -name '*.log'`
rm -f `find . -name 'dependencies.xml'`
rm -f `find . -name 'history.xml'`
distclean_src: distclean
rm -f bin/emu-dump bin/emu-lejos bin/emu-lejosrun
rm -f src/java/tools/js/tinyvm/SpecialClassConstants.java src/java/tools/js/tinyvm/SpecialSignatureConstants.java src/javavm/specialclasses.h src/javavm/specialsignatures.h
rm -f $(PLAT_UNIX_SRC)/dump_config $(PLAT_UNIX_SRC)/platform_config.h
rm -f $(EMU_SRC)/mkimg
rm -f src/comms/tools/fastdl/*.lds src/comms/tools/fastdl/*.map
rm -f `find . -name '*.so' -o -name '*.dylib' -o -name '*.jnilib' -o -name '*.dll'`
rm -f `find . -name '.DS_Store'` # Mac OS X Finder droppings
rm -f `find . -name '*.exe'`
realclean: distclean_src
rm -f `find . -name '*.srec'`
rm -f `find . -name '*.rcx.map'`
rm -f `find . -name 'rcx.map'`
rm -f `find . -name 'rcx_gen.lds'`
superclean: superclean
git clean -fdx