diff options
Diffstat (limited to 'target/unix')
| -rw-r--r-- | target/unix/main.c | 17 | ||||
| -rw-r--r-- | target/unix/platform.h | 11 |
2 files changed, 28 insertions, 0 deletions
diff --git a/target/unix/main.c b/target/unix/main.c new file mode 100644 index 0000000..a2db705 --- /dev/null +++ b/target/unix/main.c @@ -0,0 +1,17 @@ +#include <ducky.h> +#include <platform.h> + +int main(int argc, char *argv[]) +{ + if(argc == 2) + { + int fd = open(argv[1], O_RDONLY); + ducky_main(fd); + close(fd); + } + else + { + printf("Usage: %s FILE\n", argv[0]); + } + return 0; +} diff --git a/target/unix/platform.h b/target/unix/platform.h new file mode 100644 index 0000000..ca331e2 --- /dev/null +++ b/target/unix/platform.h @@ -0,0 +1,11 @@ +#include <bsd/string.h> + +#include <fcntl.h> +#include <math.h> +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <time.h> +#include <unistd.h> |