Mercurial > repos > simple16
annotate Makefile @ 27:351a0d0cce3b
Updated spec to make the 3rd and 4th controller IO ports as reserved
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 01 Apr 2016 21:51:46 -0700 |
parents | fb14515266f4 |
children | c677507682e3 |
rev | line source |
---|---|
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 ifdef DEBUG |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 CFLAGS:=-ggdb $(CFLAGS) |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 LDFLAGS:=-ggdb $(LDFLAGS) |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 TARGETDIR:=debug |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 else |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 CFLAGS:=-O2 |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 TARGETDIR:=release |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 endif #DEBUG |
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 |
11
04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
Michael Pavone <pavone@retrodev.com>
parents:
9
diff
changeset
|
10 CFLAGS:=$(shell pkg-config --cflags-only-I sdl2) $(CFLAGS) |
04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
Michael Pavone <pavone@retrodev.com>
parents:
9
diff
changeset
|
11 LDFLAGS:=$(shell pkg-config --libs sdl2) |
04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
Michael Pavone <pavone@retrodev.com>
parents:
9
diff
changeset
|
12 |
04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
Michael Pavone <pavone@retrodev.com>
parents:
9
diff
changeset
|
13 all : $(TARGETDIR) $(TARGETDIR)/s16 $(TARGETDIR)/asm |
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 |
7 | 15 clean : |
16 rm -f $(TARGETDIR)/*.o $(TARGETDIR)/s16 $(TARGETDIR)/asm | |
9
a3f14b00aead
Modified Makefile to automatically create target directories if they don't already exist
Michael Pavone <pavone@retrodev.com>
parents:
8
diff
changeset
|
17 |
a3f14b00aead
Modified Makefile to automatically create target directories if they don't already exist
Michael Pavone <pavone@retrodev.com>
parents:
8
diff
changeset
|
18 $(TARGETDIR) : |
a3f14b00aead
Modified Makefile to automatically create target directories if they don't already exist
Michael Pavone <pavone@retrodev.com>
parents:
8
diff
changeset
|
19 mkdir $(TARGETDIR) |
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 |
25
fb14515266f4
Implemented timer and timer interrupts. Added get/setvbr instructions. Fixed assembler bug. Moved mnemonics into a separate source file
Michael Pavone <pavone@retrodev.com>
parents:
24
diff
changeset
|
21 $(TARGETDIR)/s16 : $(TARGETDIR)/main.o $(TARGETDIR)/cpu.o $(TARGETDIR)/vdp.o $(TARGETDIR)/audio.o $(TARGETDIR)/timer.o $(TARGETDIR)/system_sdl.o |
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 $(CC) -o $@ $^ $(LDFLAGS) |
6
74a6d629b78f
Added assembler. Removed hand-assembled version of hello world example
Michael Pavone <pavone@retrodev.com>
parents:
0
diff
changeset
|
23 |
25
fb14515266f4
Implemented timer and timer interrupts. Added get/setvbr instructions. Fixed assembler bug. Moved mnemonics into a separate source file
Michael Pavone <pavone@retrodev.com>
parents:
24
diff
changeset
|
24 $(TARGETDIR)/asm : $(TARGETDIR)/asm.o $(TARGETDIR)/mnemonics.o |
6
74a6d629b78f
Added assembler. Removed hand-assembled version of hello world example
Michael Pavone <pavone@retrodev.com>
parents:
0
diff
changeset
|
25 $(CC) -o $@ $^ $(LDFLAGS) |
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 |
11
04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
Michael Pavone <pavone@retrodev.com>
parents:
9
diff
changeset
|
27 $(TARGETDIR)/%.o : src/%.c |
0
7e44f7d5810b
Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 $(CC) $(CFLAGS) -c -o $@ $< |