diff Makefile @ 426:add9e2f5c0e3

Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
author Mike Pavone <pavone@retrodev.com>
date Sun, 30 Jun 2013 11:45:58 -0700
parents d1bf9734ce94
children 7f84090ab1cd
line wrap: on
line diff
--- a/Makefile	Sat Jun 29 17:21:19 2013 -0700
+++ b/Makefile	Sun Jun 30 11:45:58 2013 -0700
@@ -1,10 +1,16 @@
 LIBS=sdl
+LDFLAGS=-lm `pkg-config --libs $(LIBS)`
 ifdef DEBUG
 CFLAGS=-ggdb -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type
 else
 CFLAGS=-O2 -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type
 endif
 
+ifdef PROFILE
+CFLAGS+= -pg
+LDFLAGS+= -pg
+endif
+
 TRANSOBJS=gen_x86.o x86_backend.o mem.o
 M68KOBJS=68kinst.o m68k_to_x86.o runtime.o
 Z80OBJS=z80inst.o z80_to_x86.o zruntime.o
@@ -13,7 +19,7 @@
 all : dis trans stateview blastem
 
 blastem : blastem.o vdp.o render_sdl.o io.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS)
-	$(CC) -ggdb -o blastem  blastem.o vdp.o render_sdl.o io.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) -lm `pkg-config --libs $(LIBS)`
+	$(CC) -ggdb -o blastem  blastem.o vdp.o render_sdl.o io.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(LDFLAGS)
 
 dis : dis.o 68kinst.o
 	$(CC) -o dis dis.o 68kinst.o