build_tests.sh 922 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh -ex
  2. #shopt -s nullglob
  3. SQUIRREL_INCLUDE=/usr/local/include/squirrel
  4. SQUIRREL_LIB=/usr/local/lib
  5. CFLAGS="-g -O0 -I. -I../include -I../gtest-1.3.0/include -I${SQUIRREL_INCLUDE}"
  6. LDFLAGS=-L${SQUIRREL_LIB}
  7. LIBS="../gtest-1.3.0/libgtest.a -lsqstdlib -lsquirrel -lstdc++ -lm "
  8. mkdir -p bin
  9. gcc $CFLAGS \
  10. ../sqimport/sqratimport.cpp ImportTest.cpp Main.cpp \
  11. -o bin/ImportTest ${LDFLAGS} ${LIBS} -ldl
  12. TEST_CPPS="ClassBinding.cpp\
  13. ClassInstances.cpp\
  14. ClassProperties.cpp\
  15. ConstBindings.cpp\
  16. FunctionOverload.cpp\
  17. ScriptLoading.cpp\
  18. SquirrelFunctions.cpp\
  19. TableBinding.cpp\
  20. FunctionParams.cpp \
  21. RunStackHandling.cpp \
  22. SuspendVM.cpp \
  23. NullPointerReturn.cpp\
  24. FuncInputArgumentType.cpp \
  25. ArrayBinding.cpp \
  26. UniqueObject.cpp "
  27. for f in $TEST_CPPS; do
  28. gcc $CFLAGS \
  29. ${f} Vector.cpp Main.cpp \
  30. -o bin/${f%.cpp} ${LDFLAGS} ${LIBS}
  31. done