diff options
author | Gilles Peskine <Gilles.Peskine@arm.com> | 2021-11-04 12:45:19 +0100 |
---|---|---|
committer | Gilles Peskine <Gilles.Peskine@arm.com> | 2021-11-10 19:05:20 +0100 |
commit | a7c247e87d1b79c6c74b89aaab32864e57f685d5 (patch) | |
tree | 449fbbd8ca9e991ed56f4b2b1d8d6e2693e8bb76 /programs/Makefile | |
parent | 0495dd0f71577061f5ea342c2b2a8273ed623bea (diff) | |
download | mbedtls-a7c247e87d1b79c6c74b89aaab32864e57f685d5.zip mbedtls-a7c247e87d1b79c6c74b89aaab32864e57f685d5.tar.gz mbedtls-a7c247e87d1b79c6c74b89aaab32864e57f685d5.tar.bz2 |
New test app for dynamic loading of libmbed* with dlopen
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Diffstat (limited to 'programs/Makefile')
-rw-r--r-- | programs/Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/programs/Makefile b/programs/Makefile index 7f9d11e..2c25983 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -118,6 +118,10 @@ ifdef PTHREAD APPS += ssl/ssl_pthread_server endif +ifdef SHARED +APPS += test/dlopen +endif + ifdef TEST_CPP APPS += test/cpp_dummy_build endif @@ -344,6 +348,15 @@ test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP) echo " CXX test/cpp_dummy_build.cpp" $(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ +ifdef SHARED +test/dlopen$(EXEXT): test/dlopen.c $(DEP) + echo " CC test/dlopen.c" +# Do not link any test objects (that would bring in a static dependency on +# libmbedcrypto at least). Do not link with libmbed* (that would defeat the +# purpose of testing dynamic loading). + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) -ldl -o $@ +endif + test/query_config.o: test/query_config.c test/query_config.h $(DEP) echo " CC test/query_config.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@ @@ -405,6 +418,7 @@ ifndef WINDOWS rm -f $(EXES) -rm -f ssl/ssl_pthread_server$(EXEXT) -rm -f test/cpp_dummy_build.cpp test/cpp_dummy_build$(EXEXT) + -rm -f test/dlopen$(EXEXT) else if exist *.o del /Q /F *.o if exist *.exe del /Q /F *.exe |