forked from ground/ground
Tram is now an optional dependency
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#ifdef GROUND_COMPILE_WITH_TRAM
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "include/uthash.h"
|
||||
@@ -554,3 +556,5 @@ void compileGroundInstruction(GroundInstruction* instruction, Tram_Program* prog
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -174,7 +174,11 @@ void groundAddFunctionToStruct(GroundStruct* gstruct, char* name, NativeGroundFu
|
||||
}
|
||||
|
||||
void groundCompileProgram(GroundProgram* program) {
|
||||
#ifdef GROUND_COMPILE_WITH_TRAM
|
||||
compileGroundProgram(program, "program.gexe");
|
||||
#else
|
||||
printf("This version of Ground has been compiled without Tram, so compilation is not supported.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
GroundValue groundRunFunction(GroundFunction* function, size_t argc, ...) {
|
||||
|
||||
@@ -111,7 +111,11 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (compile) {
|
||||
#ifdef GROUND_COMPILE_WITH_TRAM
|
||||
compileGroundProgram(&program, "program.gexe");
|
||||
#else
|
||||
printf("This version of Ground has been compiled without Tram, so compilation is not supported.\n");
|
||||
#endif
|
||||
} else if (writeBytecode) {
|
||||
serializeProgramToFile(outFileName, &program);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user