File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ add_executable(cnex
1212 number.c
1313 stack.c
1414 util.c
15+ lib/random.c
1516)
1617if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
1718 set_target_properties (cnex PROPERTIES COMPILE_FLAGS "-std=c99 -Wall -Werror" )
Original file line number Diff line number Diff line change 2222 "-g" ,
2323 ])
2424
25+ envcnex .Append (CPPPATH = [Dir ("." )])
26+
27+ rtl_c = ([
28+ "lib/random.c" ,
29+ ])
30+
2531cnex = envcnex .Program ("cnex" , [
2632 "array.c" ,
2733 "bytecode.c" ,
@@ -34,6 +40,7 @@ cnex = envcnex.Program("cnex", [
3440 "number.c" ,
3541 "stack.c" ,
3642 "util.c" ,
43+ rtl_c ,
3744],
3845)
3946
Original file line number Diff line number Diff line change 11#include "global.h"
22
3+ #include "lib/random.h"
4+
35#include <assert.h>
46#include <stdarg.h>
57#include <stdint.h>
1719#include "util.h"
1820
1921
20-
2122#define PDFUNC (name , func ) { name, (void (*)(TExecutor *))(func) }
2223
2324TDispatch gfuncDispatch [] = {
@@ -36,6 +37,8 @@ TDispatch gfuncDispatch[] = {
3637
3738 PDFUNC ("io$fprint" , io_fprint ),
3839
40+ PDFUNC ("random$uint32" , random_uint32 ),
41+
3942 PDFUNC ("sys$exit" , sys_exit ),
4043
4144 PDFUNC ("array__append" , array__append ),
You can’t perform that action at this time.
0 commit comments