-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Brown <[email protected]>
- Loading branch information
1 parent
083f8fa
commit c229ced
Showing
1 changed file
with
39 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# Copyright 2024, UNSW | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
# | ||
# This Makefile snippet builds the blk RX and TX virtualisers | ||
# it should be included into your project Makefile | ||
# | ||
# NOTES: | ||
# Generates blk_virt.elf | ||
# | ||
|
||
|
||
BLK_IMAGES := blk_virt.elf | ||
|
||
CFLAGS_blk := -I ${SDDF}/include | ||
|
||
CHECK_BLK_FLAGS_MD5:=.blk_cflags-$(shell echo -- ${CFLAGS} ${CFLAGS_blk} | shasum | sed 's/ *-//') | ||
|
||
${CHECK_BLK_FLAGS_MD5}: | ||
-rm -f .blk_cflags-* | ||
touch $@ | ||
|
||
|
||
blk_virt.elf: virt.o | ||
$(LD) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
|
||
virt.o: ${CHECK_BLK_FLAGS_MD5} | ||
virt.o: ${SDDF}/blk/components/virt.c | ||
${CC} ${CFLAGS} ${CFLAGS_blk} -o $@ -c $< | ||
|
||
clean:: | ||
rm -f blk_virt.[od] .blk_cflags-* | ||
|
||
clobber:: | ||
rm -f ${BLK_IMAGES} | ||
|
||
|
||
-include virt.d |