| [9] | 1 | # Master Makefile to compile everything in /usr/src except the system.
 | 
|---|
 | 2 | 
 | 
|---|
 | 3 | MAKE    = exec make -$(MAKEFLAGS)
 | 
|---|
 | 4 | 
 | 
|---|
 | 5 | usage:
 | 
|---|
 | 6 |         @echo "" 
 | 
|---|
 | 7 |         @echo "Master Makefile for MINIX commands and utilities." 
 | 
|---|
 | 8 |         @echo "Root privileges are required for some actions." 
 | 
|---|
 | 9 |         @echo "" 
 | 
|---|
 | 10 |         @echo "Usage:" 
 | 
|---|
 | 11 |         @echo " make world      # Compile everything (libraries & commands)" 
 | 
|---|
 | 12 |         @echo " make includes   # Install include files from src/" 
 | 
|---|
 | 13 |         @echo " make libraries  # Compile and install libraries" 
 | 
|---|
 | 14 |         @echo " make cmds       # Compile all, commands, but don't install" 
 | 
|---|
 | 15 |         @echo " make install    # Compile and install commands" 
 | 
|---|
 | 16 |         @echo " make depend     # Generate required .depend files" 
 | 
|---|
 | 17 |         @echo " make clean      # Remove all compiler results" 
 | 
|---|
 | 18 |         @echo "" 
 | 
|---|
 | 19 |         @echo "Run 'make' in tools/ to create a new MINIX configuration." 
 | 
|---|
 | 20 |         @echo "" 
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | # world has to be able to make a new system, even if there
 | 
|---|
 | 23 | # is no complete old system. it has to install commands, for which
 | 
|---|
 | 24 | # it has to install libraries, for which it has to install includes,
 | 
|---|
 | 25 | # for which it has to install /etc (for users and ownerships).
 | 
|---|
 | 26 | # etcfiles also creates a directory hierarchy in its
 | 
|---|
 | 27 | # 'make install' target.
 | 
|---|
 | 28 | # 
 | 
|---|
 | 29 | # etcfiles has to be done first.
 | 
|---|
 | 30 | world: includes depend libraries cmds install postinstall
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 | includes:
 | 
|---|
 | 33 |         cd include && $(MAKE) install gcc
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | libraries:
 | 
|---|
 | 36 |         cd lib && $(MAKE) all install
 | 
|---|
 | 37 | 
 | 
|---|
 | 38 | cmds:
 | 
|---|
 | 39 |         if [ -f commands/Makefile ] ; then cd commands && $(MAKE) all; fi
 | 
|---|
 | 40 | 
 | 
|---|
 | 41 | install::
 | 
|---|
 | 42 |         if [ -f commands/Makefile ] ; then cd commands && $(MAKE) install; fi
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | depend::
 | 
|---|
 | 45 |         mkdep kernel
 | 
|---|
 | 46 |         mkdep servers
 | 
|---|
 | 47 |         mkdep drivers
 | 
|---|
 | 48 |         cd kernel && $(MAKE) $@
 | 
|---|
 | 49 |         cd servers && $(MAKE) $@
 | 
|---|
 | 50 |         cd drivers && $(MAKE) $@
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 | 
 | 
|---|
 | 53 | clean::
 | 
|---|
 | 54 |         cd lib && $(MAKE) $@
 | 
|---|
 | 55 |         test ! -f commands/Makefile || { cd commands && $(MAKE) $@; }
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 | etcfiles::
 | 
|---|
 | 58 |         cd etc && $(MAKE) install
 | 
|---|
 | 59 | 
 | 
|---|
 | 60 | clean::
 | 
|---|
 | 61 |         cd test && $(MAKE) $@
 | 
|---|
 | 62 | 
 | 
|---|
 | 63 | all install clean::
 | 
|---|
 | 64 |         cd boot && $(MAKE) $@
 | 
|---|
 | 65 |         cd man && $(MAKE) $@    # First manpages, then commands
 | 
|---|
 | 66 |         test ! -f commands/Makefile || { cd commands && $(MAKE) $@; }
 | 
|---|
 | 67 |         cd tools && $(MAKE) $@
 | 
|---|
 | 68 |         cd servers && $(MAKE) $@
 | 
|---|
 | 69 | 
 | 
|---|
 | 70 | postinstall:
 | 
|---|
 | 71 |         cd etc && $(MAKE) $@
 | 
|---|