diff --git a/README.md b/README.md index 128e74b..830621b 100644 --- a/README.md +++ b/README.md @@ -268,8 +268,8 @@ the linker map are targets (so you could `make bin/dbg/DEVICE/TARGET.elf`, for e Note that APROMs for a certain device and flavor combination are built against the SDK for that same device and flavor, so you'll need to have that SDK built for it to succeed. If you see linker -errors about missing `evicsdk-crt0.o`, `-levicsdk` or `-lnuvosdk` chances are you don't have the -needed SDK built. +errors about missing `evicsdk-crt0.o`, `-levicsdk` or `-lnuvosdk`, or you get +`No rule to make target 'EVICSDK/lib/FLAVOR/DEVICE'`, chances are you don't have the needed SDK built. #### Parallel make diff --git a/make/Base.mk b/make/Base.mk index 5f55f7d..874641d 100644 --- a/make/Base.mk +++ b/make/Base.mk @@ -111,11 +111,12 @@ $(call build-vars-rules,bin-dec-tmpl) $(call build-vars-rules,bin-enc-tmpl) # Rule to link objects into an ELF. -$(elf-all): $$(call tmpl-build,objs-tmpl,$$(OBJS)) | $$(@D) +$(elf-all): $$(call tmpl-build,sdkdir-tmpl,$(EVICSDK)) \ + $$(call tmpl-build,objs-tmpl,$$(OBJS)) | $$(@D) $(call info-cmd,LD) @$(call trace, \ - $(LD) $(call fixpath-bu,$^) $(LDFLAGS_LIBDIRS) $(LDFLAGS) \ - -o $(call fixpath-bu,$@)) + $(LD) $(call fixpath-bu,$(wordlist 2,$(words $^),$^)) \ + $(LDFLAGS_LIBDIRS) $(LDFLAGS) -o $(call fixpath-bu,$@)) # Add the SDK to LDFLAGS_LIBDIRS for all ELF targets. $(elf-all): LDFLAGS_LIBDIRS += \