From b4d7de6ee1c890a20c46fc3f794166ae01af75cd Mon Sep 17 00:00:00 2001 From: Jorrit Herder Date: Tue, 23 Aug 2005 12:53:35 +0000 Subject: [PATCH] New makefile (src/tools/Makefile) logic: - make fresh install: still builds new everything (libraries, services, image) - make clean image: only builds new boot image (about 5 sec. now!) --- drivers/Makefile | 10 ++++++++++ drivers/tty/Makefile | 3 +-- kernel/main.c | 2 +- kernel/proc.h | 4 +--- servers/Makefile | 8 ++++++++ tools/Makefile | 28 ++++++++++++++++------------ 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 0eb004a90..290df9b96 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -7,6 +7,7 @@ usage: @echo "Makefile for all device drivers." >&2 @echo "Usage:" >&2 @echo " make build # Compile all device drivers locally" >&2 + @echo " make image # Compile drivers in boot image" >&2 @echo " make clean # Remove local compiler results" >&2 @echo " make install # Install drivers to /etc/drivers/" >&2 @echo " (requires root privileges)" >&2 @@ -30,3 +31,12 @@ all install depend clean: cd ./random && $(MAKE) $@ cd ./dp8390 && $(MAKE) $@ cd ./sb16 && $(MAKE) $@ + +image: + cd ./libdriver && $(MAKE) build + cd ./memory && $(MAKE) build + cd ./at_wini && $(MAKE) build + cd ./floppy && $(MAKE) build + cd ./bios_wini && $(MAKE) build + cd ./log && $(MAKE) build + cd ./tty && $(MAKE) build diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile index 06790e6ed..40ebd82ab 100644 --- a/drivers/tty/Makefile +++ b/drivers/tty/Makefile @@ -20,14 +20,13 @@ OBJ = tty.o console.o vidcopy.o keyboard.o pty.o rs232.o # build local binary all build: $(DRIVER) - cd keymaps && $(MAKE) -$(MAKEFLAGS) $@ $(DRIVER): $(OBJ) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS) install -S 256w $(DRIVER) # install with other drivers install: /usr/sbin/$(DRIVER) - cd keymaps && $(MAKE) -$(MAKEFLAGS) $@ + cd keymaps && $(MAKE) -$(MAKEFLAGS) install /usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ diff --git a/kernel/main.c b/kernel/main.c index 5d471695e..778ccf972 100755 --- a/kernel/main.c +++ b/kernel/main.c @@ -169,7 +169,7 @@ PUBLIC void main() PRIVATE void announce(void) { /* Display the MINIX startup banner. */ - kprintf("MINIX %s.%s. Copyright 1987-2006 Prentice-Hall, Inc.\n", + kprintf("MINIX %s.%s. Copyright 1987-2006 Prentice-Hall, Inc. and contributes.\n", OS_RELEASE, OS_VERSION); #if (CHIP == INTEL) diff --git a/kernel/proc.h b/kernel/proc.h index 8cc8cc714..5e4a1f07e 100755 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -32,10 +32,8 @@ struct proc { char p_priority; /* current scheduling priority */ char p_max_priority; /* maximum scheduling priority */ - char p_quantum_size; /* quantum size in ticks */ char p_ticks_left; /* number of scheduling ticks left */ - char p_history; /* scheduling history ageing algorithm */ - short p_block_count; /* times blocked in current quantum */ + char p_quantum_size; /* quantum size in ticks */ struct mem_map p_memmap[NR_LOCAL_SEGS]; /* memory map (T, D, S) */ diff --git a/servers/Makefile b/servers/Makefile index 076a7d0d4..07bd4f11d 100644 --- a/servers/Makefile +++ b/servers/Makefile @@ -7,6 +7,7 @@ usage: @echo "Makefile for all system servers." >&2 @echo "Usage:" >&2 @echo " make build # Compile all system servers locally" >&2 + @echo " make image # Compile servers in boot image" >&2 @echo " make clean # Remove local compiler results" >&2 @echo " make install # Install servers to /etc/servers/" >&2 @echo " (requires root privileges)" >&2 @@ -21,3 +22,10 @@ all install depend clean: cd ./init && $(MAKE) $@ cd ./inet && $(MAKE) $@ +image: + cd ./pm && $(MAKE) build + cd ./fs && $(MAKE) build + cd ./rs && $(MAKE) build + cd ./init && $(MAKE) build + + diff --git a/tools/Makefile b/tools/Makefile index 5b1ecd99c..96b7064c8 100755 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,15 +1,15 @@ # Makefile for the kernel image. -# + u=/usr CC= exec cc CFLAGS= -O -D_MINIX -D_POSIX_SOURCE MDEC= /usr/mdec MAKE= exec make -$(MAKEFLAGS) -# specify the programs that are part of the system image -# only one boot medium driver can actually be loaded, -# use labels to include multiple driver and set a label -# at the boot monitor to select one +# Specify the programs that are part of the system image. +# Multiple boot medium drivers can be included in the image, +# but only one is actually be loaded. The driver to load is +# determined by the 'label=...' boot monitor parameter. PROGRAMS= ../kernel/kernel \ ../servers/pm/pm \ ../servers/fs/fs \ @@ -33,9 +33,9 @@ usage: @echo " make includes # Install include files" >&2 @echo " make depend # Generate dependency files" >&2 @echo " make libraries # Make system libraries" >&2 - @echo " make programs # Compile and install all programs" >&2 - @echo " make fresh # Make clean, libraries, and programs" >&2 - @echo " make image # Make programs and create system image" >&2 + @echo " make services # Compile and install all services" >&2 + @echo " make fresh # Make clean, libraries, and services" >&2 + @echo " make image # Make needed services and create boot image" >&2 @echo " make install # Make image, and install to hard disk" >&2 @echo " make hdboot # Make image, and install to hard disk" >&2 @echo " make fdboot # Make image, and install to floppy disk" >&2 @@ -43,18 +43,22 @@ usage: @echo " make clean # Remove all compiler results, except libs" >&2 @echo " " >&2 @echo "To create a fresh MINIX configuration, try:" >&2 - @echo " make fresh install" >&2 + @echo " make clean install # new boot image" >&2 + @echo " make fresh install # new everything" >&2 @echo " " >&2 # create a fresh configuration or system image fresh: cd ../lib && $(MAKE) clean $(MAKE) clean - $(MAKE) libraries programs + $(MAKE) libraries services all: image -image: programs +image: + cd ../kernel && $(MAKE) + cd ../servers && $(MAKE) image + cd ../drivers && $(MAKE) image installboot -image $@ $(PROGRAMS) @@ -65,7 +69,7 @@ includes: depend: includes cd ../ && $(MAKE) depend -programs: includes +services: includes cd ../kernel && $(MAKE) cd ../servers && $(MAKE) install cd ../drivers && $(MAKE) install -- 2.44.0