make - a program for maintaining large programs

     make [-f file] [-adeiknpqrst] [option] ... [target]


     -f   Use file as the makefile

     -d   Print debugging information

     -e   Environment overrides makefile macros

     -i   Ignore status returned by commands

     -k   On error, skip to next command

     -n   Report, but do not execute

     -p   Print macros and targets

     -q   Question up-to-dateness of target

     -r   Rule inhibit; do not use default rules

     -s   Silent mode

     -t   Touch files instead of making them


     make kernel         # Make kernel up to date

     make -n -f mfile    # Tell what needs to be done


     Make is a program that is normally used  for  developing  large  programs
     consisting  of  multiple  files.   It  keeps  track of which object files
     depend on which source and  header  files.   When  called,  it  does  the
     minimum amount of recompilation to bring the target file up to date.

     The file dependencies are expected  in  makefile  or  Makefile  ,  unless
     another file is specified with -f.  Make has some default rules built in,
     for example, it knows how to make .o files from  .c  files.   Here  is  a
     sample makefile .

       d=/user/ast                            # d is a macro
       program: head.o tail.o                 # program depends on these
                cc -o program head.o tail.o   # tells how to make program
                echo Program done.            # announce completion
       head.o:  $d/def.h head.c               # head.o depends on these
       tail.o:  $d/var.h tail.c               # tail.o depends on these

     A complete description of make would require too much space  here.   Many
     books  on  UNIX  discuss make . Study the numerous Makefiles in the MINIX
     source tree for examples.