21 lines
468 B
Plaintext
21 lines
468 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Put instructions to compile source code, remove this file if the language does not require this stage
|
||
|
|
||
|
|
||
|
case "${PISTON_ALIAS}" in
|
||
|
nasm)
|
||
|
nasm -f elf32 -o binary.o $*
|
||
|
ld -m elf_i386 binary.o -o binary
|
||
|
;;
|
||
|
nasm64)
|
||
|
nasm -f elf64 -o binary.o $*
|
||
|
ld -m elf_x86_64 binary.o -o binary
|
||
|
;;
|
||
|
*)
|
||
|
echo "How did you get here? (${PISTON_ALIAS})"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
chmod +x ./binary
|