Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / matrixssl / examples / Makefile
blob067d41b21858bcb6b9b2ad60696f1205abd59b87
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
9 CC = gcc
10 O = .o
11 SO = .so
12 A = .a
13 E =
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
27 ifdef MATRIXSSL_DEBUG
28 DFLAGS = -g -Wall -DDEBUG
29 else
30 #DFLAGS = -Os
31 DFLAGS = -O3
32 endif
34 ifdef MATRIXSSL_PROFILE
35 DFLAGS += -g -pg
36 endif
38 debug:
39 @$(MAKE) compile "MATRIXSSL_DEBUG = 1"
41 profile:
42 @$(MAKE) compile "MATRIXSSL_PROFILE = 1"
44 gold:
45 @$(MAKE) compile
47 default: debug
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
54 endif
57 # Compile options
59 CFLAGS = $(DFLAGS) -DLINUX
60 LDFLAGS = -lc
63 # Override variables for compilation on Mac OS X (Darwin)
65 ifeq ($(shell uname),Darwin)
66 CC = cc
67 SO = .dylib
68 CFLAGS += -DOSX -isystem -I/usr/include
69 LDFLAGS =
70 MACLINK = ln -f $(LIBRARIES) .
71 endif
74 # Override variables for compilation on uClinux (example only)
76 ifdef UCLINUX
77 CC = /opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
78 STRIP = /opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-strip
79 endif
81 all: compile
83 compile: $(REF_OBJS) $(REF_EXE) $(CLIENT_OBJS) $(CLIENT_EXE)
86 # Manual dependencies
88 *.o: ../matrixSsl.h Makefile
90 $(REF_EXE):$(REF_OBJS)
91 $(CC) -o $@ $^ $(LDFLAGS) $(LIBRARIES)
92 $(MACLINK)
94 $(CLIENT_EXE):$(CLIENT_OBJS)
95 $(CC) -o $@ $^ $(LDFLAGS) $(LIBRARIES)
98 # Clean up all generated files
100 clean:
101 rm -f $(REF_EXE) $(REF_OBJS) \
102 $(CLIENT_EXE) $(CLIENT_OBJS) \
103 *$(SO)