Skip to content

Commit

Permalink
Include correct dependency files
Browse files Browse the repository at this point in the history
When OBJECTS were moved to a different directory tree, the dependency
file names were not updated.

Also depend on ${SDDF}/include so upstream Makefiles can know to
initialise the submodule.

Signed-off-by: Peter Chubb <[email protected]>
  • Loading branch information
wom-bat committed Aug 21, 2024
1 parent 9c35891 commit 4f177f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vmm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ARCH_INDEP_FILES := src/util/printf.c \
CFILES := ${AARCH64_FILES} ${ARCH_INDEP_FILES}
OBJECTS := $(subst src,libvmm,${CFILES:.c=.o})


# Generate dependencies automatically
CFLAGS += -MD

Expand All @@ -75,15 +76,16 @@ libvmm/arch/aarch64/vgic:
libvmm.a: ${OBJECTS}
ar rv $@ $^

${OBJECTS}: ${SDDF}/include
${OBJECTS}: ${CHECK_LIBVMM_CFLAGS} |libvmm/arch/aarch64/vgic

libvmm/%.o: src/%.c
${CC} ${CFLAGS} -c -o $@ $<

-include ${CFILES:.c=.d}
-include ${OBJECTS:.o=.d}

clean::
rm -f ${OBJECTS} ${CFILES:.c=.d}
rm -f ${OBJECTS} ${OBJECTS:.c=.d}

clobber:: clean
rmdir src/arch/aarch64/vgic
Expand Down

0 comments on commit 4f177f1

Please sign in to comment.