mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 15:55:32 +00:00
- Introduced windows DLL build and SYS_LDFLAGS
This commit is contained in:
parent
44b819a2d9
commit
a585beb87e
|
@ -17,6 +17,9 @@ DLEXT=so
|
||||||
# OSX shared library extension:
|
# OSX shared library extension:
|
||||||
# DLEXT=dylib
|
# DLEXT=dylib
|
||||||
|
|
||||||
|
# Windows shared library extension:
|
||||||
|
# DLEXT=dll
|
||||||
|
|
||||||
OBJS= aes.o arc4.o base64.o \
|
OBJS= aes.o arc4.o base64.o \
|
||||||
bignum.o camellia.o certs.o \
|
bignum.o camellia.o certs.o \
|
||||||
cipher.o cipher_wrap.o debug.o \
|
cipher.o cipher_wrap.o debug.o \
|
||||||
|
@ -33,7 +36,7 @@ OBJS= aes.o arc4.o base64.o \
|
||||||
|
|
||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
all: static
|
all: static shared
|
||||||
|
|
||||||
static: libpolarssl.a
|
static: libpolarssl.a
|
||||||
|
|
||||||
|
@ -41,9 +44,9 @@ shared: libpolarssl.$(DLEXT)
|
||||||
|
|
||||||
libpolarssl.a: $(OBJS)
|
libpolarssl.a: $(OBJS)
|
||||||
echo " AR $@"
|
echo " AR $@"
|
||||||
ar r $@ $(OBJS)
|
$(AR) r $@ $(OBJS)
|
||||||
echo " RL $@"
|
echo " RL $@"
|
||||||
ranlib $@
|
$(AR) s $@
|
||||||
|
|
||||||
libpolarssl.so: libpolarssl.a
|
libpolarssl.so: libpolarssl.a
|
||||||
echo " LD $@"
|
echo " LD $@"
|
||||||
|
@ -53,6 +56,10 @@ libpolarssl.dylib: libpolarssl.a
|
||||||
echo " LD $@"
|
echo " LD $@"
|
||||||
$(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS)
|
$(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS)
|
||||||
|
|
||||||
|
libpolarssl.dll: libpolarssl.a
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
echo " CC $<"
|
echo " CC $<"
|
||||||
$(CC) $(CFLAGS) $(OFLAGS) -c $<
|
$(CC) $(CFLAGS) $(OFLAGS) -c $<
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
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
|
||||||
LDFLAGS += -L../library -lpolarssl
|
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
|
||||||
|
|
||||||
APPS = aes/aescrypt2 aes/crypt_and_hash \
|
APPS = aes/aescrypt2 aes/crypt_and_hash \
|
||||||
hash/hello hash/generic_sum \
|
hash/hello hash/generic_sum \
|
||||||
|
|
|
@ -7,7 +7,7 @@ CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-state
|
||||||
-Wno-unused-function -Wno-unused-value
|
-Wno-unused-function -Wno-unused-value
|
||||||
|
|
||||||
OFLAGS = -O
|
OFLAGS = -O
|
||||||
LDFLAGS += -L../library -lpolarssl
|
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
|
||||||
|
|
||||||
APPS = test_suite_aes test_suite_arc4 \
|
APPS = test_suite_aes test_suite_arc4 \
|
||||||
test_suite_base64 test_suite_camellia \
|
test_suite_base64 test_suite_camellia \
|
||||||
|
|
Loading…
Reference in a new issue