Whole project can now be build using make
This commit is contained in:
53
Makefile
Normal file
53
Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
BUILD = .build
|
||||
|
||||
VERILOG = \
|
||||
src/char_map.v \
|
||||
src/color_map.v \
|
||||
src/dvi_top.v \
|
||||
src/dvid.v \
|
||||
src/encode.v \
|
||||
src/hdmi.xdc \
|
||||
src/simple_dual_ram.v \
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(BUILD)/impl.bin
|
||||
|
||||
$(BUILD)/ip/clk_wiz_0/clk_wiz_0.xci: scripts/clk_wiz_0.tcl | $(BUILD)/ip
|
||||
/opt/Xilinx/Vivado/2019.1/bin/vivado -mode batch -source scripts/clk_wiz_0.tcl -nolog -nojournal
|
||||
|
||||
$(BUILD)/ip/microblaze_mcs_0/microblaze_mcs_0.xci: scripts/microblaze_mcs_0.tcl | $(BUILD)/ip
|
||||
/opt/Xilinx/Vivado/2019.1/bin/vivado -mode batch -source scripts/microblaze_mcs_0.tcl -nolog -nojournal
|
||||
|
||||
$(BUILD)/5_route.dcp: $(VERILOG) $(BUILD)/ip/clk_wiz_0/clk_wiz_0.xci $(BUILD)/ip/microblaze_mcs_0/microblaze_mcs_0.xci scripts/build.tcl | $(BUILD)
|
||||
/opt/Xilinx/Vivado/2019.1/bin/vivado -mode batch -source scripts/build.tcl -nolog -nojournal
|
||||
|
||||
$(BUILD)/impl.bin: $(BUILD)/5_route.dcp $(BUILD)/controller.elf scripts/write.tcl | $(BUILD)
|
||||
/opt/Xilinx/Vivado/2019.1/bin/vivado -mode batch -source scripts/write.tcl -nolog -nojournal
|
||||
|
||||
$(BUILD)/bsp/system.mss: $(BUILD)/system.hdf | $(BUILD)
|
||||
/opt/Xilinx/SDK/2019.1/bin/xsdk -batch scripts/sdk.tcl
|
||||
|
||||
$(BUILD)/bsp/microblaze_I/lib/libxil.a: $(BUILD)/bsp/system.mss
|
||||
$(MAKE) -C $(BUILD)/bsp all
|
||||
|
||||
OBJ = \
|
||||
$(BUILD)/obj/main.o
|
||||
|
||||
$(BUILD)/obj/%.o: software/src/%.c $(BUILD)/bsp/microblaze_I/lib/libxil.a | $(BUILD)/obj
|
||||
mb-gcc -Wall -O2 -c -fmessage-length=0 -MT"$@" -I$(BUILD)/bsp/microblaze_I/include -mno-xl-reorder -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
|
||||
|
||||
$(BUILD)/controller.elf: $(OBJ) software/src/lscript.ld $(BUILD)/bsp/microblaze_I/lib/libxil.a | $(BUILD)
|
||||
mb-gcc -Wl,-T -Wl,software/src/lscript.ld -L$(BUILD)/bsp/microblaze_I/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "$@" $(OBJ) -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
|
||||
|
||||
$(BUILD):
|
||||
mkdir $@
|
||||
|
||||
$(BUILD)/ip: | $(BUILD)
|
||||
mkdir $@
|
||||
|
||||
$(BUILD)/obj: | $(BUILD)
|
||||
mkdir $@
|
||||
|
||||
clean:
|
||||
rm -fr $(BUILD)
|
||||
Reference in New Issue
Block a user