forked from IObundle/iob-soc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request IObundle#127 from JDLopes/master
update hardware.mk to work with the new build-dir system
- Loading branch information
Showing
1 changed file
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
ifeq ($(filter UART, $(HW_MODULES)),) | ||
|
||
include $(UART_DIR)/config.mk | ||
|
||
#add itself to HW_MODULES list | ||
HW_MODULES+=UART | ||
|
||
UART_INC_DIR:=$(UART_HW_DIR)/include | ||
UART_SRC_DIR:=$(UART_HW_DIR)/src | ||
|
||
USE_NETLIST ?=0 | ||
#import lib hardware | ||
include hardware/iob_reg/hardware.mk | ||
|
||
# | ||
# Headers | ||
# | ||
|
||
#import module | ||
include $(LIB_DIR)/hardware/iob_reg/hardware.mk | ||
#clk/rst interface | ||
VHDR+=$(BUILD_VSRC_DIR)/iob_gen_if.vh | ||
$(BUILD_VSRC_DIR)/iob_gen_if.vh: hardware/include/iob_gen_if.vh | ||
cp $< $@ | ||
|
||
#include files | ||
VHDR+=$(wildcard $(UART_INC_DIR)/*.vh) | ||
VHDR+=iob_uart_swreg_gen.vh iob_uart_swreg_def.vh | ||
VHDR+=$(LIB_DIR)/hardware/include/iob_lib.vh $(LIB_DIR)/hardware/include/iob_s_if.vh $(LIB_DIR)/hardware/include/iob_gen_if.vh | ||
#IObundle native slave interface | ||
VHDR+=$(BUILD_VSRC_DIR)/iob_gen_if.vh | ||
$(BUILD_VSRC_DIR)/iob_s_if.vh: hardware/include/iob_s_if.vh | ||
cp $< $@ | ||
|
||
#hardware include dirs | ||
INCLUDE+=$(incdir). $(incdir)$(UART_INC_DIR) $(incdir)$(LIB_DIR)/hardware/include | ||
VHDR+=$(BUILD_VSRC_DIR)/iob_uart_swreg_gen.vh | ||
$(BUILD_VSRC_DIR)/iob_uart_swreg_gen.vh: iob_uart_swreg_gen.vh | ||
cp $< $@ | ||
|
||
#sources | ||
VSRC+=$(UART_SRC_DIR)/uart_core.v $(UART_SRC_DIR)/iob_uart.v | ||
VHDR+=$(BUILD_VSRC_DIR)/iob_uart_swreg_def.vh | ||
$(BUILD_VSRC_DIR)/iob_uart_swreg_def.vh: iob_uart_swreg_def.vh | ||
cp $< $@ | ||
|
||
uart-hw-clean: uart-gen-clean | ||
@rm -f *.v *.vh | ||
# | ||
# Sources | ||
# | ||
|
||
.PHONY: uart-hw-clean | ||
VSRC+=$(BUILD_VSRC_DIR)/uart_core.v | ||
$(BUILD_VSRC_DIR)/uart_core.v: $(UART_DIR)/hardware/src/uart_core.v | ||
cp $< $@ | ||
|
||
endif | ||
VSRC+=$(BUILD_VSRC_DIR)/iob_uart.v | ||
$(BUILD_VSRC_DIR)/iob_uart.v: $(UART_DIR)/hardware/src/iob_uart.v | ||
cp $< $@ |