Add Posix Target

This commit is contained in:
Christian Dietrich
2021-08-23 16:32:02 +02:00
parent f17065ede9
commit fda664bf4a
7 changed files with 61 additions and 14 deletions

28
arch/posix.mk Normal file
View File

@ -0,0 +1,28 @@
FAIL_DOWNLOAD_URL = NOTAVAILABLE
CFLAGS +=
LDFLAGS +=
################################################################
# Build Targets
${BUILD_DIR}/%/system.o: %.c
mkdir -p $(shell dirname $@)
${CC} ${CFLAGS} -c $< -o $@
${BUILD_DIR}/%/system.elf: ${BUILD_DIR}/%/system.o
${CC} ${LDFLAGS} $< -o $@
${BUILD_DIR}/%/trace.pb: ${BUILD_DIR}/%/system.elf
$<
define arch-make-targets
build-$1: ${BUILD_DIR}/$1/system.elf
trace-$1: ${BUILD_DIR}/$1/trace.pb
endef

7
arch/posix/lib.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
#define MARKER(str) printf(QUOTE(str) "\n")
#define POSIX_PRINTF(...) printf(__VA_ARGS__)
#define MAIN() int main(int argc, char** argv)

View File

@ -1,4 +1,4 @@
FAIL_DOWNLOAD_URL = ${FAIL_DOWNLOAD_BASE}?job=build-riscv-generic-tools%3A+%5Briscv32%5D
FAIL_DOWNLOAD_URL = ${FAIL_DOWNLOAD_BASE}?job=build-riscv-generic-tools%3A+%5Briscv32%2C+true%5D
include arch/riscv-common.mk

View File

@ -1,4 +1,5 @@
FAIL_DOWNLOAD_URL = ${FAIL_DOWNLOAD_BASE}?job=build-riscv-generic-tools%3A+%5Briscv64%5D
FAIL_DOWNLOAD_URL = ${FAIL_DOWNLOAD_BASE}?job=build-riscv-generic-tools%3A+%5Briscv64%2C+true%5D
include arch/riscv-common.mk