Created
May 15, 2017 11:24
-
-
Save sksat/75c1baa63c234a92732ab7445893411b to your computer and use it in GitHub Desktop.
LinuxでのOSECPU-VMのビルド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ちょっと躓いたのでメモ(主にblike関係) | |
まずはOSECPU-VMのリポジトリをclone | |
``` | |
git clone https://github.com/osecpu/osecpu-vm-rev2.git | |
``` | |
あと、描画用のライブラリのblikeもcloneしてくる | |
``` | |
git clone https://github.com/takeutch-kemeco/blike.git | |
``` | |
で、blikeのビルドをするのだけれど、その前にblikeの依存ライブラリを入れる | |
``` | |
sudo apt-get install libgtk-3-dev | |
``` | |
これでblikeがビルドできるはずなので、やる。 | |
``` | |
cd blike | |
./autogen.sh | |
./configure --prefix=/usr | |
make | |
sudo make install | |
``` | |
なんか上手く行かなかったらsudo付けとけば多分OK. | |
最後に、OSECPU-VMのビルドをする。 | |
任意のVMのソースコードのディレクトリに入って、linux/memo.txtに書いてあるコマンドを打てばビルドできるはず。 | |
例えば、こんなかんじ | |
``` | |
gcc -D__linux__ -o osecpu osecpu-vm.c other.c integer.c pointer.c float.c extend.c api.c driver.c decode.c tek.c debug.c `pkg-config blike --libs --cflags` | |
``` | |
``` | |
gcc: error: `pkg-config: そのようなファイルやディレクトリはありません | |
gcc: error: blike: そのようなファイルやディレクトリはありません | |
gcc: error: unrecognized command line option ‘--libs’ | |
gcc: error: unrecognized command line option ‘--cflags`’ | |
``` | |
...あれ? | |
あ、これはシェルの問題ですね。 | |
テキトーに以下のようにしたらできました | |
``` | |
sh -c "gcc -D__linux__ -o osecpu osecpu-vm.c other.c integer.c pointer.c float.c extend.c api.c driver.c decode.c tek.c debug.c `pkg-config blike --libs --cflags`" | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment