etc/services - sync with NetBSD-8
[minix.git] / crypto / external / bsd / openssl / dist / demos / easy_tls / Makefile
blobba311622eff2c2238cffbb62a509c8b04ae5ae6a
1 # Makefile for easy-tls example application (rudimentary client and server)
2 # Id: Makefile,v 1.2 2001/09/18 09:15:40 bodo Exp
4 SOLARIS_CFLAGS=-Wall -pedantic -g -O2
5 SOLARIS_LIBS=-lxnet
7 LINUX_CFLAGS=-Wall -pedantic -g -O2
8 LINUX_LIBS=
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
20 all: test TAGS
22 # For adapting this Makefile to a different system, only the following
23 # definitions should need customizing:
25 OPENSSLDIR=../..
26 CC=gcc
28 SYSCFLAGS=whatever
29 SYSLIBS=whatever
32 #############################################################################
34 # SSLeay/OpenSSL imports
36 # OPENSSLDIR (set above) can be either the directory where OpenSSL is
37 # installed or the directory where it was compiled.
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
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
49 #############################################################################
51 # Stuff for handling the source files
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)
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
74 # Distribution .tar:
75 easy-tls.tar.gz: $(EVERYTHING)
76 tar cvf - $(EVERYTHING) | \
77 gzip -9 > easy-tls.tar.gz
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
84 # For emacs:
85 etags: TAGS
86 TAGS: $(SOURCES) $(HEADERS)
87 -etags $(SOURCES) $(HEADERS)
90 #############################################################################
92 # Compilation
94 # The following definitions are system dependent (and hence defined
95 # at the beginning of this Makefile, where they are more easily found):
97 ### CC=gcc
98 ### SYSCFLAGS=-Wall -pedantic -g -O2
99 ### SYSLIBS=-lxnet
101 EXTRACFLAGS=-DTLS_APP=\"test.h\"
102 # EXTRACFLAGS=-DTLS_APP=\"test.h\" -DDEBUG_TLS
105 # The rest shouldn't need to be touched.
107 LDFLAGS=$(SYSLIBS) $(OPENSSLLIBS)
108 INCLUDES=$(OPENSSLINCLUDES)
109 CFLAGS=$(SYSCFLAGS) $(EXTRACFLAGS) $(INCLUDES)
111 OBJS=easy-tls.o test.o
113 clean:
114 @rm -f test
115 @rm -f TAGS
116 @rm -f *.o
117 @rm -f core
119 test: $(OBJS)
120 $(CC) $(OBJS) $(LDFLAGS) -o test
122 test.o: $(HEADERS)
123 easy-tls.o: $(HEADERS)