📄 makefile
字号:
################################################################################ Makefile for liftpack## Description: Wavelet constructor on the interval using the lifting# scheme and polynomial interpolation.## $Id: Makefile,v 1.69 1997/04/03 15:30:45 fernande Exp $# $Source: /sgi.acct/sweldens/cvs/liftpack/Makefile,v $# Author: Gabriel Fernandez############################################################################################################################################################## This file defines the following targets:# ===========================================================================# <null target> or all: makes your application.# # depend: makes dependencies.# # clean: removes all the usual stuff.# # tags: creates emacs style TAGS file.## ctags: creates vi style TAGS file.## backup: makes a copy of all the source files and Makefile.## dist, dist1: creates a compressed file with the distribution files.## new: makes the application from scratch.############################################################################### ############################################################################### Global Definitions -- DO NOT EDIT##############################################################################include make.env############################################################################### Directories -- EDIT THESE############################################################################### Binary executablesBINDIR=./bin# Header filesINCDIR=./include# Library filesLIBDIR=./lib# SubdirectoriesSUBDIRS=\ Files\ Lifting\ Util############################################################################### Applications -- EDIT THESE############################################################################### Compress routinesCOMPRESS=gzip# Compress optionsCOMPRESSOPTIONS=-9v# Installation scriptINSTALL=./install.sh############################################################################### Application file definitions -- EDIT THESE############################################################################### You may need to make sub-definitions for these definitions if you have# multiple languages, or other requirements.# Additional files that are in the package but don't form part of the codeADDFILES=\ .dep\ COPYRIGH\ LICENSE\ Makefile# All your source filesFLTSRCS=\ flwtfilt.cAPISRCS=\ flwtapi.cSRCS=\ $(FLTSRCS)\ $(APISRCS)# source files with no associated .o SRCSNOO=# source files with no associated .h SRCSNOH=\ main.c# header files with no associated .c HDRSNOS=\ $(INCDIR)/flwtdef.h\ $(INCDIR)/image.h# sources that are #include'd, and have no associated .oTABLESRCS=\ copyrinc.h\ liceninc.hALLSRCS=$(SRCS) $(SRCSNOH) $(SRCSNOO) $(TABLESRCS)# All the local .h files (these are not automatically depended)# HDRS=$(HDRSNOS) $(SRCS:.c=.h) $(SRCSNOO:.c=.h)HDRS=\ $(HDRSNOS)\ $(INCDIR)/flwtfilt.h\ $(INCDIR)/flwtapi.h# All .o files generatedOBJS=\ $(FLTSRCS:.c=.o)\ $(APISRCS:.c=.o)ALLOBJS=$(OBJS) $(SRCSNOH:.c=.o)# Man pages, etc. (leave blank if none)DOCS=## Target information#TARGET_NAME = liftpackTARGET = $(BINARY_DIR)/$(TARGET_NAME)VERSION = 1.0DIST_NAME = $(TARGET_NAME)-$(VERSION)-$(CC)DIST_DIR = $(TARGET_NAME)-$(VERSION)# Final-stage application compiler (or linker) name (cc, cs, cmf, f77,...)TARGET_COMPILER=$(CC)# Library namesLIB_TARGETS=$(LIBDIR)/libflwt.a $(LIBDIR)/libfile.a $(LIBDIR)/libutil.a# Final-stage application compiler (or linker) name (cc, cs, cmf, f77,...)TARGET_COMPILER=$(CC)# Final-stage linker flags (-L<libdir> goes here)TARGET_COMPILER_FLAGS=$(CFLAGS) $(LIB)############################################################################### Application-specific definitions -- EDIT THESE############################################################################### Put any libs you use here. These will be included on the link line.LIBS=-lflwt -lfile -lutil -lm# Put any include directories (-I...) here. They will be used to build# your .o's. This line is usually left blank.#INC=-I$(INCDIR)# Put any library directories (-L...) here. They will be used to build# your executable. This line is usually left blank.#LIB=-L$(LIBDIR)# Use these to override global definitions# CDEF=# DEBUG=# DATATYPE=# ----------------------------------------------------------------------------# -- You shouldn't need to edit anything below here, unless you have more# -- than one target or are building a library, or you're doing something# -- nonstandard.# ----------------------------------------------------------------------------############################################################################### Language definitions##############################################################################CFLAGS=$(INC) $(CDEF) $(DATATYPE)LDFLAGS=$(LIB)# CC=<C compiler>############################################################################### extra default rules##############################################################################.SUFFIXES: .c .o.c: $(CC) $(CFLAGS) -o $@ $<.c.o: $(CC) $(CFLAGS) $(DEBUG) -c $<.o: $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LIBS)# This rule must be first. It insures that the desired target is the default.default all: $(LIB_TARGETS) $(TARGET)############################################################################### Application-specific rules and dependencies - may need editing##############################################################################$(TARGET): $(ALLOBJS) $(LIB_TARGETS) @echo "creating executable..." $(TARGET_COMPILER) -o $@ $(TARGET_COMPILER_FLAGS) $(ALLOBJS) $(LIBS) @echo $@ is made.$(LIB_TARGETS): @for i in $(SUBDIRS) ;\ do \ if [ -d $$i ]; then \ ( cd $$i ; \ $(MAKE) $(MFLAGS) all ; \ ); \ fi \ done############################################################################### General-purpose targets - do not edit, in general:# You may have to edit the depend line if you need extra includes.##############################################################################install: new @echo "OK!"preinstall: @echo "" @echo "*** LIFTPACK INSTALLATION SCRIPT ***" @echo " (Rev. 2.0 18-Nov-1996)" @echo "" @echo "Verify existence of binary and library directories" @if [ -d bin ]; then \ echo "bin directory already exists..."; \ else \ echo "creating bin directory..."; \ mkdir bin; \ fi @if [ -d lib ]; then \ echo "lib directory already exists..."; \ else \ echo "creating lib directory..."; \ mkdir lib; \ fi @echo "" @echo "Verify existence of dependecy files" @touch .dep ; chmod 644 .dep ; @touch Files/.dep ; chmod 644 Files/.dep ; @touch Lifting/.dep ; chmod 644 Lifting/.dep ; @touch Util/.dep ; chmod 644 Util/.dep ; @echo "" @echo "Create liftpack executable and libraries"depend: $(ALLSRCS) $(HDRS) @echo "making dependencies" "in `pwd`..."; \ # Use the following line if your compiler does not \ # accept the -M flag. \ #output=.dep flags=$(INC) ./depend.sh $(ALLSRCS); \ # Use the following line if your compiler does \ # accept the -M flag. \ $(CC) $(CFLAGS) $(ALLSRCS) -M > .dep ; \ for i in $(SUBDIRS) ;\ do \ if [ -d $$i ]; then \ ( cd $$i ; \ $(MAKE) $(MFLAGS) depend ; \ ); \ fi \ done @echo dependencies are done. @echo ""clean: @echo "cleaning" "in `pwd`..."; @rm -f $(ALLOBJS) core *~ *.s .dep *.o *.a TAGS tags a.out *.out #* *.bak ; @touch .dep; chmod 666 .dep ; @for i in $(SUBDIRS) ;\ do \ if [ -d $$i ]; then \ ( cd $$i ; \ $(MAKE) $(MFLAGS) clean ; \ ); \ fi \ done @echo cleaning is done. @echo ""new: preinstall @$(MAKE) $(MFLAGS) clean ; \ $(MAKE) $(MFLAGS) depend ; \ $(MAKE) $(MFLAGS) alltags: etags $(ALLSRCS) $(HDRS)ctags: ctags $(ALLSRCS) $(HDRS)backup1: @$(MAKE) $(MFLAGS) dist ; \ mv ../$(DIST_NAME).tar.gz ../.backupbackup2: @$(MAKE) $(MFLAGS) dist1 ; \ mv ../$(DIST_NAME).shar.gz ../.backupdist: @$(MAKE) $(MFLAGS) clean ; \ rm -f $(TARGET) ; \ echo "creating tar file..." ; \ ( cd .. ; \ tar cvf $(DIST_NAME).tar $(DIST_DIR) ; \ echo "" ; \ echo "compressing file..." ; \ $(COMPRESS) $(COMPRESSOPTIONS) $(DIST_NAME).tar )dist1: @$(MAKE) $(MFLAGS) clean ; \ rm -f $(TARGET) ; \ ( cd .. ; \ echo "creating self-executable script..." ; \ shar $(DIST_DIR) > $(DIST_NAME).shar ; \ chmod 755 $(DIST_NAME).shar ; \ echo "" ; \ echo "compressing file..." ; \ $(COMPRESS) $(COMPRESSOPTIONS) $(DIST_NAME).shar ).IGNORE:# DO NOT DELETE THIS LINE -- make depend depends on it.include .dep
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -