Mercurial > repos > simple16
annotate Makefile @ 22:407725d9a02f
Implemented sprite drawing. Added small sprite example.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 30 Mar 2016 19:55:48 -0700 |
parents | 04d8efe7a1f0 |
children | 4c9dbfa30a66 |
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 |
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
|
21 $(TARGETDIR)/s16 : $(TARGETDIR)/main.o $(TARGETDIR)/cpu.o $(TARGETDIR)/vdp.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 |
74a6d629b78f
Added assembler. Removed hand-assembled version of hello world example
Michael Pavone <pavone@retrodev.com>
parents:
0
diff
changeset
|
24 $(TARGETDIR)/asm : $(TARGETDIR)/asm.o $(TARGETDIR)/cpu.o |
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 $@ $< |