Commit 862b2ee6 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

Makefile: select the WR mode with the variable while calling make instead of modifying Makefile

parent 75515946
...@@ -32,11 +32,18 @@ else ...@@ -32,11 +32,18 @@ else
CROSS_COMPILE ?= /opt/gcc-lm32/bin/lm32-elf- CROSS_COMPILE ?= /opt/gcc-lm32/bin/lm32-elf-
CFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled CFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled
#################################################################### ########################################################################
## Select here WR_MASTER (primary clock) or WR_SLAVE mode of WRPC ## ## Select WR_MASTER (primary clock) or WR_SLAVE by setting the WRMODE ##
#################################################################### ## variable with make execution eg. ##
#CFLAGS_PLATFORM += -DWRPC_MASTER ## > make WRMODE=master ##
## by default Slave is built ##
########################################################################
WRMODE = slave
ifeq ($(WRMODE), master)
CFLAGS_PLATFORM += -DWRPC_MASTER
else
CFLAGS_PLATFORM += -DWRPC_SLAVE CFLAGS_PLATFORM += -DWRPC_SLAVE
endif
LDFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled -nostdlib -T target/lm32/ram.ld LDFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled -nostdlib -T target/lm32/ram.ld
OBJS_PLATFORM=target/lm32/crt0.o target/lm32/irq.o OBJS_PLATFORM=target/lm32/crt0.o target/lm32/irq.o
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment