Fixing MAC build
This commit is contained in:
parent
25d7c4f2c9
commit
cfed6d4cd8
7 changed files with 43 additions and 19 deletions
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"iostream": "cpp"
|
||||
}
|
||||
}
|
||||
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"command": "cd ~/git/polly-b-gone/&&make&&cd obj/Polly-B-Gone.app/&&./Contents/MacOS/Polly-B-Gone",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
27
Makefile
27
Makefile
|
|
@ -1,20 +1,19 @@
|
|||
CXXFLAGS = \
|
||||
-O2 \
|
||||
-I/System/Library/Frameworks/GLUT.framework/Headers \
|
||||
-I/System/Library/Frameworks/OpenGL.framework/Headers \
|
||||
-I/System/Library/Frameworks/SDL.framework/Headers \
|
||||
-I/System/Library/Frameworks/SDL_image.framework/Headers \
|
||||
-I/System/Library/Frameworks/SDL_mixer.framework/Headers \
|
||||
-I/System/Library/Frameworks/TinyXML.framework/Headers
|
||||
CXXFLAGS = -L/System/Library/Frameworks
|
||||
|
||||
LDFLAGS = \
|
||||
-L/System/Library/Frameworks \
|
||||
-I/usr/local/Cellar/tinyxml/2.6.2/include \
|
||||
-I/Library/Frameworks/SDL.framework/Headers \
|
||||
-I/Library/Frameworks/SDL_image.framework/Headers \
|
||||
-F/Library/Frameworks \
|
||||
-framework Cocoa \
|
||||
-framework GLUT \
|
||||
-framework OpenGL \
|
||||
-framework SDL \
|
||||
-framework SDL\
|
||||
-framework SDL_image \
|
||||
-framework SDL_mixer \
|
||||
-framework TinyXML
|
||||
-L/usr/local/Cellar/tinyxml/2.6.2/lib \
|
||||
-ltinyxml
|
||||
|
||||
RESOURCES = \
|
||||
resources/Polly.icns \
|
||||
|
|
@ -87,10 +86,10 @@ obj/Polly-B-Gone.app : obj/main.out $(RESOURCES) resources/Info.plist Makefile
|
|||
cp resources/Info.plist $@/Contents
|
||||
cp $(RESOURCES) $@/Contents/Resources
|
||||
mkdir -p $@/Contents/Frameworks
|
||||
cp -R /System/Library/Frameworks/SDL.framework $@/Contents/Frameworks
|
||||
cp -R /System/Library/Frameworks/SDL_image.framework $@/Contents/Frameworks
|
||||
cp -R /System/Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks
|
||||
cp -R /System/Library/Frameworks/TinyXML.framework $@/Contents/Frameworks
|
||||
cp -R /Library/Frameworks/SDL.framework $@/Contents/Frameworks
|
||||
cp -R /Library/Frameworks/SDL_image.framework $@/Contents/Frameworks
|
||||
cp -R /Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks
|
||||
cp /usr/local/Cellar/tinyxml/2.6.2/lib/libtinyxml.dylib $@/Contents/Resources
|
||||
find $@/Contents/Frameworks -name Headers | xargs rm -r
|
||||
# ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <SDL/SDL.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <TinyXML/tinyxml.h>
|
||||
#include <tinyxml.h>
|
||||
|
||||
#include "room.h"
|
||||
#include "shader.h"
|
||||
|
|
@ -25,7 +25,7 @@ static const int defaultY = 50;
|
|||
static const float kd = .060f; // frame-rate dependent
|
||||
|
||||
static bool run = true;
|
||||
static bool fullScreen = false;
|
||||
static bool fullScreen = true;
|
||||
|
||||
static World* world = NULL;
|
||||
static bool wireframe = false;
|
||||
|
|
@ -194,6 +194,10 @@ static void eventLoop() {
|
|||
int main(int argc, char** argv) {
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
|
||||
|
||||
SDL_PumpEvents();
|
||||
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <SDL/SDL_error.h>
|
||||
#include <SDL_mixer/SDL_mixer.h>
|
||||
#include <SDL/SDL_mixer.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <SDL/sdl.h>
|
||||
#include <SDL_image/SDL_image.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include <TinyXML/tinyxml.h>
|
||||
#include <tinyxml.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue