forked from catseye/JaC64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (52 loc) · 3.25 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
# GNU Makefile for JaC64
###############################################################
# VARIABLES
###############################################################
JAVAC ?= javac -encoding UTF-8
JAVACARGS ?= -deprecation
JAC64PACKAGES := com/dreamfabric/jac64 com/dreamfabric/c64utils resid
PACKAGES := com/dreamfabric/jac64 com/dreamfabric/jsidplay
OBJECTS := $(patsubst %.java,%.class,$(wildcard $(addsuffix /*.java, $(JAC64PACKAGES))))
OBJECTS_JSID := $(patsubst %.java,%.class,$(wildcard *.java)) com/dreamfabric/gui/DKnob2.class com/dreamfabric/gui/DCheckBox.class $(patsubst %.java,%.class,$(wildcard $(addsuffix /*.java,. $(PACKAGES))))
SOUNDS ?= sounds/motor.wav sounds/track.wav
SMALLUTILS ?= com/dreamfabric/c64utils/AutoStore.class com/dreamfabric/c64utils/C64Script.class
UTILS ?= $(SMALLUTILS) com/dreamfabric/c64utils/Debugger.class
DEMOFILES ?= c64programs/games1.d64 c64programs/Bonzieed.prg c64programs/Jeroen_tel_music.prg games.txt
# Set this to include any other files you want in your jar
EXTRAJARFILES ?=
###############################################################
# TARGETS
###############################################################
.PHONY: compile
all: compile
sid: $(OBJECTS_JSID)
compile: $(OBJECTS) $(OBJECTS_JSID)
jar: jac64.jar
smalljar: c64small.jar
jac64.jar: compile $(OBJECTS)
jar cvfm $@ JaC64Manifest.txt com/dreamfabric/jac64/*.class JaC64*.class $(UTILS) $(SOUNDS) roms/*.* resid/*.class $(EXTRAJARFILES)
# Small(er) JaC64 Jarfile
c64small.jar: compile $(OBJECTS)
jar cvf $@ com/dreamfabric/jac64/*.class C64Applet*.class $(SMALLUTILS) $(SOUNDS) roms/*.* resid/*.class $(EXTRAJARFILES)
# JSIDPlay including GUI, etc.
jsidplay.jar: $(OBJECTS_JSID)
jar cvf $@ com/dreamfabric/jac64/{MOS6510Core,MOS6510Ops,C64Chips,CIA,DirEntry,Hex,M6510Ops,SID,SID6581,Loader,IMonitor,RS6581Waves,PatchListener,SIDMixer,Observer,SIDMixerListener,SIDMixerSE,SELoader,VICConstants,DefaultIMon}.class com/dreamfabric/c64utils/Assembler.class com/dreamfabric/jsidplay/*.class com/dreamfabric/gui/DKnob*.class com/dreamfabric/gui/DCheck*.class com/dreamfabric/jsidplay/{JSIDPlay,JSIDPlayer,JSCPU,JSIDChipemu,PSID,JSIDListener}.class sidplay.a65 roms/*.c64
# SIDPlay library
jsidlib.jar: $(OBJECTS_JSID)
jar cvf $@ com/dreamfabric/jac64/{MOS6510Core,MOS6510Ops,C64Chips,CIA,DirEntry,Hex,M6510Ops,SID,SID6581,Loader,IMonitor,RS6581Waves,PatchListener,SIDMixer,Observer,SIDMixerListener}.class com/dreamfabric/c64utils/Debugger.class com/dreamfabric/jsidplay/{JSIDPlayer,JSCPU,JSIDChipemu,PSID,JSIDListener}.class
zip: jac64.zip
jac64.zip: c64small.jar index_jac64.html
zip -r jac64.zip c64small.jar $(DEMOFILES) index_jac64.html
src: $(OBJECTS)
zip -r jac64src.zip C64Test.java C64Applet.java com/dreamfabric/jac64/*.java com/dreamfabric/c64utils/*.java \
sounds/*.wav roms/*.c64 roms/*.rom readme.txt Makefile index_jac64.html c64small.jar $(DEMOFILES) index_jac64.html
###############################################################
# CLASS COMPILATION
###############################################################
%.class : %.java
$(JAVAC) $(JAVACARGS) $<
###############################################################
# CLEAN
###############################################################
clean:
rm -rf *.class $(OBJECTS) $(OBJECTS_JSID) c64.jar c64small.jar