Create makefile targets

Allow to change build target without modifiying the sources.
In order to keep compatibilty `sim` target is built by default.
This commit is contained in:
Mateusz Holenko 2019-07-10 10:39:47 +02:00
parent 423355ecbf
commit 39c3f408e5
2 changed files with 6 additions and 3 deletions

View File

@ -12,6 +12,12 @@ SRCS = $(wildcard src/*.c) \
LDSCRIPT = ${STANDALONE}/common/ram.ld
sim: CFLAGS += -DSIM
sim: all
qemu: CFLAGS += -DQEMU
qemu: all
include ${STANDALONE}/common/riscv64-unknown-elf.mk
include ${STANDALONE}/common/standalone.mk

View File

@ -1,9 +1,6 @@
#ifndef CONFIG_H
#define CONFIG_H
//#define QEMU
#define SIM
#ifndef OS_CALL
#define OS_CALL 0xC0000000
#endif