mirror of
https://github.com/k4m4/kickthemout.git
synced 2025-07-02 19:41:58 +02:00
Create cbuild.sh
The cbuild.sh file a bash script for create an executable of kickthemout with cython
This commit is contained in:
parent
3442a2f825
commit
18dd788939
1 changed files with 19 additions and 0 deletions
19
cbuild.sh
Normal file
19
cbuild.sh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#Copyright Loïc Branstett 2017 MIT License
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v cython2)" ]; then
|
||||||
|
echo 'Cython2 is not installed.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v gcc)" ]; then
|
||||||
|
echo 'Gcc is not installed.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Making the C file ...";
|
||||||
|
cython2 --embed kickthemout.py
|
||||||
|
|
||||||
|
echo "Compling C file to executable ..."
|
||||||
|
gcc $CFLAGS -I/usr/include/python2.7 -o kickthemout kickthemout.c -lpython2.7 -lpthread -lm -lutil -ldl
|
||||||
|
echo "Compile finish ! You can launch kickthemout with ./kickthemout"
|
Loading…
Add table
Add a link
Reference in a new issue