New P_BLOCKEDON for kernel - a macro that encodes the "who is this
[minix.git] / tools / Makefile
blob803367f44047aa40e3e51e7c3081daafc41104af
1 # Makefile for the kernel image.
3 u=/usr
4 CC= exec cc
5 CFLAGS= -O -D_MINIX -D_POSIX_SOURCE
6 MDEC= /usr/mdec
8 # Specify the programs that are part of the system image.
9 PROGRAMS= ../kernel/kernel \
10 ../servers/pm/pm \
11 ../servers/vfs/vfs \
12 ../servers/rs/rs \
13 ../drivers/memory/memory \
14 ../drivers/log/log \
15 ../drivers/tty/tty \
16 ../servers/ds/ds \
17 ../servers/mfs/mfs \
18 ../servers/vm/vm \
19 ../servers/pfs/pfs \
20 ../servers/init/init
22 usage:
23 @echo " " >&2
24 @echo "Master Makefile to create new MINIX configuration." >& 2
25 @echo "Root privileges are required." >&2
26 @echo " " >&2
27 @echo "Usage:" >&2
28 @echo " make includes # Install include files" >&2
29 @echo " make depend # Generate dependency files" >&2
30 @echo " make libraries # Make system libraries" >&2
31 @echo " make services # Compile and install all services" >&2
32 @echo " make image # Make needed services and create boot image" >&2
33 @echo " make install # Make image, and install to hard disk" >&2
34 @echo " make hdboot # Make image, and install to hard disk" >&2
35 @echo " make fdboot # Make image, and install to floppy disk" >&2
36 @echo " make bootable # Make hard disk bootable" >&2
37 @echo " make clean # Remove all compiler results, except libs" >&2
38 @echo " " >&2
39 @echo "To create a fresh MINIX configuration, try:" >&2
40 @echo " make clean install # new boot image" >&2
41 @echo " make fresh install # new everything" >&2
42 @echo " " >&2
44 all: services image
46 image: includes
47 cd ../kernel && $(MAKE) EXTRA_OPTS=$(EXTRA_OPTS)
48 cd ../servers && $(MAKE) image
49 cd ../drivers && $(MAKE) image
50 installboot -image $@ $(PROGRAMS)
52 image_small: includes
53 cd ../kernel && $(MAKE) EXTRA_OPTS=$(EXTRA_OPTS)
54 cd ../servers && $(MAKE) EXTRA_OPTS=-D_MINIX_SMALL=1 image
55 cd ../drivers && $(MAKE) EXTRA_OPTS=$(EXTRA_OPTS) image
56 installboot -image $@ $(PROGRAMS)
58 # rebuild the program or system libraries
59 includes:
60 cd ../include && $(MAKE) install
62 depend: includes
63 cd ../ && $(MAKE) depend
65 services: includes
66 cd ../kernel && $(MAKE)
67 cd ../servers && $(MAKE) install
68 cd ../drivers && $(MAKE) install
70 libraries: includes
71 cd ../lib && sh ack_build.sh clean obj depend all install
73 # make bootable and place system images
74 bootable:
75 exec su root mkboot bootable
77 hdboot: image
78 exec sh mkboot $@
79 @sync
81 fdboot: image
82 exec su root mkboot $@
83 @sync
85 install: includes services hdboot
87 # clean up compile results
88 clean:
89 cd ../kernel && $(MAKE) $@
90 cd ../servers && $(MAKE) $@
91 cd ../drivers && $(MAKE) $@
92 rm -rf *.bak image image_small *.iso *.iso.gz cdfdimage rootimage src