📄 makefile
字号:
# Makefile for easy-tls example application (rudimentary client and server)# $Id: Makefile,v 1.1.1.1 2006-06-26 02:22:36 jack Exp $SOLARIS_CFLAGS=-Wall -pedantic -g -O2SOLARIS_LIBS=-lxnetLINUX_CFLAGS=-Wall -pedantic -g -O2LINUX_LIBS=auto-all: case `uname -s` in \ SunOS) echo Using SunOS configuration; \ make SYSCFLAGS="$(SOLARIS_CFLAGS)" SYSLIBS="$(SOLARIS_LIBS)" all;; \ Linux) echo Using Linux configuration; \ make SYSCFLAGS="$(LINUX_CFLAGS)" SYSLIBS="$(LINUX_LIBS)" all;; \ *) echo "unknown system"; exit 1;; \ esacall: test TAGS# For adapting this Makefile to a different system, only the following# definitions should need customizing:OPENSSLDIR=../..CC=gccSYSCFLAGS=whateverSYSLIBS=whatever############################################################################### SSLeay/OpenSSL imports## OPENSSLDIR (set above) can be either the directory where OpenSSL is# installed or the directory where it was compiled.# We rely on having a new OpenSSL release where include files# have names like <openssl/ssl.h> (not just <ssl.h>).OPENSSLINCLUDES=-I$(OPENSSLDIR)/include# libcrypto.a and libssl.a are directly in $(OPENSSLDIR) if this is# the compile directory, or in $(OPENSSLDIR)/lib if we use an installed# library. With the following definition, we can handle either case.OPENSSLLIBS=-L$(OPENSSLDIR) -L$(OPENSSLDIR)/lib -lssl -lcrypto############################################################################### Stuff for handling the source files#SOURCES=easy-tls.c test.cHEADERS=easy-tls.h test.hDOCSandEXAMPLESetc=Makefile cert.pem cacerts.pemEVERYTHING=$(SOURCES) $(HEADERS) $(DOCSandEXAMPLESetc)ls: ls-lls-l: ls -l $(EVERYTHING)# For RCS:tag: -rcs -n_`date +%y%m%d`: $(EVERYTHING) rcs -nMYTAG $(EVERYTHING) rcs -nMYTAG: $(EVERYTHING)diff: -rcsdiff -rMYTAG -u $(EVERYTHING)today: -rcsdiff -r_`date +%y%m%d` -u $(EVERYTHING)ident: for a in $(EVERYTHING); do ident $$a; done# Distribution .tar:easy-tls.tar.gz: $(EVERYTHING) tar cvf - $(EVERYTHING) | \ gzip -9 > easy-tls.tar.gz# Working .tar:tls.tgz: $(EVERYTHING) tar cfv - `find . -type f -a ! -name '*.tgz' -a ! -name '*.tar.gz'` | \ gzip -9 > tls.tgz# For emacs:etags: TAGSTAGS: $(SOURCES) $(HEADERS) -etags $(SOURCES) $(HEADERS)############################################################################### Compilation## The following definitions are system dependent (and hence defined# at the beginning of this Makefile, where they are more easily found):### CC=gcc### SYSCFLAGS=-Wall -pedantic -g -O2### SYSLIBS=-lxnetEXTRACFLAGS=-DTLS_APP=\"test.h\"# EXTRACFLAGS=-DTLS_APP=\"test.h\" -DDEBUG_TLS## The rest shouldn't need to be touched.#LDFLAGS=$(SYSLIBS) $(OPENSSLLIBS)INCLUDES=$(OPENSSLINCLUDES)CFLAGS=$(SYSCFLAGS) $(EXTRACFLAGS) $(INCLUDES)OBJS=easy-tls.o test.oclean: @rm -f test @rm -f TAGS @rm -f *.o @rm -f coretest: $(OBJS) $(CC) $(OBJS) $(LDFLAGS) -o testtest.o: $(HEADERS)easy-tls.o: $(HEADERS)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -