Mercurial > repos > blastem
comparison Makefile @ 559:6b248602ab84
blastem builds and almost works on OS X now
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 17 Jun 2014 01:50:29 -0400 |
parents | acec5464fa1e |
children | 7ed1dbb48f61 |
comparison
equal
deleted
inserted
replaced
558:dc9f178085a0 | 559:6b248602ab84 |
---|---|
1 ifndef OS | |
2 OS:=$(shell uname -s) | |
3 endif | |
4 | |
1 ifdef NOGL | 5 ifdef NOGL |
2 LIBS=sdl | 6 LIBS=sdl |
3 else | 7 else |
8 ifeq ($(OS),Darwin) | |
9 LIBS=sdl glew | |
10 else | |
4 LIBS=sdl glew gl | 11 LIBS=sdl glew gl |
5 endif | 12 endif |
13 endif | |
14 | |
6 LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) | 15 LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) |
7 ifdef DEBUG | 16 ifdef DEBUG |
8 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type | 17 CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type |
9 else | 18 else |
10 CFLAGS:=-O2 -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type | 19 CFLAGS:=-O2 -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type |
20 | 29 |
21 ifndef CPU | 30 ifndef CPU |
22 CPU:=$(shell uname -m) | 31 CPU:=$(shell uname -m) |
23 endif | 32 endif |
24 | 33 |
25 | 34 ifeq ($(OS),Darwin) |
35 LDFLAGS+= -framework OpenGL | |
36 endif | |
26 | 37 |
27 TRANSOBJS=gen_x86.o backend.o mem.o | 38 TRANSOBJS=gen_x86.o backend.o mem.o |
28 M68KOBJS=68kinst.o m68k_to_x86.o | 39 M68KOBJS=68kinst.o m68k_to_x86.o |
29 ifeq ($(CPU),x86_64) | 40 ifeq ($(CPU),x86_64) |
30 M68KOBJS+= runtime.o | 41 M68KOBJS+= runtime.o |