Guest User

Untitled

a guest
Jan 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # auto detection of compiler
  4. if test ! $CC; then
  5. if gcc --version > /dev/null 2>&1; then
  6. CC=gcc
  7. elif clang --version > /dev/null 2>&1; then
  8. CC=clang
  9. fi
  10.  
  11. if test ! $CC; then
  12. echo No compiler found. Specify compiler by setting the CC environment variable.
  13. echo Example: CC=gcc ./$0
  14. exit
  15. fi
  16. fi
  17.  
  18. # the actual compile
  19. echo compiling using $CC...
  20. $CC -Wall -ansi -pedantic src/tools/txt2c.c -o src/tools/txt2c
  21. src/tools/txt2c src/base.lua src/tools.lua src/driver_gcc.lua src/driver_cl.lua > src/internal_base.h
  22. $CC -Wall -ansi -pedantic src/*.c src/lua/*.c -o bam -I src/lua -lm -lpthread -O2 -rdynamic $*
Add Comment
Please, Sign In to add comment