forked from mauiaaron/apple2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
214 lines (170 loc) · 7.1 KB
/
Makefile.am
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
AM_CPPFLAGS = -Isrc -DCONFIG_DATADIR=\"@datadir@\"
AM_CPPFLAGS += -I../src # work around some bug in make distcheck
AM_LFLAGS = -i -D_GNU_SOURCE=1
#AM_COLOR_TESTS = no
#LDFLAGS =
#LDADD =
###############################################################################
# No install
noinst_HEADERS = src/common.h src/cpu.h src/disk.h src/glue.h src/vm.h \
src/interface.h src/joystick.h src/keys.h src/misc.h src/prefs.h \
src/timing.h src/uthash.h src/video/video.h src/zlib-helpers.h \
\
src/x86/glue-prologue.h \
src/x86/glue-offsets.h src/x86/glue-offsets32.h src/x86/glue-offsets64.h \
src/meta/debug.h src/meta/log.h src/meta/systrace.h \
\
src/audio/alhelpers.h src/audio/AY8910.h src/audio/mockingboard.h \
src/audio/peripherals.h src/audio/soundcore.h src/audio/speaker.h \
src/audio/SSI263Phonemes.h
noinst_PROGRAMS = genfont genrom glue_offsets
###############################################################################
# Apple //ix and supporting sources
bin_PROGRAMS = apple2ix
ASM_SRC_x86 = \
src/x86/glue.S src/x86/cpu.S
VIDEO_SRC = \
src/video/glvideo.c \
src/video/glutinput.c \
src/video/glnode.c \
src/video/glhudmodel.c \
src/video/glalert.c \
src/video/ncvideo.c \
src/video/xvideo.c \
src/video_util/matrixUtil.c \
src/video_util/modelUtil.c \
src/video_util/sourceUtil.c \
src/video_util/vectorUtil.c
AUDIO_SRC = \
src/audio/soundcore.c src/audio/soundcore-openal.c src/audio/speaker.c \
src/audio/playqueue.c src/audio/alhelpers.c src/audio/mockingboard.c \
src/audio/AY8910.c
# NOTE : selectively enabled through configuration process ...
EXTRA_apple2ix_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
apple2ix_SOURCES = \
externals/jsmn/jsmn.c \
src/cpu-supp.c \
src/disk.c \
src/display.c \
src/font.c \
src/interface.c \
src/joystick.c \
src/json_parse.c \
src/keys.c \
src/meta/darwin-shim.c \
src/meta/debug.l \
src/meta/debugger.c \
src/meta/systrace.c \
src/meta/log.c \
src/meta/memmngt.c \
src/meta/opcodes.c \
src/misc.c \
src/prefs.c \
src/rom.c \
src/test/sha1.c \
src/timing.c \
src/video/video.c \
src/video/ntsc.c \
src/vm.c \
src/zlib-helpers.c
apple2ix_CFLAGS = @AM_CFLAGS@ @X_CFLAGS@
apple2ix_CCASFLAGS = $(apple2ix_CFLAGS)
apple2ix_LDADD = @ASM_O@ @VIDEO_O@ @AUDIO_O@ @X_LIBS@
apple2ix_DEPENDENCIES = @ASM_O@ @VIDEO_O@ @AUDIO_O@
genfont_SOURCES = src/genfont.c
genrom_SOURCES = src/genrom.c
glue_offsets_SOURCES = src/glue-offsets.c
src/font.c: src/font.txt genfont
./genfont < $< > $@
src/rom.c: genrom
./genrom src/rom/apple_IIe.rom src/rom/slot6.rom > $@
src/x86/glue.S: src/cpu-supp.c src/disk.c src/display.c src/vm.c @AUDIO_GLUE_C@
TARGET_ARCH=x86 ./src/genglue.sh $^ > $@
###############################################################################
# Testing
#LOG_DRIVER = ## hack TODO/FIXME ... should be wrapper shell script accepting standard GNU testing API args ...
A2_TEST_SOURCES = $(apple2ix_SOURCES) src/test/testcommon.c
A2_TEST_CFLAGS = $(apple2ix_CFLAGS) -DTESTING=1 -Isrc/test
TESTS = testcpu testdisk testdisplay testprefs testtrace testui testvm
check_PROGRAMS = testcpu testdisk testdisplay testprefs testtrace testui testvm
#######################################
testcpu_SOURCES = src/test/testcpu.c $(A2_TEST_SOURCES)
testcpu_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_CPU=1
testcpu_CCASFLAGS = $(testcpu_CFLAGS)
testcpu_LDFLAGS = $(apple2ix_LDFLAGS)
testcpu_LDADD = @testcpu_ASM_O@ @testcpu_VIDEO_O@ @testcpu_AUDIO_O@ @X_LIBS@
testcpu_DEPENDENCIES = @testcpu_ASM_O@ @testcpu_VIDEO_O@ @testcpu_AUDIO_O@
EXTRA_testcpu_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testdisk_SOURCES = src/test/testdisk.c $(A2_TEST_SOURCES)
testdisk_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_DISK=1 -DDISK_TRACING=1
testdisk_CCASFLAGS = $(testdisk_CFLAGS)
testdisk_LDFLAGS = $(apple2ix_LDFLAGS)
testdisk_LDADD = @testdisk_ASM_O@ @testdisk_VIDEO_O@ @testdisk_AUDIO_O@ @X_LIBS@
testdisk_DEPENDENCIES = @testdisk_ASM_O@ @testdisk_VIDEO_O@ @testdisk_AUDIO_O@
EXTRA_testdisk_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testdisplay_SOURCES = src/test/testdisplay.c $(A2_TEST_SOURCES)
testdisplay_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_DISPLAY=1 -DVIDEO_TRACING=1
testdisplay_CCASFLAGS = $(testdisplay_CFLAGS)
testdisplay_LDFLAGS = $(apple2ix_LDFLAGS)
testdisplay_LDADD = @testdisplay_ASM_O@ @testdisplay_VIDEO_O@ @testdisplay_AUDIO_O@ @X_LIBS@
testdisplay_DEPENDENCIES = @testdisplay_ASM_O@ @testdisplay_VIDEO_O@ @testdisplay_AUDIO_O@
EXTRA_testdisplay_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testprefs_SOURCES = src/test/testprefs.c $(A2_TEST_SOURCES)
testprefs_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_PREFS=1
testprefs_CCASFLAGS = $(testprefs_CFLAGS)
testprefs_LDFLAGS = $(apple2ix_LDFLAGS)
testprefs_LDADD = @testprefs_ASM_O@ @testprefs_VIDEO_O@ @testprefs_AUDIO_O@ @X_LIBS@
testprefs_DEPENDENCIES = @testprefs_ASM_O@ @testprefs_VIDEO_O@ @testprefs_AUDIO_O@
EXTRA_testprefs_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testtrace_SOURCES = src/test/testtrace.c $(A2_TEST_SOURCES)
testtrace_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_TRACE=1 -DCPU_TRACING=1 -DDISK_TRACING=1 -DVM_TRACING=1 -DSPEAKER_TRACING=1 -DMB_TRACING=1 -DVIDEO_TRACING=1
testtrace_CCASFLAGS = $(testtrace_CFLAGS)
testtrace_LDFLAGS = $(apple2ix_LDFLAGS)
testtrace_LDADD = @testtrace_ASM_O@ @testtrace_VIDEO_O@ @testtrace_AUDIO_O@ @X_LIBS@
testtrace_DEPENDENCIES = @testtrace_ASM_O@ @testtrace_VIDEO_O@ @testtrace_AUDIO_O@
EXTRA_testtrace_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testui_SOURCES = src/test/testui.c $(A2_TEST_SOURCES)
testui_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_UI=1
testui_CCASFLAGS = $(testui_CFLAGS)
testui_LDFLAGS = $(apple2ix_LDFLAGS)
testui_LDADD = @testui_ASM_O@ @testui_VIDEO_O@ @testui_AUDIO_O@ @X_LIBS@
testui_DEPENDENCIES = @testui_ASM_O@ @testui_VIDEO_O@ @testui_AUDIO_O@
EXTRA_testui_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
#######################################
testvm_SOURCES = src/test/testvm.c $(A2_TEST_SOURCES)
testvm_CFLAGS = $(A2_TEST_CFLAGS) -DTEST_VM=1
testvm_CCASFLAGS = $(testvm_CFLAGS)
testvm_LDFLAGS = $(apple2ix_LDFLAGS)
testvm_LDADD = @testvm_ASM_O@ @testvm_VIDEO_O@ @testvm_AUDIO_O@ @X_LIBS@
testvm_DEPENDENCIES = @testvm_ASM_O@ @testvm_VIDEO_O@ @testvm_AUDIO_O@
EXTRA_testvm_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC) $(AUDIO_SRC)
###############################################################################
# Misc & Installation
# manpage
man_MANS = docs/apple2ix.6
# shaders
shadersdir = @datadir@/@PACKAGE@/shaders
shaders_DATA = src/video/Basic.vsh src/video/Basic.fsh
# Extra distribution stuff
EXTRA_DIST = reconf.sh configure README.debugger PROBLEMS .apple2 \
\
$(man_MANS) \
\
src/font.txt \
src/genglue.sh \
\
$(shaders_DATA)
install-data-hook:
rm -rf @datadir@/@PACKAGE@/disks
cp -Rp external-disks/ @datadir@/@PACKAGE@/disks/
dist-hook:
echo "TODO FIXME disks and external-disks"
echo rm -rf $(distdir)/disks
echo cp -Rp disks $(distdir)/disks
echo cp -Rp external-disks $(distdir)/disks
CLEANFILES = src/font.c src/rom.c src/meta/debug.c src/x86/glue.S