/* Copyright (C) 1990, Digital Equipment Corporation. */ /* All rights reserved. */ /* See the file COPYRIGHT for a full description. */ /* Last modified on Tue Jul 17 23:28:47 1990 by muller */ /* modified on Fri Jun 29 13:53:14 1990 by piet@cs.ruu.nl */ /* modified on Fri Apr 13 15:24:27 1990 by jerome */ /* This template produces the target 'all' used to compile. This target is refined in two sub-target, 'interfaces' and 'implementations' executed in that order, before the other 'all' targets */ TARGET = all #include "undef" /*---------------------------------------------------------------------------*/ #define interface(i) @@\ interfaces:: i.io #define implementation(m) @@\ implementations:: m.mo #define C_object(f) @@\ implementations:: f.o #define derived_C_object(f) @@\ implementations:: f.o #define S_object(f) @@\ implementations:: f.o #define library @@\ all:: libm3$(LIB).a @@\ libm3$(LIB).a: FRC @@\ ar ru libm3$(LIB).a *''/''*.o *''/''*.io *''/''*.mo @@\ $(RANLIB) libm3$(LIB).a #define executable(n,libs) @@\ all:: n @@\ n: FRC ; $(M3) $(M3FLAGS) $(M3OPT) -o n *.o *.io *.mo libs #define man_page(p,sec) @@\ all:: p.sec #define Script(name) @@\ all:: name @@\ name: name.script @@\ $(CPP) -P -D${MACHINE} name.script | sed -e 's/ #/#/' > name @@\ chmod +x name #define C_program(n) @@\ all:: n @@\ n: n.c ; $(CC) $(CFLAGS) $(COPT) -D$(MACHINE) -o n n.c $(CLINKFILES) #define M3_program(name,libs) @@\ implementations:: name @@\ name: name.mo ; $(M3) $(M3FLAGS) $(M3OPT) -o name name.mo libs #include "default_rules" /*---------------------------------------------------------------------------*/ #include "config" #include "generic" /* When we compile Modula-3 files, we compile first the interfaces, then the implemenations */ all:: interfaces implementations interfaces:: implementations:: M3 = .ROOT/system/driver/m3.local #include INCLUDE_IMAKEFILE /*---------------------------------------------------------------------------*/ .SUFFIXES: .SUFFIXES: .m3 .mo .i3 .io .c .s .o .i3.io: ; $(M3) $(M3FLAGS) $(M3OPT) -c $*.i3 .m3.mo: ; $(M3) $(M3FLAGS) $(M3OPT) -c $*.m3 .c.o: ; $(CC) $(CFLAGS) $(COPT) -D$(MACHINE) -c $*.c #if defined(AP3000_ARCHITECTURE) .asm.o: ; as $*.asm -nl -dba; mv $*.bin $*.o #else .s.o: ; as -o $*.o $*.s #endif #include "man_rules"