comparison Makefile @ 735:539d12fa6a4d

Add a define in both the source and Makefile for enabling logging of z80 instruction address/cycle counts. Fix Z80 in/out instructions to eliminate assumptions about which registers are stored in native regs. Fix read_16 to not corrupt the low byte when the read has to call into a C function.
author Michael Pavone <pavone@retrodev.com>
date Mon, 25 May 2015 18:56:22 -0700
parents 59a98179d3ba
children fc68992cf18d
comparison
equal deleted inserted replaced
734:e21c274a008e 735:539d12fa6a4d
12 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration 12 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration
13 LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) 13 LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS))
14 else 14 else
15 CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration 15 CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration
16 LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) 16 LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS))
17 endif
18
19 ifdef Z80_LOG_ADDRESS
20 CFLAGS+= -DZ80_LOG_ADDRESS
17 endif 21 endif
18 22
19 ifdef PROFILE 23 ifdef PROFILE
20 CFLAGS+= -pg 24 CFLAGS+= -pg
21 LDFLAGS+= -pg 25 LDFLAGS+= -pg