Mercurial > repos > blastem
comparison Makefile @ 495:39cad98d2789
Allow OpenGL support to be disabled at compile time. Move generic utility functions out of config.c
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 28 Oct 2013 19:37:30 -0700 |
parents | 32f053ad9b02 |
children | b7b7a1cab44a |
comparison
equal
deleted
inserted
replaced
492:dffc07104b09 | 495:39cad98d2789 |
---|---|
1 ifdef NOGL | |
2 LIBS=sdl | |
3 else | |
1 LIBS=sdl glew gl | 4 LIBS=sdl glew gl |
5 endif | |
2 LDFLAGS=-lm `pkg-config --libs $(LIBS)` | 6 LDFLAGS=-lm `pkg-config --libs $(LIBS)` |
3 ifdef DEBUG | 7 ifdef DEBUG |
4 CFLAGS=-ggdb -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type | 8 CFLAGS=-ggdb -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type |
5 else | 9 else |
6 CFLAGS=-O2 -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type | 10 CFLAGS=-O2 -std=gnu99 `pkg-config --cflags-only-I $(LIBS)` -Wreturn-type -Werror=return-type |
8 | 12 |
9 ifdef PROFILE | 13 ifdef PROFILE |
10 CFLAGS+= -pg | 14 CFLAGS+= -pg |
11 LDFLAGS+= -pg | 15 LDFLAGS+= -pg |
12 endif | 16 endif |
17 ifdef NOGL | |
18 CFLAGS+= -DDISABLE_OPENGL | |
19 endif | |
13 | 20 |
14 TRANSOBJS=gen_x86.o x86_backend.o mem.o | 21 TRANSOBJS=gen_x86.o x86_backend.o mem.o |
15 M68KOBJS=68kinst.o m68k_to_x86.o runtime.o | 22 M68KOBJS=68kinst.o m68k_to_x86.o runtime.o |
16 Z80OBJS=z80inst.o z80_to_x86.o zruntime.o | 23 Z80OBJS=z80inst.o z80_to_x86.o zruntime.o |
17 AUDIOOBJS=ym2612.o psg.o wave.o | 24 AUDIOOBJS=ym2612.o psg.o wave.o |
25 CONFIGOBJS=config.o tern.o util.o | |
18 | 26 |
19 all : dis zdis stateview vgmplay blastem | 27 all : dis zdis stateview vgmplay blastem |
20 | 28 |
21 blastem : blastem.o vdp.o render_sdl.o io.o config.o tern.o gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) | 29 blastem : blastem.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) |
22 $(CC) -ggdb -o blastem blastem.o vdp.o render_sdl.o io.o config.o tern.o gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(LDFLAGS) | 30 $(CC) -ggdb -o blastem blastem.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(LDFLAGS) |
23 | 31 |
24 dis : dis.o 68kinst.o | 32 dis : dis.o 68kinst.o |
25 $(CC) -o dis dis.o 68kinst.o | 33 $(CC) -o dis dis.o 68kinst.o |
26 | 34 |
27 zdis : zdis.o z80inst.o | 35 zdis : zdis.o z80inst.o |
40 $(CC) -o ztestrun $(Z80OBJS) $(TRANSOBJS) | 48 $(CC) -o ztestrun $(Z80OBJS) $(TRANSOBJS) |
41 | 49 |
42 ztestgen : ztestgen.o z80inst.o | 50 ztestgen : ztestgen.o z80inst.o |
43 $(CC) -o ztestgen ztestgen.o z80inst.o | 51 $(CC) -o ztestgen ztestgen.o z80inst.o |
44 | 52 |
45 stateview : stateview.o vdp.o render_sdl.o config.o tern.o gst.o | 53 stateview : stateview.o vdp.o render_sdl.o $(CONFIGOBJS) gst.o |
46 $(CC) -o stateview stateview.o vdp.o render_sdl.o config.o tern.o gst.o `pkg-config --libs $(LIBS)` | 54 $(CC) -o stateview stateview.o vdp.o render_sdl.o $(CONFIGOBJS) gst.o $(LDFLAGS) |
47 | 55 |
48 vgmplay : vgmplay.o render_sdl.o config.o tern.o $(AUDIOOBJS) | 56 vgmplay : vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) |
49 $(CC) -o vgmplay vgmplay.o render_sdl.o config.o tern.o $(AUDIOOBJS) $(LDFLAGS) | 57 $(CC) -o vgmplay vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) $(LDFLAGS) |
50 | 58 |
51 testgst : testgst.o gst.o | 59 testgst : testgst.o gst.o |
52 $(CC) -o testgst testgst.o gst.o | 60 $(CC) -o testgst testgst.o gst.o |
53 | 61 |
54 test_x86 : test_x86.o gen_x86.o | 62 test_x86 : test_x86.o gen_x86.o |