project SDLAda_Mac is Version := "2.2.0"; type Platform_Type is ("linux", "bsd", "windows", "macosx", "ios", "android"); type Mode_Type is ("debug", "release"); type Build_Type is ("static", "shared"); Platform : Platform_Type := external ("SDL_PLATFORM", "macosx"); Mode : Mode_Type := external ("SDL_MODE", "debug"); Build : Build_Type := external ("SDL_BUILD", "shared"); for Languages use ("Ada", "C"); for Source_Dirs use ("../../src", "../../src/" & Platform, "gen/src/"); for Library_Name use "sdlada"; for Object_Dir use "gen/" & Build & "." & Mode & "/lib/.obj"; for Library_Dir use "gen/" & Build & "." & Mode & "/lib"; for Library_Version use "libsdlada.so." & Version; Linking_Options := ("-F", external ("HOME") & "/Library/Frameworks", "-framework", "SDL2"); case Build is when "static" => for Library_Kind use "static"; when "shared" => for Library_Kind use "relocatable"; for Library_Options use Linking_Options; end case; package Compiler is C_Switches := ("-I" & external ("HOME") & "/Library/Frameworks/SDL2.framework/Headers"); Ada_Switches := ("-gnat2012", "-gnata", "-gnato", "-gnatE", "-gnaty", "-gnatyM120"); case Mode is when "debug" => C_Switches := C_Switches & ("-O0", "-g"); Ada_Switches := Ada_Switches & ("-O0", "-g"); when "release" => C_Switches := C_Switches & ("-O2", "-g"); Ada_Switches := Ada_Switches & ("-O2", "-g"); end case; for Default_Switches ("C") use C_Switches; for Default_Switches ("Ada") use Ada_Switches; end Compiler; package Linker is for Linker_Options use Linking_Options; end Linker; end SDLAda_Mac;