SDLを入れてみる
最近はCygwinもデフォルトで対応なんですなあ…いや、私が SDL 始めたころからそうだったけどさ。
(1) まずはご本家へ:http://www.libsdl.org/index.php
(2) 左の "Download" から "SDL 1.2" をクリックしてダウンロードページへ。本日現在、1.2.9が安定版らしい。今回は、開発用のmingw32ビルド、"SDL-devel-1.2.9-mingw32.tar.gz"を落とす。落とし終わったら、MSYSのホームディレクトリに置く。場所は "C:\msys\1.0\home\ユーザ名" とかそのあたり。
(3) MSYSを起動する。
(4) ダウンロードした tar ball を解凍し、出来上がった SDL-1.2.9 ディレクトリに移動する。そんでもって "make" する。
$ tar xvzf SDL-devel-1.2.9-mingw32.tar.gz $ cd SDL-1.2.9 && make Type "make native" to install to /usr Type "make cross" to install to /usr/local/cross-tools/i386-mingw32msvc/
ふーむ、クロスコンパイルする気はないので、"make native"なんだろう。
(5) その前にMakefileにパッチを当てておく:
*** Makefile.org Sun Nov 13 17:20:58 2005 --- Makefile Sun Nov 13 17:20:32 2005 *************** all: *** 9,22 **** @echo "Type \"make cross\" to install to $(CROSS_PATH)" native: ! make install prefix=/usr cross: ! make install prefix=$(CROSS_PATH) ! install: cp -rv bin include lib share $(prefix)/ ! @ln -sf i386-mingw32msvc-sdl-config $(prefix)bin/sdl-config dist: @test -d bin || mkdir bin --- 9,22 ---- @echo "Type \"make cross\" to install to $(CROSS_PATH)" native: ! make install0 prefix=/usr cross: ! make install0 prefix=$(CROSS_PATH) ! install0: cp -rv bin include lib share $(prefix)/ ! @ln -sf $(prefix)/bin/i386-mingw32msvc-sdl-config $(prefix)/bin/sdl-config dist: @test -d bin || mkdir bin
うーん、このMakefileって誰もチェックしてないんだろうか…。
(6) 気を取り直して "make native" する。
(7) "sdl-config" コマンドが動作すれば("Usage ..."と出れば)うまく行ったということみたいです。