Skip to content
Jeff Koftinoff edited this page Jan 23, 2014 · 1 revision

Compiling on Debian/Ubuntu:

git clone [email protected]:jdkoftinoff/jdksmidi.git
cd jdksmidi
./configure --target-platform-linux=1 --target-platform-linux-x86_64=1 --packager=dpkg --target-dir-style=debian --optimize=1
make packages -j 4

then:

$ ls -l tmp-target/packages/
total 8704
-rw-r--r-- 1 jeffk jeffk     960 Jan 23 15:30 jdksmidi_20121102-1_amd64.deb
-rw-r--r-- 1 jeffk jeffk  367652 Jan 23 15:30 jdksmidi-dev_20121102-1_amd64.deb
-rw-r--r-- 1 jeffk jeffk 8535182 Jan 23 15:30 jdksmidi-docs-dev_20121102-1_amd64.deb
-rw-rw-r-- 1 jeffk jeffk     109 Jan 23 15:30 jdksmidi-testresults-20121102.tgz
$ sudo dpkg -i tmp-target/packages/jdksmidi*.deb
Selecting previously unselected package jdksmidi.
(Reading database ... 996654 files and directories currently installed.)
Unpacking jdksmidi (from .../jdksmidi_20121102-1_amd64.deb) ...
Selecting previously unselected package jdksmidi-dev.
Unpacking jdksmidi-dev (from .../jdksmidi-dev_20121102-1_amd64.deb) ...
Selecting previously unselected package jdksmidi-docs-dev.
Unpacking jdksmidi-docs-dev (from .../jdksmidi-docs-dev_20121102-1_amd64.deb) ...
Setting up jdksmidi (20121102-1) ...
Setting up jdksmidi-dev (20121102-1) ...
Setting up jdksmidi-docs-dev (20121102-1) ...

Then, to compile a program myprog.cpp that uses jdksmidi library:

CXXFLAGS=$(jdksmidi-config --cxxflags) make myprog

which then runs and outputs:

g++  -Wall -O2 -DTARGET_PLATFORM_LINUX=1 -DTARGET_PLATFORM_LINUX_I386=1 -DTARGET_PLATFORM_LINUX_X86_64=1 -DTARGET_PLATFORM_POSIX=1 -I/usr/include/jdksmidi -O2 -Wall           myprog.cpp   -o myprog
Clone this wiki locally