Move the dependency adjacent to the generated file

Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
diff --git a/library/Makefile b/library/Makefile
index 1581638..8a86a55 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -208,8 +208,6 @@
 all: shared static
 endif
 
-psa_crypto.o:psa_crypto_driver_wrappers.h
-
 static: libmbedcrypto.a libmbedx509.a libmbedtls.a
 	cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile
 
@@ -365,6 +363,8 @@
 	echo "  Gen   $(GENERATED_WRAPPER_FILES)"
 	$(PYTHON) ../scripts/generate_driver_wrappers.py
 
+psa_crypto.o:psa_crypto_driver_wrappers.h
+
 clean:
 ifndef WINDOWS
 	rm -f *.o libmbed*