mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-25 22:44:25 +01: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
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…
Reference in New Issue
Block a user