source: trunk/minix/tools/Makefile@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

  • Property svn:executable set to *
File size: 2.6 KB
RevLine 
[9]1# Makefile for the kernel image.
2
3u=/usr
4CC= exec cc
5CFLAGS= -O -D_MINIX -D_POSIX_SOURCE
6MDEC= /usr/mdec
7
8# Specify the programs that are part of the system image.
9PROGRAMS= ../kernel/kernel \
10 ../servers/pm/pm \
11 ../servers/fs/fs \
12 ../servers/rs/rs \
13 ../servers/ds/ds \
14 ../drivers/tty/tty \
15 ../drivers/memory/memory \
16 ../drivers/log/log \
17 ../servers/init/init
18
19usage:
20 @echo " " >&2
21 @echo "Master Makefile to create new MINIX configuration." >& 2
22 @echo "Root privileges are required." >&2
23 @echo " " >&2
24 @echo "Usage:" >&2
25 @echo " make includes # Install include files" >&2
26 @echo " make depend # Generate dependency files" >&2
27 @echo " make libraries # Make system libraries" >&2
28 @echo " make services # Compile and install all services" >&2
29 @echo " make fresh # Make clean, libraries, and services" >&2
30 @echo " make image # Make needed services and create boot image" >&2
31 @echo " make install # Make image, and install to hard disk" >&2
32 @echo " make hdboot # Make image, and install to hard disk" >&2
33 @echo " make fdboot # Make image, and install to floppy disk" >&2
34 @echo " make bootable # Make hard disk bootable" >&2
35 @echo " make clean # Remove all compiler results, except libs" >&2
36 @echo " " >&2
37 @echo "To create a fresh MINIX configuration, try:" >&2
38 @echo " make clean install # new boot image" >&2
39 @echo " make fresh install # new everything" >&2
40 @echo " " >&2
41
42# create a fresh configuration or system image
43fresh:
44 cd ../lib && $(MAKE) clean
45 $(MAKE) clean
46 $(MAKE) libraries services
47
48all: services image
49
50image: includes
51 cd ../kernel && $(MAKE)
52 cd ../servers && $(MAKE) image
53 cd ../drivers && $(MAKE) image
54 installboot -image $@ $(PROGRAMS)
55
56image_small: includes
57 cd ../kernel && $(MAKE)
58 cd ../servers && $(MAKE) EXTRA_OPTS=-D_MINIX_SMALL=1 image
59 cd ../drivers && $(MAKE) EXTRA_OPTS=$(EXTRA_OPTS) image
60 installboot -image $@ $(PROGRAMS)
61
62# rebuild the program or system libraries
63includes:
64 cd ../include && $(MAKE) install
65
66depend: includes
67 cd ../ && $(MAKE) depend
68
69services: includes
70 cd ../kernel && $(MAKE)
71 cd ../servers && $(MAKE) install
72 cd ../drivers && $(MAKE) install
73
74libraries: includes
75 cd ../lib && $(MAKE) clean
76 cd ../lib && $(MAKE) all
77 cd ../lib && $(MAKE) install
78
79
80# make bootable and place system images
81bootable:
82 exec su root mkboot bootable
83
84hdboot: image
85 exec sh mkboot $@
86 @sync
87
88fdboot: image
89 exec su root mkboot $@
90 @sync
91
92install: includes services hdboot
93
94# clean up compile results
95clean:
96 cd ../kernel && $(MAKE) $@
97 cd ../servers && $(MAKE) $@
98 cd ../drivers && $(MAKE) $@
99 rm -rf *.bak image image_small *.iso *.iso.gz cdfdimage rootimage src
100
Note: See TracBrowser for help on using the repository browser.