Mercurial > repos > blastem
annotate Makefile @ 621:5196333b37a6
Fix a few values reported by the vr debugger command. Add DMA registers to vr debugger command. Fix horizontal interrupt bug. Slightly more accurate (but still broken) handling of switches between H32 and H40 modes.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 16 Jun 2014 19:13:28 -0700 |
parents | fb39534b6604 |
children | a3afee2271ce 47123183c336 |
rev | line source |
---|---|
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
1 ifdef NOGL |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
2 LIBS=sdl |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
3 else |
488
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
487
diff
changeset
|
4 LIBS=sdl glew gl |
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
5 endif |
426
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
6 LDFLAGS=-lm `pkg-config --libs $(LIBS)` |
229
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
7 ifdef DEBUG |
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
8 CFLAGS=-ggdb -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type |
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
9 else |
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
10 CFLAGS=-O2 -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type |
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
11 endif |
18
3e7bfde7606e
M68K to x86 translation works for a limited subset of instructions and addressing modes
Mike Pavone <pavone@retrodev.com>
parents:
16
diff
changeset
|
12 |
426
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
13 ifdef PROFILE |
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
14 CFLAGS+= -pg |
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
15 LDFLAGS+= -pg |
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
16 endif |
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
17 ifdef NOGL |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
18 CFLAGS+= -DDISABLE_OPENGL |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
19 endif |
426
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
419
diff
changeset
|
20 |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
21 TRANSOBJS=gen_x86.o x86_backend.o mem.o |
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
22 M68KOBJS=68kinst.o m68k_to_x86.o runtime.o |
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
23 Z80OBJS=z80inst.o z80_to_x86.o zruntime.o |
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
24 AUDIOOBJS=ym2612.o psg.o wave.o |
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
25 CONFIGOBJS=config.o tern.o util.o |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
26 |
465
dc322bc77ea2
Fix stateview. Update "all" target in Makefile.
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
27 all : dis zdis stateview vgmplay blastem |
54
3b79cbcf6846
Get Flavio's color bar demo kind of sort of working
Mike Pavone <pavone@retrodev.com>
parents:
20
diff
changeset
|
28 |
524
fb39534b6604
Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents:
515
diff
changeset
|
29 blastem : blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) |
fb39534b6604
Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents:
515
diff
changeset
|
30 $(CC) -ggdb -o blastem blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(LDFLAGS) |
16 | 31 |
32 dis : dis.o 68kinst.o | |
33 $(CC) -o dis dis.o 68kinst.o | |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
34 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
35 zdis : zdis.o z80inst.o |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
36 $(CC) -o zdis zdis.o z80inst.o |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
37 |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
38 libemu68k.a : $(M68KOBJS) $(TRANSOBJS) |
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
39 ar rcs libemu68k.a $(M68KOBJS) $(TRANSOBJS) |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
40 |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
41 trans : trans.o $(M68KOBJS) $(TRANSOBJS) |
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
42 $(CC) -o trans trans.o $(M68KOBJS) $(TRANSOBJS) |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
229
diff
changeset
|
43 |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
44 transz80 : transz80.o $(Z80OBJS) $(TRANSOBJS) |
505
b7b7a1cab44a
The local clone on my laptop got messed up and some changes had not been pushed. This commit represents the status of the working copy from that clone. It unfortunately contains some changes that I did not intend to commit yet, but this seems like the best option at the moment.
Michael Pavone <pavone@retrodev.com>
parents:
495
diff
changeset
|
45 $(CC) -o transz80 transz80.o $(Z80OBJS) $(TRANSOBJS) |
18
3e7bfde7606e
M68K to x86 translation works for a limited subset of instructions and addressing modes
Mike Pavone <pavone@retrodev.com>
parents:
16
diff
changeset
|
46 |
419
d1bf9734ce94
Cleanup makefile and link math library
Mike Pavone <pavone@retrodev.com>
parents:
408
diff
changeset
|
47 ztestrun : ztestrun.o $(Z80OBJS) $(TRANSOBJS) |
505
b7b7a1cab44a
The local clone on my laptop got messed up and some changes had not been pushed. This commit represents the status of the working copy from that clone. It unfortunately contains some changes that I did not intend to commit yet, but this seems like the best option at the moment.
Michael Pavone <pavone@retrodev.com>
parents:
495
diff
changeset
|
48 $(CC) -o ztestrun ztestrun.o $(Z80OBJS) $(TRANSOBJS) |
292
b970ea214ecb
Added z80 test generator and z80 test runner.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
49 |
b970ea214ecb
Added z80 test generator and z80 test runner.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
50 ztestgen : ztestgen.o z80inst.o |
505
b7b7a1cab44a
The local clone on my laptop got messed up and some changes had not been pushed. This commit represents the status of the working copy from that clone. It unfortunately contains some changes that I did not intend to commit yet, but this seems like the best option at the moment.
Michael Pavone <pavone@retrodev.com>
parents:
495
diff
changeset
|
51 $(CC) -ggdb -o ztestgen ztestgen.o z80inst.o |
292
b970ea214ecb
Added z80 test generator and z80 test runner.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
52 |
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
53 stateview : stateview.o vdp.o render_sdl.o $(CONFIGOBJS) gst.o |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
54 $(CC) -o stateview stateview.o vdp.o render_sdl.o $(CONFIGOBJS) gst.o $(LDFLAGS) |
20
f664eeb55cb4
Mostly broken VDP core and savestate viewer
Mike Pavone <pavone@retrodev.com>
parents:
18
diff
changeset
|
55 |
495
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
56 vgmplay : vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) |
39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
Mike Pavone <pavone@retrodev.com>
parents:
488
diff
changeset
|
57 $(CC) -o vgmplay vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) $(LDFLAGS) |
408
a13a83934ba3
Add primitive vgm player for testing
Mike Pavone <pavone@retrodev.com>
parents:
407
diff
changeset
|
58 |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
59 testgst : testgst.o gst.o |
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
60 $(CC) -o testgst testgst.o gst.o |
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
61 |
16 | 62 test_x86 : test_x86.o gen_x86.o |
63 $(CC) -o test_x86 test_x86.o gen_x86.o | |
64 | |
65 gen_fib : gen_fib.o gen_x86.o mem.o | |
66 $(CC) -o gen_fib gen_fib.o gen_x86.o mem.o | |
240
ed540dd4cf2b
Add header dependencies to offsets
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
67 |
ed540dd4cf2b
Add header dependencies to offsets
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
68 offsets : offsets.c z80_to_x86.h m68k_to_x86.h |
ed540dd4cf2b
Add header dependencies to offsets
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
69 $(CC) -o offsets offsets.c |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
70 |
16 | 71 %.o : %.S |
72 $(CC) -c -o $@ $< | |
73 | |
74 %.o : %.c | |
229
d60837a7d18a
Improve color rendering accuracy and optimize SDL renderer a bit
Mike Pavone <pavone@retrodev.com>
parents:
208
diff
changeset
|
75 $(CC) $(CFLAGS) -c -o $@ $< |
18
3e7bfde7606e
M68K to x86 translation works for a limited subset of instructions and addressing modes
Mike Pavone <pavone@retrodev.com>
parents:
16
diff
changeset
|
76 |
3e7bfde7606e
M68K to x86 translation works for a limited subset of instructions and addressing modes
Mike Pavone <pavone@retrodev.com>
parents:
16
diff
changeset
|
77 %.bin : %.s68 |
92
c3d034e076ee
Fix some bugs in emulation of CLR
Mike Pavone <pavone@retrodev.com>
parents:
54
diff
changeset
|
78 vasmm68k_mot -Fbin -m68000 -no-opt -spaces -o $@ $< |
16 | 79 |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
80 %.bin : %.sz8 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
81 vasmz80_mot -Fbin -spaces -o $@ $< |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
118
diff
changeset
|
82 |
16 | 83 clean : |
20
f664eeb55cb4
Mostly broken VDP core and savestate viewer
Mike Pavone <pavone@retrodev.com>
parents:
18
diff
changeset
|
84 rm -rf dis trans stateview test_x86 gen_fib *.o |