渡さないといけない環境変数は自分の場合これだけなので、これをあらかじめ
build-macosx
と build-macosx-sdl2
に書いておく(必要があるかはともかく):
export CC=clang-mp-3.7 export CXX=clang++-mp-3.7 export CPPFLAGS='-I/opt/local/include -stdlib=libc++' export LIBS='-stdlib=libc++' # SDL1.x の場合 export LIBS='-stdlib=libc++ -framework CoreFoundation -framework CoreServices' # SDL2.x の場合
./configure
に渡すオプションも同様に書き足しておく。XQuartzのインストールされた場所なので(当然)人によって違う。要らんかも:
--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
以下の内容のパッチdrive_local-OSXMountainLion.patch
を、解凍したソースコードのルートに置く:
パッチを当てる:--- src/dos/drive_local.cpp 2018-05-03 23:47:07.000000000 +0900 +++ src/dos/drive_local.cpp 2018-05-09 01:18:51.000000000 +0900 @@ -31,6 +31,9 @@ #include"inout.h" #ifndef WIN32 #include<utime.h> +# if defined(__APPLE__) && defined(__MACH__) +# include<sys/syslimits.h> +# endif #else #include<sys/utime.h> #include<sys/locking.h>
$ patch -b -p0 < drive_local-OSXMountainLion.patch
最後にビルドする:
-
SDL 1.x:
$ ./build-macosx
-
SDL 2.x:
$ ./build-macosx-sdl2

0 件のコメント:
コメントを投稿