⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 一个功能全面的电子邮件客户端
💻
📖 第 1 页 / 共 2 页
字号:
#!/usr/bin/make######################################################################                                                                   ## This file is free software; you can redistribute it and/or        ## modify it under the terms of the GNU Library General Public       ## License as published by the Free Software Foundation; either      ## version 2 of the License, or (at your option) any later version.  ##                                                                   ## This library is distributed in the hope that it will be useful,   ## but WITHOUT ANY WARRANTY; without even the implied warranty of    ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU ## Library General Public License for more details.                  ##                                                                   ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the             ## Free Software Foundation, Inc., 59 Temple Place - Suite 330,      ## Boston, MA 02111-1307, USA.                                       ##                                                                   ####################################################################### This Makefile was writen by Alex Scott (magister@kfa.cx)# This is for non-library programs.######################################################################define this to = 1 when compiling on Solaris 2.5 or 2.5.1# Valid targets are:# Linux - Linux/Intel# NT/Unix - NTU# SOLARIS25 - Solaris/Sparc 2.5/2.5.1# SOLARIS   - Solaris/Sparc 2.6 or newer#OSTARGET=NTU  (Cygwin on NT)OSTARGET=LINUXifeq (Makefile.inc,$(wildcard Makefile.inc))  include Makefile.inc  CONFIGURED=yesendifTESTBIN=$(shell sh -c 'ls /usr/bin/test | grep -v "ls:"')ifeq ($(TESTBIN), "")  TESTBIN=/bin/testendif######################### Program info goes here# ONLY USE ONE DEBUGGIN STRATEGY AT A TIME:  DMALLOC, MEMWATCH, EFENCEDEBUG=-1PROFILE=0DMALLOC=0MEMWATCH=0EFENCE=0LANG_DEBUG=0OPTIMIZE=0STATIC=0prefix=$(shell sh -c 'if $(TESTBIN) -n "$(DESTDIR)"; then echo "$(DESTDIR)"; else echo "/usr/local"; fi')PROGRAM=tradeclientMAJOR=0MINOR=9BUILD=0COMPCOUNTFILE=/tmp/$(PROGRAM)$(MAJOR).$(MINOR).$(BUILD).compile.countCOMPILECOUNT=$(shell sh -c 'cat $(COMPCOUNTFILE)')#VERSION="$(MAJOR).$(MINOR).$(BUILD)-$(COMPILECOUNT)"VERSION="$(MAJOR).$(MINOR).$(BUILD)"NEWMAILBACKEND=0WANTLDAP=1LDAP_CACHE=0WANTSSL=0####################################### you shouldn't need to edit these onesDATE=$(shell sh -c 'date +%Y%m%d')USERID=$(shell sh -c 'set | grep EUID | cut -d = -f 2')BASEDIR=$(shell 'pwd')############################################################### Stuff needed for 'make bindist' mainly OS and processor infoOS=$(shell sh -c 'uname -s')PROC=$(shell sh -c 'uname -m')LIBC=$(shell sh -c 'ls -ad /lib/libc.so*')LIBCVER=$(shell sh -c "basename $(LIBC) | sed 's/[A-Za-z.]//g'")ifeq ($(OS), Linux)  LINUXLIBC=-libc$(LIBCVER)endif############################################################### you probably don't need to edit these either unless you like # it arranged differentlySNAP=$(PROGRAM)-$(DATE)DIST=$(PROGRAM)-$(VERSION)BINDISTB=$(PROGRAM)-$(VERSION)-$(OS)-$(PROC)$(LINUXLIBC)SNAPDIR=$(BASEDIR)/$(SNAP)DISTDIR=$(BASEDIR)/$(DIST)BINDISTDIR=$(BASEDIR)/$(BINDIST)IMAPDIR=$(BASEDIR)/imapIMAPVER=4.7cIMAPFILE=$(BASEDIR)/imap-$(IMAPVER).tar.ZPATCH=/usr/bin/patch -p0 -NPATCHDIR=$(BASEDIR)/patchesC-CLIENT-PATCH=$(PATCHDIR)/c-client-4.7.patch# This defines the target that will be made in the imap tree.# for Intel linux, use 'slx'.  See the IMAP tree for other# platforms.ifeq ($(OSTARGET), LINUX)	IMAPTARGET=slxendififeq ($(OSTARGET), SOLARIS25)	IMAPTARGET=gsoendififeq ($(OSTARGET), SOLARIS)	IMAPTARGET=gsoendif################################################################ Where the sources, includes and document are located in your# source tree. Leave DOCDIR blank if you dont have one.SRCDIR=$(BASEDIR)/srcINCLUDE=-I$(BASEDIR)/include -I$(BASEDIR)/c-clientINCLUDEDIR=$(BASEDIR)/includeDOCDIR=$(BASEDIR)/doc############################################################### If you wrote demos or utilities and put them in subdirectory# put thier names here. executed by  "make utils"SUBDIRS=#################################################################### What dir's to clean when running "make clean" or "make distclean"CLEANDIRS=$(SUBDIRS) $(SRCDIR)###################################################################### All dirs that you want to include in the distrubiution or snapshot# usualy its all the CLEANDIRS (includes SUBDIRS) but incase you have# any more spefiy them hereALLDIRS=$(CLEANDIRS) $(INCLUDEDIR) $(DOCDIR) $(BASEDIR)/pics $(PATCHDIR)####################################################### where the lib files and .h files are to be installedPROGRAMINSTALLDIR=$(prefix)/binDOCINSTALLDIR=$(prefix)/doc/$(PROGRAM)########################################### for pictures and shared program infoOTHERINSTALLDIR=$(prefix)/share/$(PROGRAM)############################################################ the files to install to OTHERINSTALLDIROTHERINSTALLFILES=############################################################ where it may have been installed, used by uninstall-moreKNOWNPREFIXES=/usr /usr/local######################################################################### when doing a make dist or make snap what files do you want copied into# the tar.gzFILESTOSAVE=\	COPYING \	CHANGELOG \	README \	Makefile \	$(IMAPFILE) \	$(ALLDIRS)BINFILESTOSAVE=\	COPYING\	CHANGELOG \	README \	Makefile \	$(PROGRAM)################################################## Compiler and your library spefic options go hereCC=gccDEFINES=-DVERSION=\"$(VERSION)\"COPTIONS=-Wall $(DEFINES) $(OPTCFLAGS)ifeq ($OSTARGET), LINUX)	DEFINES+=-DLINUXendififeq ($(OSTARGET), SOLARIS25)	DEFINES+=-DSOLARIS25endififeq ($(OSTARGET), SOLARIS)	DEFINES+=-DSOLARISendififeq ($(STATIC), 1)	CFLAGS+=-static	BINDIST=$(BINDISTB)-staticelse	BINDIST=$(BINDISTB)-dynendififeq ($(DEBUG),-1)	CFLAGS+=$(COPTIONS) -O3 -pipeelse	CFLAGS+=$(COPTIONS) -g3 -pipe	DEFINES+=-DDEBUG=$(DEBUG)endififeq ($(PROFILE), 1)	CFLAGS+= -pg -DPROFILEendif# Only offer serious optimizations when running on Intel/gcc and not sparc# This should ONLY be used on 686 class or better machines and this will# only work with the OSTARGET is LINUX.  This way, we're not trying to# generate pentiumpro optimizations on a sparc boxen. ifeq ($(OSTARGET), LINUX)	ifeq ($(OPTIMIZE), 1)		CFLAGS+=-mpentiumpro -mcpu=pentiumpro -march=pentiumpro	else		CFLAGS+=-m486	endifendififeq ($(LANG_DEBUG), 1)  CFLAGS+=$(COPTIONS) -DLANG_DEBUGendifLIBS=$(OPTLIBS) $(shell sh -c 'gtk-config --libs') $(BASEDIR)/c-client/c-client.a -lcryptINCLUDES=$(INCLUDE) $(shell sh -c 'gtk-config --cflags')# See if electric fence support is requiredifeq ($(EFENCE), 1)	LIBS+= -lefenceendififeq ($(DMALLOC), 1)	LIBS+= -ldmalloc	DEFINES+=-DDMALLOCendififneq ($(MEMWATCH),0)  OBJECTS+=memwatch.o  DEFINES+=-DMEMWATCHendififeq ($(WANTLDAP), 1)	DEFINES+=-DWANTLDAP	LIBS+= -lldap -llber 	ifeq ($(LDAP_CACHE), 1)		DEFINES+=-DLDAP_CACHE	endifendififeq ($(WANTSSL), 1)	DEFINES+=-DWANTSSL	LIBS+= -lcrypto -lsslendififeq ($(NEWMAILBACKEND), 1)	DEFINES+=-DNEWMAILBACKENDendif# below is for makedependALLINCLUDES=-I/usr/include/linux $(INCLUDES)\	$(shell sh -c 'gtk-config --cflags')############################################################################ objects that make up your libaray, you dont have to spefiy the .c or cpp# file cause it test to see if it exist, i havent implemented .cc files# but it would not be hard. what happens is it takes off the .o extention# replaces it with .c test to see if it exist if not it checks if its a# .cpp file, if neather exist it exits, simple enuff.OBJECTS=\	abook-callbacks.o \	abook-loadsave.o \	abook-opts.o \	abook-window.o \	calender-callbacks.o \	calender-loadsave.o \	calender-opts.o \	calender-window.o \	callbacks.o \	clipboard.o \	conv.o \	dialogs.o \	digest-window.o \	file-selector-callbacks.o \	file-selector-window.o \	filter-callbacks.o \	filter-opts.o \	filter-windows.o \	folder-opts.o \	forking.o \	gcalendar.o \	hashtime.o \	imap-window.o \	imap-window-callbacks.o \	ipc.o \	ipc-proxy.o \	lang-support.o \	mail-loadsave.o \	main.o \	main-window-callbacks.o \	main-window.o \	message-callbacks.o \	message-fun.o \	message-window.o \	mime.o \	mm.o \	msearch.o \	netfolders.o \	new-folder.o \	new-message-callbacks.o \	new-message.o \	new-message-window.o \	parser.o \	pipe.o \	pixmap.o \	pop3smtp.o \	pref-loadsave.o \	pref-windows-callbacks.o \	pref-windows.o \	print.o \	schedule-widget.o \	spelling-callbacks.o \	spelling.o \	spelling-window.o \	status-callbacks.o \	status.o \	status-window.o\	support.o \	tcal.o \	tcldap.o# For if you wish to use memwatch (you must supply the .c and .h files)# make sure you set MEMWATCH to non-0 at the top.ifneq ($(MEMWATCH),0)  OBJECTS+=memwatch.o  DEFINES+=-DMEMWATCHendif######################################################### Variables we want to give Makefile's in subdirectorys# this is so the other make files can be skeletonsSUBMAKEALL=\	PROGRAM='$(PROGRAM)'\	MAJOR='$(MAJOR)'\	MINOR='$(MINOR)'\	BUILD='$(BUILD)'\	VERSION='$(VERSION)'\	DATE='$(DATE)'\	USERID='$(USERID)'\	BASEDIR='$(BASEDIR)'\	SRCDIR='$(SRCDIR)'\	INCLUDE='$(INCLUDE)'\	CC='$(CC)'\	CFLAGS='$(CFLAGS)'\	DEFINES='$(DEFINES)'\	LIBS='$(LIBS)'\	INCLUDES='$(INCLUDES)'\	ALLINCLUDES='$(ALLINCLUDES)'\	OBJECTS='$(OBJECTS)'############################################################################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -