/* 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:00 1990 by muller@cs.ruu.nl */ /* modified on Fri Jun 29 13:50:19 1990 by piet@cs.ruu.nl */ /* This template produces the target 'fromC' used to compile from C files */ TARGET = fromC #include "undef" /*---------------------------------------------------------------------------*/ #define interface(i) @@\ interfaces:: i.io #define implementation(m) @@\ implementations:: m.mo #define C_object(f) @@\ implementations:: f.o #define S_object(f) @@\ implementations:: f.o #define library @@\ fromC:: libm3$(LIB).a @@\ libm3$(LIB).a: FRC @@\ ar ru libm3$(LIB).a *''/''*.o *''/''*.io *''/''*.mo @@\ $(RANLIB) libm3$(LIB).a #define executable(n,libs) @@\ fromC:: n @@\ n: FRC ; $(M3) $(M3FLAGS) $(M3OPT) -o n *.o *.io *.mo libs #define man_page(p,sec) @@\ fromC:: p.sec #define Script(name) @@\ fromC:: name @@\ name: name.script @@\ $(CPP) -P -D${MACHINE} name.script | sed -e 's/ #/#/' > name @@\ chmod +x name #define C_program(n) @@\ fromC:: 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" M3 = .ROOT/system/driver/m3.local /* When we compile Modula-3 files, we compile first the interfaces, then the implemenations */ fromC:: interfaces implementations interfaces:: implementations:: #include INCLUDE_IMAKEFILE /**/#--------------------------------------------------------- Suffix rules --- .SUFFIXES: .SUFFIXES: .mc .mo .ic .io .c .s .o .ic.io: @ln -s $*.ic $*.ic.c @echo $(CC) -I.ROOT/system/runtime $(CFLAGS) $(COPT) -c $*.ic @$(CC) -I.ROOT/system/runtime $(CFLAGS) $(COPT) -c $*.ic.c @mv $*.ic.o $*.io @/bin/rm -f $*.ic.c .mc.mo: @ln -s $*.mc $*.mc.c @echo $(CC) -I.ROOT/system/runtime $(CFLAGS) $(COPT) -c $*.mc @$(CC) -I.ROOT/system/runtime $(CFLAGS) $(COPT) -c $*.mc.c @mv $*.mc.o $*.mo @/bin/rm -f $*.mc.c .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"