From 8d4a613cc56e4df87305d755f6cb854207e82040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 24 Jun 2015 12:16:20 +0200 Subject: [PATCH] Small Makefile improvements - fix old build commands still using OFLAGS - make everything work with --warn-undefined-variables, which can be useful for debugging typos --- programs/Makefile | 9 ++++++--- tests/Makefile | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/programs/Makefile b/programs/Makefile index 47ffa65a1..abef94ee1 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -28,6 +28,9 @@ LOCAL_LDFLAGS += -lws2_32 ifdef SHARED SHARED_SUFFIX=.$(DLEXT) endif +else +EXEXT= +SHARED_SUFFIX= endif # Zlib shared library extensions: @@ -174,11 +177,11 @@ random/gen_random_ctr_drbg$(EXEXT): random/gen_random_ctr_drbg.c ../library/libm ssl/dtls_client$(EXEXT): ssl/dtls_client.c ../library/libmbedtls.a echo " CC ssl/dtls_client.c" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $(OFLAGS) ssl/dtls_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ ssl/dtls_server$(EXEXT): ssl/dtls_server.c ../library/libmbedtls.a echo " CC ssl/dtls_server.c" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $(OFLAGS) ssl/dtls_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ ssl/ssl_client1$(EXEXT): ssl/ssl_client1.c ../library/libmbedtls.a echo " CC ssl/ssl_client1.c" @@ -226,7 +229,7 @@ test/selftest$(EXEXT): test/selftest.c ../library/libmbedtls.a test/udp_proxy$(EXEXT): test/udp_proxy.c ../library/libmbedtls.a echo " CC test/udp_proxy.c" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $(OFLAGS) test/udp_proxy.c $(LOCAL_LDFLAGS)$(LDFLAGS) -o $@ + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/udp_proxy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ util/pem2der$(EXEXT): util/pem2der.c ../library/libmbedtls.a echo " CC util/pem2der.c" diff --git a/tests/Makefile b/tests/Makefile index 73f9187aa..a33f8a749 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -37,6 +37,9 @@ LOCAL_LDFLAGS += -lws2_32 ifdef SHARED SHARED_SUFFIX=.$(DLEXT) endif +else +EXEXT= +SHARED_SUFFIX= endif # Zlib shared library extensions: