INCLUDE(Macros)\r
\r
OPTION(USE_MAIN "Enable to activate aggressive warnings" OFF)\r
+\r
IF(USE_MAIN)\r
- ADD_DEFINITIONS(-DCRSFX_LIBRARY)\r
+ ADD_DEFINITIONS(-DUSE_MAIN)\r
ENDIF(USE_MAIN)\r
\r
ADD_DEFINITIONS(-DX86_ASM)\r
\r
+SET(4K_C_FLAGS "-m32 -Os -std=c99 -ffast-math -Wall -fno-strict-aliasing")\r
+\r
+SET(CMAKE_C_FLAGS ${4K_C_FLAGS} \r
+ CACHE STRING "Flags used by the compiler during all build types." FORCE)\r
+\r
IF(APPLE)\r
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -Os -std=c99 -fomit-frame-pointer -ffast-math -Wall -fno-strict-aliasing"\r
- CACHE STRING "Flags used by the compiler during all build types." FORCE)\r
SET(CMAKE_EXE_LINKER_FLAGS "-m32" CACHE STRING "Flags used by the linker during all build types." FORCE)\r
ELSE(APPLE)\r
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -Os -std=c99 -fomit-frame-pointer -ffast-math -Wall -fno-strict-aliasing"\r
- CACHE STRING "Flags used by the compiler during all build types." FORCE)\r
SET(CMAKE_EXE_LINKER_FLAGS "-m32 -nostdlib" CACHE STRING "Flags used by the linker during all build types." FORCE)\r
- IF(USE_MAIN)\r
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostartfiles")\r
- ENDIF(USE_MAIN)\r
+ IF(NOT USE_MAIN)\r
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostartfiles" CACHE STRING "Flags used by the linker during all build types." FORCE)\r
+ ENDIF(NOT USE_MAIN)\r
ENDIF(APPLE)\r
\r
CONFIGURE_DEFAULTS()\r