From: Rafael Gaitán Linares Date: Mon, 7 Dec 2009 01:40:52 +0000 (+0100) Subject: added more flags X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=b8c5c67dcf38654ee835310b517c129d15c2b500;p=fov120.git added more flags --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 81d9f0d..1747f5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,10 @@ CONFIGURE_DEFAULTS() FIND_PACKAGE(OpenGL) FIND_PACKAGE(SDL) +FIND_PACKAGE(Threads) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -Os -std=c99 -fomit-frame-pointer -ffast-math -Wall -DX86_ASM -fno-strict-aliasing -DDEBUG") +SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -m32 -nostdlib -nostartfiles") link_directories(${LIBRARY_OUTPUT_PATH}) @@ -39,6 +43,9 @@ include_directories( SET(LIBRARIES ${SDL_LIBRARIES} ${OPENGL_LIBRARIES} + m + dl + ${CMAKE_THREAD_LIBS_INIT} ) SETUP_DEMO_LAUNCHER(${DEMO_NAME}) diff --git a/main.c b/main.c index 12cafac..03349b0 100644 --- a/main.c +++ b/main.c @@ -331,7 +331,7 @@ fn.glUseProgram(0); } #ifdef DEBUG -int main() +int main(int argc, char **argv) #else void __attribute__((externally_visible)) _start(void) #endif @@ -376,7 +376,7 @@ void __attribute__((externally_visible)) _start(void) } while(event.type != SDL_KEYDOWN); fn.SDL_Quit(); - + #if 1 __asm__("xorl %eax, %eax\n\t" "incl %eax\n\t" @@ -384,5 +384,6 @@ void __attribute__((externally_visible)) _start(void) #else exit(0); #endif + return 0; }