Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blk: add makefile snippet #152

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions blk/components/blk_components.mk
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 virtualiser
# it should be included into your project Makefile
#
# NOTES:
# Generates blk_virt.elf
#


BLK_IMAGES := blk_virt.elf

CFLAGS_blk ?=

alexandermbrown marked this conversation as resolved.
Show resolved Hide resolved
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: blk_virt.o
$(LD) $(LDFLAGS) $^ $(LIBS) -o $@

blk_virt.o: ${CHECK_BLK_FLAGS_MD5}
blk_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 blk_virt.d