use definitions in consts header whenever possible
This commit is contained in:
22
Makefrag
22
Makefrag
@ -44,3 +44,25 @@ $(sim_dir)/libdramsim.a: $(DRAMSIM_OBJS)
|
||||
|
||||
%.riscv.hex: %
|
||||
$(MAKE) -C $(dir $@) $(notdir $@)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Constants Header Files
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
params_file = $(generated_dir)/$(MODEL).$(CONFIG).prm
|
||||
consts_header = $(generated_dir)/consts.$(CONFIG).h
|
||||
$(consts_header): $(params_file)
|
||||
echo "#ifndef __CONST_H__" > $@
|
||||
echo "#define __CONST_H__" >> $@
|
||||
sed -r 's/\(([A-Za-z0-9_]+),([A-Za-z0-9_]+)\)/#define \1 \2/' $< >> $@
|
||||
echo "#define TBFRAG \"$(MODEL).$(CONFIG).tb.cpp\"" >> $@
|
||||
echo "#endif // __CONST_H__" >> $@
|
||||
|
||||
params_file_debug = $(generated_dir_debug)/$(MODEL).$(CONFIG).prm
|
||||
consts_header_debug = $(generated_dir_debug)/consts.$(CONFIG).h
|
||||
$(consts_header_debug): $(params_file_debug)
|
||||
echo "#ifndef __CONST_H__" > $@
|
||||
echo "#define __CONST_H__" >> $@
|
||||
sed -r 's/\(([A-Za-z0-9_]+),([A-Za-z0-9_]+)\)/#define \1 \2/' $< >> $@
|
||||
echo "#define TBFRAG \"$(MODEL).$(CONFIG).tb.cpp\"" >> $@
|
||||
echo "#endif // __CONST_H__" >> $@
|
||||
|
Reference in New Issue
Block a user