1
0

Use PROJECT rather than MODEL in name of binary and generated src files.

This commit is contained in:
Henry Cook
2016-09-19 13:23:17 -07:00
parent 7b8aa6c839
commit ddcf1b4099
6 changed files with 33 additions and 34 deletions

View File

@ -6,6 +6,10 @@ endif
MODEL ?= TestHarness
PROJECT ?= rocketchip
CFG_PROJECT ?= $(PROJECT)
CONFIG ?= DefaultConfig
# TODO: For now must match rocketchip.Generator
long_name = $(PROJECT).$(CONFIG)
CXX ?= g++
CXXFLAGS := -O1
@ -50,7 +54,7 @@ bootrom_img = $(base_dir)/bootrom/bootrom.img
#---------------------------------------------------------------------
# sed uses -E (instead of -r) for BSD support
params_file = $(generated_dir)/$(MODEL).$(CONFIG).prm
params_file = $(generated_dir)/$(long_name).prm
consts_header = $(generated_dir)/consts.$(CONFIG).h
$(consts_header): $(params_file)
echo "#ifndef __CONST_H__" > $@
@ -58,7 +62,7 @@ $(consts_header): $(params_file)
sed -E 's/\(([A-Za-z0-9_]+),([A-Za-z0-9_]+)\)/#define \1 \2/' $< >> $@
echo "#endif // __CONST_H__" >> $@
params_file_debug = $(generated_dir_debug)/$(MODEL).$(CONFIG).prm
params_file_debug = $(generated_dir_debug)/$(long_name).prm
consts_header_debug = $(generated_dir_debug)/consts.$(CONFIG).h
$(consts_header_debug): $(params_file_debug)
echo "#ifndef __CONST_H__" > $@