Mercurial > repos > blastem
changeset 1505:f5d693bd694a
Enable LTO on certain targets that don't need the full LDFLAGS by splitting out the optimization flags into a separate var
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 31 Dec 2017 09:53:33 -0800 |
parents | 2e6320d261ff |
children | 36732f5c2281 5eb954b76e65 2a5649a767e7 |
files | Makefile |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Thu Oct 19 03:21:24 2017 -0700 +++ b/Makefile Sun Dec 31 09:53:33 2017 -0800 @@ -65,18 +65,18 @@ endif #Windows ifdef DEBUG -CFLAGS:=-ggdb $(CFLAGS) -LDFLAGS:=-ggdb $(LDFLAGS) +OPT:=-ggdb -Og else ifdef NOLTO -CFLAGS:=-O2 $(CFLAGS) -LDFLAGS:=-O2 $(LDFLAGS) +OPT:=-O2 else -CFLAGS:=-O2 -flto $(CFLAGS) -LDFLAGS:=-O2 -flto $(LDFLAGS) +OPT:=-O2 -flto endif #NOLTO endif #DEBUG +CFLAGS:=$(OPT) $(CFLAGS) +LDFLAGS:=$(OPT) $(LDFLAGS) + ifdef Z80_LOG_ADDRESS CFLAGS+= -DZ80_LOG_ADDRESS endif @@ -166,7 +166,7 @@ $(CC) -o $@ $^ $(LDFLAGS) dis$(EXE) : dis.o 68kinst.o tern.o vos_program_module.o - $(CC) -o $@ $^ + $(CC) -o $@ $^ $(OPT) jagdis : jagdis.o jagcpu.o tern.o $(CC) -o $@ $^ @@ -178,13 +178,13 @@ ar rcs libemu68k.a $(M68KOBJS) $(TRANSOBJS) trans : trans.o serialize.o $(M68KOBJS) $(TRANSOBJS) util.o - $(CC) -o trans trans.o $(M68KOBJS) $(TRANSOBJS) util.o + $(CC) -o trans trans.o $(M68KOBJS) $(TRANSOBJS) util.o $(OPT) transz80 : transz80.o $(Z80OBJS) $(TRANSOBJS) $(CC) -o transz80 transz80.o $(Z80OBJS) $(TRANSOBJS) ztestrun : ztestrun.o serialize.o $(Z80OBJS) $(TRANSOBJS) - $(CC) -o ztestrun ztestrun.o $(Z80OBJS) $(TRANSOBJS) + $(CC) -o ztestrun ztestrun.o $(Z80OBJS) $(TRANSOBJS) $(OPT) ztestgen : ztestgen.o z80inst.o $(CC) -ggdb -o ztestgen ztestgen.o z80inst.o @@ -198,7 +198,7 @@ $(FIXUP) ./$@ blastcpm : blastcpm.o util.o serialize.o $(Z80OBJS) $(TRANSOBJS) - $(CC) -o $@ $^ + $(CC) -o $@ $^ $(OPT) test : test.o vdp.o $(CC) -o test test.o vdp.o