annotate Makefile @ 8:5176efdda5ae

Initial work on VDP emulation
author Michael Pavone <pavone@retrodev.com>
date Sun, 27 Mar 2016 00:24:31 -0700
parents 8f9a05e2e425
children a3f14b00aead
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 all : $(TARGETDIR)/s16
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11
7
8f9a05e2e425 Added clean rule
Michael Pavone <pavone@retrodev.com>
parents: 6
diff changeset
12 clean :
8f9a05e2e425 Added clean rule
Michael Pavone <pavone@retrodev.com>
parents: 6
diff changeset
13 rm -f $(TARGETDIR)/*.o $(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
8
5176efdda5ae Initial work on VDP emulation
Michael Pavone <pavone@retrodev.com>
parents: 7
diff changeset
15 $(TARGETDIR)/s16 : $(TARGETDIR)/main.o $(TARGETDIR)/cpu.o $(TARGETDIR)/vdp.o
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 $(CC) -o $@ $^ $(LDFLAGS)
6
74a6d629b78f Added assembler. Removed hand-assembled version of hello world example
Michael Pavone <pavone@retrodev.com>
parents: 0
diff changeset
17
74a6d629b78f Added assembler. Removed hand-assembled version of hello world example
Michael Pavone <pavone@retrodev.com>
parents: 0
diff changeset
18 $(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
19 $(CC) -o $@ $^ $(LDFLAGS)
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 $(TARGETDIR)/%.o : src/%.c
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 $(CC) $(CFLAGS) -c -o $@ $<