2 # MatrixSSL example applications makefile
3 # 'make' builds debug (Default).
4 # 'make gold' builds optimized.
6 # Copyright (c) PeerSec Networks, 2002-2009. All Rights Reserved
15 LIBRARIES
= ..
/src
/libmatrixssl
$(SO
)
16 STATICS
= ..
/src
/libmatrixsslstatic
$(A
)
18 REF_EXE
= httpsReflector
$(E
)
19 REF_OBJS
= httpsReflector
$(O
) sslSocket
$(O
)
21 CLIENT_EXE
= httpsClient
$(E
)
22 CLIENT_OBJS
= httpsClient
$(O
) sslSocket
$(O
)
25 # This is set by the debug target below
28 DFLAGS
= -g
-Wall
-DDEBUG
34 ifdef MATRIXSSL_PROFILE
39 @
$(MAKE
) compile
"MATRIXSSL_DEBUG = 1"
42 @
$(MAKE
) compile
"MATRIXSSL_PROFILE = 1"
50 # Override variables for compilation on x86-64 (AMD64, Nacona, etc)
52 ifeq ($(shell uname
-m
),x86_64
)
53 DFLAGS
+= -march
=k8
-fPIC
-DFP_64BIT
-DTFM_X86_64
-DRDTSC
59 CFLAGS
= $(DFLAGS
) -DLINUX
63 # Override variables for compilation on Mac OS X (Darwin)
65 ifeq ($(shell uname
),Darwin
)
68 CFLAGS
+= -DOSX
-isystem
-I
/usr
/include
70 MACLINK
= ln
-f
$(LIBRARIES
) .
74 # Override variables for compilation on uClinux (example only)
77 CC
= /opt
/brcm
/hndtools-mipsel-uclibc
/bin
/mipsel-uclibc-gcc
78 STRIP
= /opt
/brcm
/hndtools-mipsel-uclibc
/bin
/mipsel-uclibc-strip
83 compile
: $(REF_OBJS
) $(REF_EXE
) $(CLIENT_OBJS
) $(CLIENT_EXE
)
88 *.o
: ..
/matrixSsl.h Makefile
90 $(REF_EXE
):$(REF_OBJS
)
91 $(CC
) -o
$@
$^
$(LDFLAGS
) $(LIBRARIES
)
94 $(CLIENT_EXE
):$(CLIENT_OBJS
)
95 $(CC
) -o
$@
$^
$(LDFLAGS
) $(LIBRARIES
)
98 # Clean up all generated files
101 rm -f
$(REF_EXE
) $(REF_OBJS
) \
102 $(CLIENT_EXE
) $(CLIENT_OBJS
) \