# HG changeset patch # User Michael Pavone # Date 1393913801 28800 # Node ID 29d99db6f55d6b67c01d5e63df70543de1b3902c # Parent 0f32f52fc98ec999f7dc2ba682c4dfeaf5134755 Enable link time optimization diff -r 0f32f52fc98e -r 29d99db6f55d Makefile --- a/Makefile Mon Mar 03 21:08:43 2014 -0800 +++ b/Makefile Mon Mar 03 22:16:41 2014 -0800 @@ -3,11 +3,12 @@ else LIBS=sdl glew gl endif -LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) ifdef DEBUG CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) else -CFLAGS:=-O2 -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) endif ifdef PROFILE @@ -61,7 +62,7 @@ all : dis zdis stateview vgmplay blastem blastem : $(MAINOBJS) - $(CC) -ggdb -o blastem $(MAINOBJS) $(LDFLAGS) + $(CC) -o blastem $(MAINOBJS) $(LDFLAGS) dis : dis.o 68kinst.o $(CC) -o dis dis.o 68kinst.o