Skip to content

Commit

Permalink
fix makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
saursin committed Jan 15, 2024
1 parent 03f236d commit 3866a1e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,89 +56,89 @@ all : doxy-pdf default #t# Build default with docs
.PHONY : sim
sim: boot #t# Build atomsim for given soctarget
$(call print_msg_root,Building AtomSim)
make $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) DEBUG=$(debug)
$(MAKE) $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) DEBUG=$(debug)


.PHONY: clean-sim
clean-sim: #t# Clean atomsim build files
$(call print_msg_root,Cleaning AtomSim build files)
make $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) clean
$(MAKE) $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) clean


.PHONY: test
test: sim lib #t# Test the build using banner example
$(call print_msg_root,Running example on Atomsim)
make $(MKFLAGS) -C $(RVATOM)/sw/examples soctarget=$(soctarget) ex=banner sim=1 clean compile run
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/examples soctarget=$(soctarget) ex=banner sim=1 clean compile run


# ======== Bootloader ========
.PHONY : boot
boot: lib #t# Build bootloader for given target
$(call print_msg_root,Building bootloader)
make $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) sim=$(sim)
$(MAKE) $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) sim=$(sim)


.PHONY: clean-boot
clean-boot: #t# Clean bootloader build files
$(call print_msg_root,Cleaning bootloader build files)
make $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) clean
$(MAKE) $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) clean


# ======== SCAR ========
.PHONY: scar
scar: sim #t# Verify target using scar
$(call print_msg_root,Running SCAR)
make $(MKFLAGS) -C $(scar_dir)
$(MAKE) $(MKFLAGS) -C $(scar_dir)


.PHONY: clean-scar
clean-scar: #t# Clean scar directory
$(call print_msg_root,Cleaning SCAR working directory)
make $(MKFLAGS) -C $(scar_dir) clean
$(MAKE) $(MKFLAGS) -C $(scar_dir) clean


# ======== ElfDump ========
.PHONY: elfdump
elfdump: #t# Build elfdump utility
$(call print_msg_root,Building ELFDump)
make $(MKFLAGS) -C $(elfdump_dir)
$(MAKE) $(MKFLAGS) -C $(elfdump_dir)


.PHONY: clean-elfdump
clean-elfdump: #t# Clean elfdump directory
$(call print_msg_root,Cleaning ELFDump build files)
make $(MKFLAGS) -C $(elfdump_dir) clean
$(MAKE) $(MKFLAGS) -C $(elfdump_dir) clean

# ======== SW libs ========
.PHONY: lib
lib: #t# compile software libraries
$(call print_msg_root,Building libcatom)
make $(MKFLAGS) -C $(lib_dir) soctarget=$(soctarget) sim=$(sim)
$(MAKE) $(MKFLAGS) -C $(lib_dir) soctarget=$(soctarget) sim=$(sim)


.PHONY: clean-lib
clean-lib: #t# Clean software libs
$(call print_msg_root,Cleaning libcatom build files)
make $(MKFLAGS) -C $(lib_dir) clean
$(MAKE) $(MKFLAGS) -C $(lib_dir) clean


# ======== Documentation ========
.PHONY: doxy
doxy: #t# Generate atomsim C++ source documentation
$(call print_msg_root,Generating docs for AtomSim,LATEX & HTML)
make $(MKFLAGS) -C $(doxy_dir)
$(MAKE) $(MKFLAGS) -C $(doxy_dir)


.PHONY: doxy-pdf
doxy-pdf: doxy #t# Generate atomsim C++ source documentation (pdf)
$(call print_msg_root,Generating docs for AtomSim,PDF)
make $(MKFLAGS) -C $(doxy_dir) pdf
$(MAKE) $(MKFLAGS) -C $(doxy_dir) pdf


.PHONY: clean-doxy
clean-doxy: #t# Clean build files for Atomsim docs
$(call print_msg_root,Cleaning docs build files)
make $(MKFLAGS) -C $(doxy_dir) clean
$(MAKE) $(MKFLAGS) -C $(doxy_dir) clean


# ======== clean ========
Expand Down
2 changes: 1 addition & 1 deletion sim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ $(VERILATED_DIR)/V$(VTOPMODULE)__ALL.a: $(VSRCS)
$(VC) $(VFLAGS) `$(RVATOM)/scripts/cfgparse.py $(JSONCFG) -f --tool=verilator`

$(call print_msgt,Generating library)
make -s -C $(VERILATED_DIR) -f V$(VTOPMODULE).mk > /dev/null
$(MAKE) -s -C $(VERILATED_DIR) -f V$(VTOPMODULE).mk > /dev/null

$(call print_msg,Generating combined header,V$(VTOPMODULE)_headers.h)
printf "#ifndef __V$(VTOPMODULE)_headers__\n" > $(VERILATED_DIR)/V$(VTOPMODULE)_headers.h
Expand Down
2 changes: 1 addition & 1 deletion sim/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(MAN_PDF): $(LATEX_DIR)/refman.pdf
mv $^ $@

$(LATEX_DIR)/refman.pdf:
make -C build/latex/
$(MAKE) -C build/latex/



Expand Down
4 changes: 2 additions & 2 deletions synth/altera/de0-cv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ default: build

$(build_dir)/bootloader.hex:
$(call print_msg_root,Rebuilding libcatom and bootloader)
make $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
make $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
cp $(RVATOM)/sw/bootloader/bootloader.hex $@

$(build_dir)/HydrogenSoC.v:
Expand Down
4 changes: 2 additions & 2 deletions synth/xilinx/spartan6-mini/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ default: build

$(build_dir)/bootloader.hex:
$(call print_msg_root,Rebuilding libcatom and bootloader)
make $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
make $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
cp $(RVATOM)/sw/bootloader/bootloader.hex $@

$(build_dir)/HydrogenSoC.v:
Expand Down
4 changes: 2 additions & 2 deletions synth/yosys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ default: fpga #t# alias for fpga target

$(build_dir)/bootloader.hex:
$(call print_msg_root,Rebuilding libcatom and bootloader)
make $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
make $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/lib soctarget=$(soctarget) sim=0 clean build
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/bootloader soctarget=$(soctarget) sim=0 clean build
cp $(RVATOM)/sw/bootloader/bootloader.hex $@

$(build_dir)/HydrogenSoC.v:
Expand Down

0 comments on commit 3866a1e

Please sign in to comment.