-
Notifications
You must be signed in to change notification settings - Fork 64
/
Makefile
147 lines (130 loc) · 5.15 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
JAVA_BUILD_OPTS = -source 1.8 -target 1.8 -g
JAVA_RELEASE_OPTS = -source 1.8 -target 1.8
.PHONY: build
build: jpc
.PHONY: debugger
debugger: build_core
mkdir -p build
echo "Name: JPC Debugger" > debugger.manifest
echo "Author: Ian Preston" >> debugger.manifest
echo "Main-Class: org.jpc.debugger.JPC" >> debugger.manifest
echo "Build-Date: " `date` >> debugger.manifest
echo "Default-Args: -fda mem:resources/images/floppy.img -hda mem:resources/images/dosgames.img -boot fda" >> debugger.manifest
echo "" >> debugger.manifest
jar -cfm JPCDebugger.jar debugger.manifest \
resources/bios/vgabios.bin \
resources/bios/bios.bin resources/images/dosgames.img \
resources/images/floppy.img resources/icon.png \
resources/licence.html resources/jpc.png \
resources/smallpause.png \
resources/smallplay.png \
resources/tick.png \
-C build org/jpc/emulator \
-C build org/jpc/support -C build org/jpc/j2se \
-C build org/jpc/debugger
rm -f debugger.manifest
jar -i JPCDebugger.jar
.PHONY: build_core
build_core:
mkdir -p build
javac $(JAVA_BUILD_OPTS) -d build `find src/org/jpc/emulator -name \*.java` \
`find src/org/jpc/support -name \*.java` \
`find src/org/jpc/debugger -name \*.java` \
`find src/org/jpc/j2se -name \*.java`
.PHONY: tools
tools: build_core
mkdir -p build
javac $(JAVA_BUILD_OPTS) -cp build/ -d build `find src/tools -name \*.java`
echo "Name: JPC Tools" > jpc.manifest
echo "Main-Class: tools.Tools" >> jpc.manifest
echo "Author: Ian Preston" >> jpc.manifest
jar -cfm Tools.jar jpc.manifest \
-C build tools
rm -f jpc.manifest
.PHONY: tests
tests: build_core
mkdir -p build
javac $(JAVA_BUILD_OPTS) -cp build/ -d build `find src/tools -name \*.java` \
`find src/org/jpc/emulator/execution/decoder -name \*.java` \
src/org/jpc/emulator/execution/Executable.java \
src/org/jpc/j2se/Option.java
echo "Name: JPC Tools" > jpc.manifest
echo "Main-Class: tools.TestGenerator" >> jpc.manifest
echo "Class-Path: Tools.jar:." >> jpc.manifest
jar -cfm TestGen.jar jpc.manifest \
-C build tools -C build org/jpc/emulator/execution/decoder \
-C build org/jpc/emulator/execution/Executable.class \
-C build org/jpc/j2se
rm -f jpc.manifest
.PHONY: clean
clean:
rm -Rf build
rm -f jpc.manifest
.PHONY: cleanse
cleanse: clean
rm -f `find . -iname \*.class`
rm -f `find . -name \*~ -o -name \*#`
.PHONY: fast
fast: build_core
echo "Name: JPC Application" > jpc.manifest
echo "Author: Ian Preston" >> jpc.manifest
echo "Main-Class: org.jpc.j2se.JPCApplication" >> jpc.manifest
echo "Build-Date: " `date` >> jpc.manifest
echo "Default-Args: -fda mem:resources/images/floppy.img -hda mem:resources/images/dosgames.img -boot fda" >> jpc.manifest
echo "" >> jpc.manifest
jar -cfm JPCApplication.jar jpc.manifest \
resources/bios/vgabios.bin \
resources/bios/bios.bin \
resources/images/floppy.img resources/icon.png \
resources/licence.html resources/jpc.png \
resources/smallpause.png \
resources/smallplay.png \
resources/tick.png \
resources/soundbank-min.gm \
-C build org/jpc/emulator \
-C build org/jpc/support -C build org/jpc/j2se -C build org/jpc/debugger
rm -f jpc.manifest
.PHONY: application
application: fast
jar -i JPCApplication.jar
.PHONY: release
release: build_core
echo "Name: JPC Application" > jpc.manifest
echo "Author: Ian Preston" >> jpc.manifest
echo "Main-Class: org.jpc.j2se.JPCApplication" >> jpc.manifest
echo "Build-Date: " `date` >> jpc.manifest
echo "Default-Args: -fda mem:resources/images/floppy.img -hda mem:resources/images/dosgames.img -boot fda" >> jpc.manifest
echo "" >> jpc.manifest
jar -cfm JPCApplication.jar jpc.manifest \
resources/bios/vgabios.bin \
resources/bios/bios.bin resources/images/dosgames.img \
resources/images/floppy.img resources/icon.png \
resources/licence.html resources/jpc.png \
resources/smallpause.png \
resources/smallplay.png \
resources/tick.png \
resources/soundbank-min.gm \
-C build org/jpc/emulator \
-C build org/jpc/support -C build org/jpc/j2se -C build org/jpc/debugger
rm -f jpc.manifest
jar -i JPCApplication.jar
.PHONY: secondapplication
secondapplication: build_core
echo "Name: JPC Application" > jpc.manifest
echo "Main-Class: org.jpc.j2se.JPCApplication" >> jpc.manifest
echo "Build-Date: " `date` >> jpc.manifest
echo "Default-Args: -fda mem:resources/images/floppy.img -hda mem:resources/images/dosgames.img -boot fda" >> jpc.manifest
echo "" >> jpc.manifest
jar -cfm JPCApplication2.jar jpc.manifest \
resources/bios/vgabios.bin \
resources/bios/fuzzerBIOS resources/images/dosgames.img \
resources/images/floppy.img resources/icon.png \
resources/licence.html resources/jpc.png \
resources/smallpause.png \
resources/smallplay.png \
resources/tick.png \
resources/soundbank-min.gm \
-C build org/jpc/emulator \
-C build org/jpc/support -C build org/jpc/j2se -C build org/jpc/debugger
rm -f jpc.manifest
jar -i JPCApplication2.jar