Mercurial > repos > blastem
comparison Makefile @ 573:29d99db6f55d
Enable link time optimization
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 03 Mar 2014 22:16:41 -0800 |
parents | 76bba9ffe351 |
children | 5ef3fe516da9 80a67be1770b |
comparison
equal
deleted
inserted
replaced
572:0f32f52fc98e | 573:29d99db6f55d |
---|---|
1 ifdef NOGL | 1 ifdef NOGL |
2 LIBS=sdl | 2 LIBS=sdl |
3 else | 3 else |
4 LIBS=sdl glew gl | 4 LIBS=sdl glew gl |
5 endif | 5 endif |
6 LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) | |
7 ifdef DEBUG | 6 ifdef DEBUG |
8 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration | 7 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration |
8 LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) | |
9 else | 9 else |
10 CFLAGS:=-O2 -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration | 10 CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration |
11 LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) | |
11 endif | 12 endif |
12 | 13 |
13 ifdef PROFILE | 14 ifdef PROFILE |
14 CFLAGS+= -pg | 15 CFLAGS+= -pg |
15 LDFLAGS+= -pg | 16 LDFLAGS+= -pg |
59 | 60 |
60 | 61 |
61 all : dis zdis stateview vgmplay blastem | 62 all : dis zdis stateview vgmplay blastem |
62 | 63 |
63 blastem : $(MAINOBJS) | 64 blastem : $(MAINOBJS) |
64 $(CC) -ggdb -o blastem $(MAINOBJS) $(LDFLAGS) | 65 $(CC) -o blastem $(MAINOBJS) $(LDFLAGS) |
65 | 66 |
66 dis : dis.o 68kinst.o | 67 dis : dis.o 68kinst.o |
67 $(CC) -o dis dis.o 68kinst.o | 68 $(CC) -o dis dis.o 68kinst.o |
68 | 69 |
69 zdis : zdis.o z80inst.o | 70 zdis : zdis.o z80inst.o |