The Queen's University of Belfast
Parallel Computer Centre

[Next] [Previous] [Top]

Installation Utilities


Installation Utilities

tar

tape archive

tar cvf tarfile filename {c => create}

tar tvf tarfile {t => table of contents}

tar xvf tarfile {x => extract}

uncompress

uncompress [-cv] filename

uncompress myfile.Z

uuencode/uudecode

uudecode encoded-filename

begin 600 filename

{600 represents ownership and permission modes}

gzip/gunzip

gunzip filename.gz

make utility

Limitations

Makefile

Variables

name = a list of words which may be \

quite long

names = fred jim joe

names = $(names) tom dick harry

Defining dependencies

target:<tab> list of dependencies

<tab> command line 1

<tab> command line 2

Special symbols

clean: myfile.c

@echo " Cleaning directory."

rm -f core $*.o $*

Example

# Makefile for Scales

CC = gcc

COMPILER_FLAGS = -g -ansi -pedantic -Wall \

-Wmissing -prototypes -Wno -implicit

# The name of the executable

PROGRAM = scales

# The object files

OBJS = main.o scale_routines.o gfunctions.o \

printing.o

# How to make the program

$(PROGRAM): $(OBJS)

@echo "Linking Object files"

$(CC) -o $(PROGRAM) $(OBJS)

$(OBJS): config.h my_headers.h standard_headers.h

@echo "Compiling Source files..."

$(CC) -c $(COMPILER_FLAGS) $*.c

clean:

\rm -f *.ln *.o core errs $(PROGRAM)

Default Transformations

foo.c foo.f me.tiff

.SUFFIXES: .ada .new .old .GIF .tiff

would add these suffixes to the known list and

.SUFFIXES

would delete the list of known suffixes. This is rarely used.

.src.dst: ; rule

where .src and .dst are the source and destination suffixes.

.GIF.tiff: ; jpeg $< -o $@

# Simple makefile example

#Define suffixes

.SUFFIXES: .GIFF .tiff

#Define a rule

.GIFF.tiff ; jpeg $< -o $@

#Simple dependency graph

all: tmp.tiff

The command line

%make install

%make clean

%make myfile

Related Commands

dolib: $(OBJECTS)

rm -f $(LIBNAME)

ar rv $(LIBNAME) $(OBJECTS)

ranlib $(LIBNAME)

imake

xmkmf

xmkmf [-a] [topdir [ curdir]]

aimk


[Next] [Previous] [Top]
All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.
Maintained by Alan Rea, email A.Rea@qub.ac.uk
Generated with CERN WebMaker