diff options
Diffstat (limited to 'src/lib/libssl/src/demos/easy_tls/Makefile')
-rw-r--r-- | src/lib/libssl/src/demos/easy_tls/Makefile | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/src/lib/libssl/src/demos/easy_tls/Makefile b/src/lib/libssl/src/demos/easy_tls/Makefile new file mode 100644 index 0000000000..fd3c246ef4 --- /dev/null +++ b/src/lib/libssl/src/demos/easy_tls/Makefile | |||
@@ -0,0 +1,123 @@ | |||
1 | # Makefile for easy-tls example application (rudimentary client and server) | ||
2 | # $Id: Makefile,v 1.1 2002/05/15 02:29:18 beck Exp $ | ||
3 | |||
4 | SOLARIS_CFLAGS=-Wall -pedantic -g -O2 | ||
5 | SOLARIS_LIBS=-lxnet | ||
6 | |||
7 | LINUX_CFLAGS=-Wall -pedantic -g -O2 | ||
8 | LINUX_LIBS= | ||
9 | |||
10 | |||
11 | auto-all: | ||
12 | case `uname -s` in \ | ||
13 | SunOS) echo Using SunOS configuration; \ | ||
14 | make SYSCFLAGS="$(SOLARIS_CFLAGS)" SYSLIBS="$(SOLARIS_LIBS)" all;; \ | ||
15 | Linux) echo Using Linux configuration; \ | ||
16 | make SYSCFLAGS="$(LINUX_CFLAGS)" SYSLIBS="$(LINUX_LIBS)" all;; \ | ||
17 | *) echo "unknown system"; exit 1;; \ | ||
18 | esac | ||
19 | |||
20 | all: test TAGS | ||
21 | |||
22 | # For adapting this Makefile to a different system, only the following | ||
23 | # definitions should need customizing: | ||
24 | |||
25 | OPENSSLDIR=../.. | ||
26 | CC=gcc | ||
27 | |||
28 | SYSCFLAGS=whatever | ||
29 | SYSLIBS=whatever | ||
30 | |||
31 | |||
32 | ############################################################################# | ||
33 | # | ||
34 | # SSLeay/OpenSSL imports | ||
35 | # | ||
36 | # OPENSSLDIR (set above) can be either the directory where OpenSSL is | ||
37 | # installed or the directory where it was compiled. | ||
38 | |||
39 | # We rely on having a new OpenSSL release where include files | ||
40 | # have names like <openssl/ssl.h> (not just <ssl.h>). | ||
41 | OPENSSLINCLUDES=-I$(OPENSSLDIR)/include | ||
42 | |||
43 | # libcrypto.a and libssl.a are directly in $(OPENSSLDIR) if this is | ||
44 | # the compile directory, or in $(OPENSSLDIR)/lib if we use an installed | ||
45 | # library. With the following definition, we can handle either case. | ||
46 | OPENSSLLIBS=-L$(OPENSSLDIR) -L$(OPENSSLDIR)/lib -lssl -lcrypto | ||
47 | |||
48 | |||
49 | ############################################################################# | ||
50 | # | ||
51 | # Stuff for handling the source files | ||
52 | # | ||
53 | |||
54 | SOURCES=easy-tls.c test.c | ||
55 | HEADERS=easy-tls.h test.h | ||
56 | DOCSandEXAMPLESetc=Makefile cert.pem cacerts.pem | ||
57 | EVERYTHING=$(SOURCES) $(HEADERS) $(DOCSandEXAMPLESetc) | ||
58 | |||
59 | ls: ls-l | ||
60 | ls-l: | ||
61 | ls -l $(EVERYTHING) | ||
62 | # For RCS: | ||
63 | tag: | ||
64 | -rcs -n_`date +%y%m%d`: $(EVERYTHING) | ||
65 | rcs -nMYTAG $(EVERYTHING) | ||
66 | rcs -nMYTAG: $(EVERYTHING) | ||
67 | diff: | ||
68 | -rcsdiff -rMYTAG -u $(EVERYTHING) | ||
69 | today: | ||
70 | -rcsdiff -r_`date +%y%m%d` -u $(EVERYTHING) | ||
71 | ident: | ||
72 | for a in $(EVERYTHING); do ident $$a; done | ||
73 | |||
74 | # Distribution .tar: | ||
75 | easy-tls.tar.gz: $(EVERYTHING) | ||
76 | tar cvf - $(EVERYTHING) | \ | ||
77 | gzip -9 > easy-tls.tar.gz | ||
78 | |||
79 | # Working .tar: | ||
80 | tls.tgz: $(EVERYTHING) | ||
81 | tar cfv - `find . -type f -a ! -name '*.tgz' -a ! -name '*.tar.gz'` | \ | ||
82 | gzip -9 > tls.tgz | ||
83 | |||
84 | # For emacs: | ||
85 | etags: TAGS | ||
86 | TAGS: $(SOURCES) $(HEADERS) | ||
87 | -etags $(SOURCES) $(HEADERS) | ||
88 | |||
89 | |||
90 | ############################################################################# | ||
91 | # | ||
92 | # Compilation | ||
93 | # | ||
94 | # The following definitions are system dependent (and hence defined | ||
95 | # at the beginning of this Makefile, where they are more easily found): | ||
96 | |||
97 | ### CC=gcc | ||
98 | ### SYSCFLAGS=-Wall -pedantic -g -O2 | ||
99 | ### SYSLIBS=-lxnet | ||
100 | |||
101 | EXTRACFLAGS=-DTLS_APP=\"test.h\" | ||
102 | # EXTRACFLAGS=-DTLS_APP=\"test.h\" -DDEBUG_TLS | ||
103 | |||
104 | # | ||
105 | # The rest shouldn't need to be touched. | ||
106 | # | ||
107 | LDFLAGS=$(SYSLIBS) $(OPENSSLLIBS) | ||
108 | INCLUDES=$(OPENSSLINCLUDES) | ||
109 | CFLAGS=$(SYSCFLAGS) $(EXTRACFLAGS) $(INCLUDES) | ||
110 | |||
111 | OBJS=easy-tls.o test.o | ||
112 | |||
113 | clean: | ||
114 | @rm -f test | ||
115 | @rm -f TAGS | ||
116 | @rm -f *.o | ||
117 | @rm -f core | ||
118 | |||
119 | test: $(OBJS) | ||
120 | $(CC) $(OBJS) $(LDFLAGS) -o test | ||
121 | |||
122 | test.o: $(HEADERS) | ||
123 | easy-tls.o: $(HEADERS) | ||