mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-06 07:10:41 +00:00
Makefile more compatible with WINDOWS environment
This commit is contained in:
parent
cd5b529d6d
commit
62f88dc473
@ -1,6 +1,9 @@
|
|||||||
|
|
||||||
# Also see "include/polarssl/config.h"
|
# Also see "include/polarssl/config.h"
|
||||||
|
|
||||||
|
# To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your
|
||||||
|
# environment
|
||||||
|
#
|
||||||
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
|
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
|
||||||
OFLAGS = -O
|
OFLAGS = -O
|
||||||
|
|
||||||
@ -26,6 +29,7 @@ DLEXT=so
|
|||||||
# Windows shared library extension:
|
# Windows shared library extension:
|
||||||
ifdef WINDOWS
|
ifdef WINDOWS
|
||||||
DLEXT=dll
|
DLEXT=dll
|
||||||
|
LDFLAGS += -lws2_32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS= aes.o arc4.o asn1parse.o \
|
OBJS= aes.o arc4.o asn1parse.o \
|
||||||
@ -75,5 +79,9 @@ libpolarssl.dll: libpolarssl.a
|
|||||||
$(CC) $(CFLAGS) $(OFLAGS) -c $<
|
$(CC) $(CFLAGS) $(OFLAGS) -c $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
ifndef WINDOWS
|
||||||
rm -f *.o libpolarssl.*
|
rm -f *.o libpolarssl.*
|
||||||
|
endif
|
||||||
|
ifdef WINDOWS
|
||||||
|
del /Q /F *.o libpolarssl.*
|
||||||
|
endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
||||||
# To compile on MinGW: add "-lws2_32" to LDFLAGS
|
# To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your env
|
||||||
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
|
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
|
||||||
|
|
||||||
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
|
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
|
||||||
@ -185,5 +185,10 @@ x509/cert_req: x509/cert_req.c ../library/libpolarssl.a
|
|||||||
$(CC) $(CFLAGS) $(OFLAGS) x509/cert_req.c $(LDFLAGS) -o $@
|
$(CC) $(CFLAGS) $(OFLAGS) x509/cert_req.c $(LDFLAGS) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
ifndef WINDOWS
|
||||||
rm -f $(APPS)
|
rm -f $(APPS)
|
||||||
|
endif
|
||||||
|
ifdef WINDOWS
|
||||||
|
del /S /Q /F *.o *.exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
||||||
# To compile on MinGW: add "-lws2_32" to LDFLAGS
|
# To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your env
|
||||||
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
|
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
|
||||||
|
|
||||||
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement \
|
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement \
|
||||||
@ -168,9 +168,15 @@ test_suite_version: test_suite_version.c ../library/libpolarssl.a
|
|||||||
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
|
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
ifndef WINDOWS
|
||||||
rm -f $(APPS) *.c
|
rm -f $(APPS) *.c
|
||||||
|
endif
|
||||||
|
ifdef WINDOWS
|
||||||
|
del /Q /F *.c *.exe
|
||||||
|
endif
|
||||||
|
|
||||||
check: $(APPS)
|
check: $(APPS)
|
||||||
|
ifndef WINDOWS
|
||||||
echo "Running checks (Success if all tests PASSED)"
|
echo "Running checks (Success if all tests PASSED)"
|
||||||
RETURN=0; \
|
RETURN=0; \
|
||||||
for i in $(APPS); \
|
for i in $(APPS); \
|
||||||
@ -187,3 +193,4 @@ check: $(APPS)
|
|||||||
echo ""; \
|
echo ""; \
|
||||||
done; \
|
done; \
|
||||||
if [ "$$RETURN" -eq 1 ]; then exit 1; fi
|
if [ "$$RETURN" -eq 1 ]; then exit 1; fi
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user