o mac compiles

This commit is contained in:
David Voswinkel 2009-05-12 23:17:44 +02:00
parent 571737d59b
commit 3063b354e7
18 changed files with 75 additions and 60 deletions

View File

@ -2,7 +2,7 @@ include lib/nall/Makefile
ui = ui_qt
platform=x
platform=mac
compiler=gcc
enable_gzip=false
@ -12,26 +12,46 @@ enable_gzip=false
c := $(compiler)
cpp := $(subst cc,++,$(compiler))
flags := -ggdb -O3 -fomit-frame-pointer -Ilib \
-I/Developer/SDKs/Qt/include \
-I/Developer/SDKs/Qt/include/QtCore \
-I/Developer/SDKs/Qt/include/QtGui \
-I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers \
-I/System/Library/Frameworks/AGL.framework/Headers \
-I/Developer/SDKs/Qt/include/QtOpenGL -I/usr/X11R6/include
flags := -ggdb -O3 -fomit-frame-pointer -Ilib
link :=
# profile-guided instrumentation:
# flags += -fprofile-generate
# link += -lgcov
# profile-guided optimization:
#flags += -fprofile-use
################
### platform ###
################
ifeq ($(platform),mac)
flags +=-I/Developer/SDKs/Qt/include \
-I/Developer/SDKs/Qt/include/QtCore \
-I/Developer/SDKs/Qt/include/QtGui \
-I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers \
-I/System/Library/Frameworks/AGL.framework/Headers \
-I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers \
-I/usr/X11R6/include \
-I/opt/local/include
link += -lz \
-lm \
-lao \
-framework ApplicationServices \
-framework OpenGL \
-framework OpenAL \
-framework AGL \
-L/opt/local/lib \
-lSDL -Wl,-framework,Cocoa \
-lXext \
-lgl \
-lX11
#ruby := video.glx video.sdl
#ruby += audio.openal audio.ao
#ruby += input.sdl
#-DVIDEO_GLX -DVIDEO_XV -DVIDEO_SDL -DAUDIO_ALS
#-DAUDIO_OPENAL -DAUDIO_OSS -DAUDIO_PULSEAUDIO
#-DAUDIO_AO -DINPUT_SDL -DINPUT_X
flags += -DVIDEO_SDL -DINPUT_SDL -DVIDEO_GLX -DAUDIO_AO -DAUDIO_OPENAL
endif
ifeq ($(platform),x)
ruby := video.glx video.xv video.sdl
ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.ao
@ -42,12 +62,9 @@ else ifeq ($(platform),win)
ruby += input.rawinput input.directinput
link += -mwindows
# link += -mconsole
link += -luuid -lkernel32 -luser32 -lgdi32 -lshell32
# statically link Qt for Windows build
link += -enable-stdcall-fixup -Wl,-s -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
else
unknown_platform: help;
endif
############
@ -110,8 +127,6 @@ all: build;
include $(ui)/Makefile
objects := $(patsubst %,obj/%.o,$(objects))
rubydef := $(foreach c,$(subst .,_,$(call strupper,$(ruby))),-D$c)
#-DVIDEO_GLX -DVIDEO_XV -DVIDEO_SDL -DAUDIO_ALSA -DAUDIO_OPENAL -DAUDIO_OSS -DAUDIO_PULSEAUDIO -DAUDIO_AO -DINPUT_SDL -DINPUT_X
rubydef =-DVIDEO_SDL -DINPUT_SDL
#################
### libraries ###
#################
@ -236,13 +251,7 @@ install:
install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop
clean: ui_clean
-@$(call delete,obj/*.o)
-@$(call delete,*.res)
-@$(call delete,*.pgd)
-@$(call delete,*.pgc)
-@$(call delete,*.ilk)
-@$(call delete,*.pdb)
-@$(call delete,*.manifest)
rm obj/*.o
help:
@echo "Usage: $(MAKE) platform=(os) compiler=(cc) [options]"

View File

@ -1,6 +1,10 @@
#ifdef __APPLE__
#include <al.h>
#include <alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif
namespace ruby {
#include "openal.hpp"

View File

@ -97,7 +97,7 @@ public:
}
bool init() {
display = XOpenDisplay(0);
//display = XOpenDisplay(0);
char env[512];
sprintf(env, "SDL_WINDOWID=%ld", settings.handle);

View File

@ -11,14 +11,16 @@ endif
ifeq ($(platform),x)
#qtflags = `pkg-config --cflags QtCore QtGui`
link += `pkg-config --libs QtCore QtGui`
qtflags = -I/Developer/SDKs/Qt/include -I/Developer/SDKs/Qt/include/QtCore -I/Developer/SDKs/Qt/include/QtGui -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I/Developer/SDKs/Qt/include/QtOpenGL
link = -F/Developer/SDKs/Qt/lib -L/Developer/SDKs/Qt/lib -framework QtOpenGL -L/Developer/SDKs/Qt/lib -F/Developer/SDKs/Qt/lib -framework QtGui -framework Carbon -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices -framework OpenGL -framework AGL -L/opt/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lXext -lX11 -lz
link = -F/Developer/SDKs/Qt/lib -L/Developer/SDKs/Qt/lib -framework QtOpenGL -L/Developer/SDKs/Qt/lib -F/Developer/SDKs/Qt/lib -framework QtGui -framework Carbon -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices -framework OpenGL -framework AGL -L/opt/local/lib -lSDL -Wl,-framework,Cocoa -lXext -lX11 -lz -lgl
else ifeq ($(platform),mac)
qtflags = -I/Developer/SDKs/Qt/include \
-I/Developer/SDKs/Qt/include/QtCore \
-I/Developer/SDKs/Qt/include/QtGui
link += -F/Developer/SDKs/Qt/lib \
-L/Developer/SDKs/Qt/lib \
-framework QtGui \
-framework Carbon \
-framework AppKit \
-framework QtCore
else ifeq ($(platform),win)
ifeq ($(qtpath),)
# find Qt install directory from PATH environment variable

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'about.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'htmlviewer.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'loader.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'main.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Resource object code
**
** Created: Sun May 10 13:18:11 2009
** Created: Tue May 12 22:50:12 2009
** by: The Resource Compiler for Qt version 4.4.3
**
** WARNING! All changes made in this file will be lost!
@ -10,7 +10,7 @@
#include <QtCore/qglobal.h>
static const unsigned char qt_resource_data[] = {
// /Users/david/Devel/arch/snes/tools/bsnes_v046/data/bsnes.png
// /Users/david/Devel/arch/avr/code/snesram/tools/bsnes/data/bsnes.png
0x0,0x0,0x5,0x58,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
@ -99,7 +99,7 @@ static const unsigned char qt_resource_data[] = {
0xc4,0x61,0x33,0x7e,0x6,0x76,0x38,0x47,0x2d,0x59,0x64,0x91,0x45,0x16,0x59,0x74,
0x4,0xfe,0x5,0x58,0xa9,0xdf,0x6f,0x25,0x7,0x15,0xfd,0x0,0x0,0x0,0x0,0x49,
0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /Users/david/Devel/arch/snes/tools/bsnes_v046/data/logo.png
// /Users/david/Devel/arch/avr/code/snesram/tools/bsnes/data/logo.png
0x0,0x0,0x41,0x5d,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
@ -1148,7 +1148,7 @@ static const unsigned char qt_resource_data[] = {
0x17,0x2e,0x5c,0xb8,0x70,0xe1,0xc2,0x85,0xb,0x17,0x2e,0x5c,0xb8,0x70,0xe1,0xc2,
0x85,0xb,0x17,0x2e,0xa1,0x90,0xff,0x3,0x15,0x25,0x67,0x62,0x74,0x7b,0xa4,0xa3,
0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /Users/david/Devel/arch/snes/tools/bsnes_v046/data/documentation.html
// /Users/david/Devel/arch/avr/code/snesram/tools/bsnes/data/documentation.html
0x0,0x0,0x9,0xc0,
0x3c,
0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x68,0x74,0x6d,0x6c,0x3e,0xa,0x3c,
@ -1307,7 +1307,7 @@ static const unsigned char qt_resource_data[] = {
0x6c,0x6c,0x3b,0x20,0x54,0x52,0x41,0x43,0x3c,0x62,0x72,0x3e,0xa,0x26,0x62,0x75,
0x6c,0x6c,0x3b,0x20,0x7a,0x6f,0x6e,0x65,0x73,0x3c,0x62,0x72,0x3e,0xa,0xa,0x3c,
0x2f,0x62,0x6f,0x64,0x79,0x3e,0xa,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,0xa,
// /Users/david/Devel/arch/snes/tools/bsnes_v046/data/license.html
// /Users/david/Devel/arch/avr/code/snesram/tools/bsnes/data/license.html
0x0,0x0,0xf,0x51,
0x3c,
0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x68,0x74,0x6d,0x6c,0x3e,0xa,0x3c,
@ -1556,7 +1556,7 @@ static const unsigned char qt_resource_data[] = {
0x3c,0x2f,0x74,0x72,0x3e,0xa,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0xa,0xa,
0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0xa,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,0xa,
// /Users/david/Devel/arch/snes/tools/bsnes_v046/data/joypad.png
// /Users/david/Devel/arch/avr/code/snesram/tools/bsnes/data/joypad.png
0x0,0x1,0x91,0x7a,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'advanced.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'audio.mh'
**
** Created: Sun May 10 13:18:12 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'cheateditor.mh'
**
** Created: Sun May 10 13:18:13 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'input.mh'
**
** Created: Sun May 10 13:18:13 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'paths.mh'
**
** Created: Sun May 10 13:18:13 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'settings.mh'
**
** Created: Sun May 10 13:18:13 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'codeeditor.mh'
**
** Created: Sun May 10 13:18:13 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'inputcapture.mh'
**
** Created: Sun May 10 13:18:14 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'video.mh'
**
** Created: Sun May 10 13:18:14 2009
** Created: Tue May 12 22:50:12 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!