next up previous contents index
Next: B Header Dateien und Up: A Benutzung der Compiler Previous: A.6 PVM

A.7 Makefiles

Inhalt, z.B.:

       PVMLIB=$(PVM_ROOT)/lib/$(PVMARCH)/libpvm3.a 
       MTCFLAGS=-d/usr/local/lib/reuse -d/usr/local/lib/src/gmd/ksr/lib  

       name.h: name.md 
       <TAB>   /usr/local/bin/mtc $(MTCFLAGS) $(<)   

       name.c: name.mi 
       <TAB>   /usr/local/bin/mtc $(MTCFLAGS) $(<)   

       name.o: name.c 
       <TAB>   cc -c $(<) $(&)  

       name: name.o 
       <TAB>   cc -para $(<) $(PVMLIB)
 

Aufruf:

       make name

Beispiel zu Aufgabe 3.

# --------------------------------------------------------
# $Id: Makefile,v 1.1.1.1 1993/06/11 12:54:41 kredel Exp $
# --------------------------------------------------------
# $Log: $
# --------------------------------------------------------

GMD=/usr/local
MTC=$(GMD)/bin/mtc
MTCFLAGS=-d$(GMD)/lib/reuse -d$(GMD)/lib/src/gmd/ksr/lib  

%.h:%.md
	$(MTC) $(MTCFLAGS) $<

%.c:%.mi
	$(MTC) $(MTCFLAGS) $<


CFLAGS=-I$(GMD)/include/m2c -I$(GMD)/lib/src/gmd/ksr/include

LLIB=$(GMD)/lib/src/gmd/ksr/lib/libksrmtc.a 

all: 

ppauf3: ppauf3.o 
	cc -para $(CFLAGS) -o $@ $? $(LLIB) $(GMD)/lib/mtc/libreuse.a 

ppauf3.c: ppauf3.mi 

clean:
	/bin/rm -f *.o *.c



parallel@rz.uni-mannheim.de
Mon Okt 28 14:38:25 PST 1996