Makefile.common 734 B

12345678910111213141516171819202122
  1. # This file is Copyright (c) 2023 Victor Suarez Rovere <suarezvictor@gmail.com>
  2. # SPDX-License-Identifier: AGPL-3.0-only
  3. SHELL := /bin/bash
  4. CFLEXROOT?=../CflexHDL
  5. GENERATOR?=$(CFLEXROOT)/src/silice_generator.py
  6. BUILD_ROOT=./build
  7. BUILD_DIR?=$(BUILD_ROOT)/$(BOARD)
  8. LITEX_ROOT=../litex
  9. PYTHON?=python3
  10. FNPREFIX=accel_
  11. all: everything
  12. %.v: %.cc
  13. cpp -DSDRAM_BUS_BITS=$(SDRAM_BUS_BITS) -D$(basename $@)=_$(FNPREFIX)$(basename $@) -I$(CFLEXROOT)/include -E $< > $(BUILD_DIR)/$@.tmp.cpp
  14. PYTHONPATH=$(CFLEXROOT)/cflexparser $(GENERATOR) $(BUILD_DIR)/$@.tmp.cpp > $(BUILD_DIR)/$@.tmp.si
  15. silice -f verilog-gen-header.txt $(BUILD_DIR)/$@.tmp.si -o $@ --export $(FNPREFIX)$(basename $@)
  16. c2v: rectangle_fill32.v ellipse_fill32.v line32.v