Changeset cc1f8d4 in mainline
- Timestamp:
- 2009-10-20T16:08:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 50989793
- Parents:
- 00413c5c
- Files:
-
- 78 added
- 52 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r00413c5c rcc1f8d4 47 47 48 48 generic_clean: 49 -rmgeneric/*.o genarch/*.o49 rm -f generic/*.o genarch/*.o -
boot/arch/amd64/Makefile.inc
r00413c5c rcc1f8d4 96 96 97 97 clean: 98 -for file in $(RD_SRVS) ; do \98 for file in $(RD_SRVS) ; do \ 99 99 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 100 100 done 101 -for file in $(RD_APPS) ; do \101 for file in $(RD_APPS) ; do \ 102 102 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 103 103 done 104 -rm -fr $(TMP)105 -rm -f $(BASE)/image.iso104 rm -fr $(TMP) 105 rm -f $(BASE)/image.iso -
boot/arch/arm32/Makefile.inc
r00413c5c rcc1f8d4 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 33 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 33 cp arch/$(BARCH)/loader/image.boot $@ 39 34 40 35 clean: 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)42 -rm -f $(BASE)/image.boot36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot -
boot/arch/arm32/loader/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf32-littlearm 40 BFD_ARCH = arm 41 TARGET = arm-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 endif 51 52 ifeq ($(COMPILER),gcc_cross) 53 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 54 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 55 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 56 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 57 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 58 endif 59 60 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../.. -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -pipe 61 62 SOURCES = \ 63 main.c \ 64 boot.S \ 65 asm.S \ 66 mm.c \ 67 print/print.c \ 68 _components.c \ 69 ../../../generic/printf.c \ 70 ../../../generic/string.c \ 71 ../../../genarch/division.c 72 73 COMPONENTS = \ 74 $(KERNELDIR)/kernel.bin \ 75 $(USPACEDIR)/srv/ns/ns \ 76 $(USPACEDIR)/srv/loader/loader \ 77 $(USPACEDIR)/app/init/init \ 78 $(USPACEDIR)/srv/devmap/devmap \ 79 $(USPACEDIR)/srv/bd/rd/rd \ 80 $(USPACEDIR)/srv/vfs/vfs 81 ifeq ($(RDFMT),tmpfs) 82 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 83 endif 84 ifeq ($(RDFMT),fat) 85 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 86 endif 87 88 RD_SRVS = \ 89 $(USPACEDIR)/srv/fb/fb \ 90 $(USPACEDIR)/srv/kbd/kbd \ 91 $(USPACEDIR)/srv/console/console \ 92 $(USPACEDIR)/srv/fs/devfs/devfs \ 93 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 94 $(USPACEDIR)/srv/fs/fat/fat \ 95 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 96 $(USPACEDIR)/srv/part/mbr_part/mbr_part 97 ifeq ($(MACHINE),testarm) 98 RD_SRVS += \ 99 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 100 endif 101 102 RD_APPS = \ 103 $(USPACEDIR)/app/edit/edit \ 104 $(USPACEDIR)/app/getvc/getvc \ 105 $(USPACEDIR)/app/tetris/tetris \ 106 $(USPACEDIR)/app/tester/tester \ 107 $(USPACEDIR)/app/trace/trace \ 108 $(USPACEDIR)/app/klog/klog \ 109 $(USPACEDIR)/app/bdsh/bdsh 110 111 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 112 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 113 114 .PHONY: all clean depend 115 116 all: image.boot 117 118 -include Makefile.depend 119 120 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 121 $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 122 123 depend: 124 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 125 37 126 38 clean: 127 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 128 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 129 41 done 130 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 131 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 132 44 done 133 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend 134 135 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 136 for file in $(RD_SRVS) ; do \ 137 cp $$file $(USPACEDIR)/dist/srv/ ; \ 138 done 139 for file in $(RD_APPS) ; do \ 140 cp $$file $(USPACEDIR)/dist/app/ ; \ 141 done 142 ifeq ($(RDFMT),tmpfs) 143 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 144 endif 145 ifeq ($(RDFMT),fat) 146 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 147 endif 148 ../../../../tools/mkhord.py 4096 initrd.fs initrd.img 149 rm initrd.fs 150 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 151 152 %.o: %.S 153 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 154 155 %.o: %.c 156 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ia32/Makefile.inc
-
Property mode
changed from
100644
to120000
r00413c5c rcc1f8d4 1 # 2 # Copyright (c) 2006 Martin Decky 3 # All rights reserved. 4 # 5 # Redistribution and use in source and binary forms, with or without 6 # modification, are permitted provided that the following conditions 7 # are met: 8 # 9 # - Redistributions of source code must retain the above copyright 10 # notice, this list of conditions and the following disclaimer. 11 # - Redistributions in binary form must reproduce the above copyright 12 # notice, this list of conditions and the following disclaimer in the 13 # documentation and/or other materials provided with the distribution. 14 # - The name of the author may not be used to endorse or promote products 15 # derived from this software without specific prior written permission. 16 # 17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # 28 29 TMP = distroot 30 31 INIT_TASKS = \ 32 $(USPACEDIR)/srv/ns/ns \ 33 $(USPACEDIR)/srv/loader/loader \ 34 $(USPACEDIR)/app/init/init \ 35 $(USPACEDIR)/srv/devmap/devmap \ 36 $(USPACEDIR)/srv/bd/rd/rd \ 37 $(USPACEDIR)/srv/vfs/vfs 38 ifeq ($(RDFMT),tmpfs) 39 INIT_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 40 endif 41 ifeq ($(RDFMT),fat) 42 INIT_TASKS += $(USPACEDIR)/srv/fs/fat/fat 43 endif 44 45 RD_SRVS = \ 46 $(USPACEDIR)/srv/pci/pci \ 47 $(USPACEDIR)/srv/fb/fb \ 48 $(USPACEDIR)/srv/kbd/kbd \ 49 $(USPACEDIR)/srv/console/console \ 50 $(USPACEDIR)/srv/fs/devfs/devfs \ 51 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 52 $(USPACEDIR)/srv/fs/fat/fat \ 53 $(USPACEDIR)/srv/bd/ata_bd/ata_bd \ 54 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 55 $(USPACEDIR)/srv/part/mbr_part/mbr_part 56 57 RD_APPS = \ 58 $(USPACEDIR)/app/edit/edit \ 59 $(USPACEDIR)/app/getvc/getvc \ 60 $(USPACEDIR)/app/tetris/tetris \ 61 $(USPACEDIR)/app/tester/tester \ 62 $(USPACEDIR)/app/trace/trace \ 63 $(USPACEDIR)/app/klog/klog \ 64 $(USPACEDIR)/app/bdsh/bdsh 65 66 build: $(BASE)/image.iso 67 68 $(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito arch/$(BARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) 69 mkdir -p $(TMP)/boot/grub 70 cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ 71 ifneq ($(RDFMT),tmpfs) 72 cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst 73 endif 74 ifneq ($(RDFMT),fat) 75 cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst 76 endif 77 cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ 78 for task in $(INIT_TASKS) ; do \ 79 cp $$task $(TMP)/boot/ ; \ 80 done 81 for file in $(RD_SRVS) ; do \ 82 cp $$file $(USPACEDIR)/dist/srv/ ; \ 83 done 84 for file in $(RD_APPS) ; do \ 85 cp $$file $(USPACEDIR)/dist/app/ ; \ 86 done 87 ifeq ($(RDFMT),tmpfs) 88 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs 89 endif 90 ifeq ($(RDFMT),fat) 91 $(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs 92 endif 93 $(BASE)/tools/mkhord.py 4096 $(TMP)/boot/initrd.fs $(TMP)/boot/initrd.img 94 rm $(TMP)/boot/initrd.fs 95 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ 96 97 clean: 98 -for file in $(RD_SRVS) ; do \ 99 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 100 done 101 -for file in $(RD_APPS) ; do \ 102 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 103 done 104 -rm -fr $(TMP) 105 -rm -f $(BASE)/image.iso 1 ../amd64/Makefile.inc -
Property mode
changed from
-
boot/arch/ia64/Makefile.inc
r00413c5c rcc1f8d4 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 33 cp arch/$(BARCH)/loader/image.boot $@ 33 34 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 39 40 clean: generic_clean 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 42 -rm -f $(BASE)/image.boot 35 clean: 36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot $(BASE)/hello.efi $(BASE)/image.bin -
boot/arch/ia64/loader/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf64-ia64-little 40 BFD_ARCH = ia64 41 TARGET = ia64-pc-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 GEFI_PREFIX = 51 endif 52 53 ifeq ($(COMPILER),icc) 54 CC = icc 55 AS = as 56 LD = ld 57 OBJCOPY = objcopy 58 OBJDUMP = objdump 59 endif 60 61 ifeq ($(COMPILER),gcc_cross) 62 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 63 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 64 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 65 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 66 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 67 GEFI_PREFIX = $(TOOLCHAIN_DIR)/$(TARGET)- 68 endif 69 70 #-mno-pic means do not use gp + imm22 to address data 71 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -I../../../../kernel/generic/include -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -pipe 72 73 SOURCES = \ 74 main.c \ 75 ../../../generic/printf.c \ 76 ../../../generic/string.c \ 77 ../../../genarch/balloc.c \ 78 _components.c \ 79 asm.S \ 80 boot.S 81 82 NOCOMPONENTS = \ 83 $(KERNELDIR)/kernel.bin 84 COMPONENTS = \ 85 $(KERNELDIR)/kernel.bin \ 86 $(USPACEDIR)/srv/ns/ns \ 87 $(USPACEDIR)/srv/loader/loader \ 88 $(USPACEDIR)/app/init/init \ 89 $(USPACEDIR)/srv/devmap/devmap \ 90 $(USPACEDIR)/srv/bd/rd/rd \ 91 $(USPACEDIR)/srv/vfs/vfs 92 ifeq ($(RDFMT),tmpfs) 93 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 94 endif 95 ifeq ($(RDFMT),fat) 96 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 97 endif 98 99 RD_SRVS = \ 100 $(USPACEDIR)/srv/fb/fb \ 101 $(USPACEDIR)/srv/kbd/kbd \ 102 $(USPACEDIR)/srv/console/console \ 103 $(USPACEDIR)/srv/fs/devfs/devfs \ 104 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 105 $(USPACEDIR)/srv/fs/fat/fat \ 106 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 107 $(USPACEDIR)/srv/part/mbr_part/mbr_part 108 109 RD_APPS = \ 110 $(USPACEDIR)/app/edit/edit \ 111 $(USPACEDIR)/app/getvc/getvc \ 112 $(USPACEDIR)/app/tetris/tetris \ 113 $(USPACEDIR)/app/tester/tester \ 114 $(USPACEDIR)/app/trace/trace \ 115 $(USPACEDIR)/app/klog/klog \ 116 $(USPACEDIR)/app/bdsh/bdsh 117 118 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 119 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 120 121 .PHONY: all clean depend 122 123 all: hello.efi disasm 124 125 -include Makefile.depend 126 127 hello.efi: image.boot 128 make -C gefi/HelenOS PREFIX=$(GEFI_PREFIX) 129 cp gefi/HelenOS/hello.efi ../../../../ 130 cp gefi/HelenOS/image.bin ../../../../ 131 132 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 133 $(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 134 135 depend: 136 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 137 37 138 38 clean: 139 -for file in $(RD_SRVS) ; do \ 39 $(MAKE) -C gefi clean 40 $(MAKE) -C gefi/HelenOS clean 41 for file in $(RD_SRVS) ; do \ 140 42 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 141 43 done 142 -for file in $(RD_APPS) ; do \44 for file in $(RD_APPS) ; do \ 143 45 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 144 46 done 145 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) image.boot image.map image.disasm initrd.img image.boot Makefile.depend ../../../../image.bin ../../../../hello.efi 146 make -C gefi clean 147 make -C gefi/HelenOS clean 148 149 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 150 for file in $(RD_SRVS) ; do \ 151 cp $$file $(USPACEDIR)/dist/srv/ ; \ 152 done 153 for file in $(RD_APPS) ; do \ 154 cp $$file $(USPACEDIR)/dist/app/ ; \ 155 done 156 ifeq ($(RDFMT),tmpfs) 157 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 158 endif 159 ifeq ($(RDFMT),fat) 160 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 161 endif 162 ../../../../tools/mkhord.py 16384 initrd.fs initrd.img 163 rm initrd.fs 164 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned long" $(COMPONENTS) ./initrd.img 165 166 %.o: %.S 167 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 168 169 %.o: %.c 170 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 171 172 disasm: image.boot 173 $(OBJDUMP) -d image.boot > image.disasm 47 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(HELLO) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 48 find . -name '*.o' -follow -exec rm \{\} \; 49 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ia64/loader/gefi/HelenOS/Makefile
r00413c5c rcc1f8d4 69 69 70 70 gefi: 71 make-C .. prefix=$(PREFIX)71 $(MAKE) -C .. prefix=$(PREFIX) -
boot/arch/mips32/Makefile.inc
r00413c5c rcc1f8d4 29 29 build: $(BASE)/image.boot 30 30 31 $(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot 32 cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot 33 34 depend: 35 -rm arch/$(BARCH)/loader/image.boot 36 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 31 $(BASE)/image.boot: 32 $(MAKE) -C arch/$(BARCH)/loader 33 cp arch/$(BARCH)/loader/image.boot $@ 39 34 40 35 clean: 41 make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)42 -rm -f $(BASE)/image.boot36 $(MAKE) -C arch/$(BARCH)/loader clean 37 rm -f $(BASE)/image.boot -
boot/arch/mips32/loader/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_ARCH = mips 40 TARGET = mipsel-linux-gnu 41 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32/bin 42 43 ifeq ($(MACHINE),lgxemul) 44 BFD_NAME = elf32-tradlittlemips 45 BFD = ecoff-littlemips 46 endif 47 ifeq ($(MACHINE),bgxemul) 48 BFD_NAME = elf32-tradbigmips 49 BFD = ecoff-bigmips 50 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32eb/bin 51 TARGET = mips-linux-gnu 52 endif 53 ifeq ($(MACHINE),msim) 54 BFD_NAME = elf32-tradlittlemips 55 BFD = binary 56 endif 57 58 ifeq ($(COMPILER),gcc_native) 59 CC = gcc 60 AS = as 61 LD = ld 62 OBJCOPY = objcopy 63 OBJDUMP = objdump 64 endif 65 66 ifeq ($(COMPILER),gcc_cross) 67 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 68 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 69 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 70 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 71 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 72 endif 73 74 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 -pipe 75 76 SOURCES = \ 77 main.c \ 78 msim.c \ 79 _components.c \ 80 ../../../generic/printf.c \ 81 ../../../generic/string.c \ 82 asm.S \ 83 boot.S 84 85 COMPONENTS = \ 86 $(KERNELDIR)/kernel.bin \ 87 $(USPACEDIR)/srv/ns/ns \ 88 $(USPACEDIR)/srv/loader/loader \ 89 $(USPACEDIR)/app/init/init \ 90 $(USPACEDIR)/srv/devmap/devmap \ 91 $(USPACEDIR)/srv/bd/rd/rd \ 92 $(USPACEDIR)/srv/vfs/vfs 93 ifeq ($(RDFMT),tmpfs) 94 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 95 endif 96 ifeq ($(RDFMT),fat) 97 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 98 endif 99 100 RD_SRVS = \ 101 $(USPACEDIR)/srv/fb/fb \ 102 $(USPACEDIR)/srv/kbd/kbd \ 103 $(USPACEDIR)/srv/console/console \ 104 $(USPACEDIR)/srv/fs/devfs/devfs \ 105 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 106 $(USPACEDIR)/srv/fs/fat/fat \ 107 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 108 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd \ 109 $(USPACEDIR)/srv/part/mbr_part/mbr_part 110 111 RD_APPS = \ 112 $(USPACEDIR)/app/edit/edit \ 113 $(USPACEDIR)/app/getvc/getvc \ 114 $(USPACEDIR)/app/tetris/tetris \ 115 $(USPACEDIR)/app/tester/tester \ 116 $(USPACEDIR)/app/trace/trace \ 117 $(USPACEDIR)/app/bdsh/bdsh \ 118 $(USPACEDIR)/app/klog/klog 119 120 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 121 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 122 123 .PHONY: all clean depend 124 125 all: image.boot 126 127 -include Makefile.depend 128 129 image.boot: image.raw 130 $(OBJCOPY) -O $(BFD) $< $@ 131 132 image.raw: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 133 $(LD) -no-check-sections -N -T _link.ld -o $@ $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 134 135 depend: 136 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 137 37 138 38 clean: 139 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 140 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 141 41 done 142 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 143 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 144 44 done 145 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.raw image.boot Makefile.depend 146 147 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 148 for file in $(RD_SRVS) ; do \ 149 cp $$file $(USPACEDIR)/dist/srv/ ; \ 150 done 151 for file in $(RD_APPS) ; do \ 152 cp $$file $(USPACEDIR)/dist/app/ ; \ 153 done 154 ifeq ($(RDFMT),tmpfs) 155 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 156 endif 157 ifeq ($(RDFMT),fat) 158 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 159 endif 160 ../../../../tools/mkhord.py 16384 initrd.fs initrd.img 161 rm initrd.fs 162 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned int" $(COMPONENTS) ./initrd.img 163 164 %.o: %.S 165 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 166 167 %.o: %.c 168 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(RAW) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/arch/ppc32/Makefile.inc
r00413c5c rcc1f8d4 31 31 build: $(BASE)/image.iso 32 32 33 $(BASE)/image.iso: dependarch/$(BARCH)/loader/image.boot33 $(BASE)/image.iso: arch/$(BARCH)/loader/image.boot 34 34 mkdir -p $(TMP)/boot 35 35 mkdir -p $(TMP)/ppc … … 41 41 mkisofs -hfs -part -map arch/$(BARCH)/yaboot/maps -no-desktop -hfs-volid "HelenOS" -hfs-bless $(TMP)/boot -r -o $@ $(TMP)/ 42 42 43 depend:44 -rm arch/$(BARCH)/loader/image.boot45 46 43 arch/$(BARCH)/loader/image.boot: 47 $(MAKE) -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)44 $(MAKE) -C arch/$(BARCH)/loader 48 45 49 46 clean: generic_clean 50 $(MAKE) -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)51 -rm -fr $(TMP)52 -rm -f $(BASE)/image.iso47 $(MAKE) -C arch/$(BARCH)/loader clean 48 rm -fr $(TMP) 49 rm -f $(BASE)/image.iso -
boot/arch/ppc32/loader/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../../version 30 -include ../../../../Makefile.config 30 include Makefile.common 31 31 32 ## Toolchain configuration 33 # 32 .PHONY: all clean 34 33 35 ifndef CROSS_PREFIX 36 CROSS_PREFIX = /usr/local 37 endif 38 39 BFD_NAME = elf32-powerpc 40 BFD_ARCH = powerpc:common 41 TARGET = ppc-linux-gnu 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc32/bin 43 44 ifeq ($(COMPILER),gcc_native) 45 CC = gcc 46 AS = as 47 LD = ld 48 OBJCOPY = objcopy 49 OBJDUMP = objdump 50 endif 51 52 ifeq ($(COMPILER),gcc_cross) 53 CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc 54 AS = $(TOOLCHAIN_DIR)/$(TARGET)-as 55 LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld 56 OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy 57 OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump 58 endif 59 60 CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32 -pipe 61 62 SOURCES = \ 63 main.c \ 64 _components.c \ 65 ../../../generic/printf.c \ 66 ../../../generic/string.c \ 67 ../../../genarch/balloc.c \ 68 ../../../genarch/ofw.c \ 69 ../../../genarch/ofw_tree.c \ 70 ofwarch.c \ 71 asm.S \ 72 boot.S 73 74 COMPONENTS = \ 75 $(KERNELDIR)/kernel.bin \ 76 $(USPACEDIR)/srv/ns/ns \ 77 $(USPACEDIR)/app/init/init \ 78 $(USPACEDIR)/srv/loader/loader \ 79 $(USPACEDIR)/srv/devmap/devmap \ 80 $(USPACEDIR)/srv/bd/rd/rd \ 81 $(USPACEDIR)/srv/vfs/vfs 82 ifeq ($(RDFMT),tmpfs) 83 COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 84 endif 85 ifeq ($(RDFMT),fat) 86 COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat 87 endif 88 89 RD_SRVS = \ 90 $(USPACEDIR)/srv/fb/fb \ 91 $(USPACEDIR)/srv/kbd/kbd \ 92 $(USPACEDIR)/srv/console/console \ 93 $(USPACEDIR)/srv/fs/devfs/devfs \ 94 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 95 $(USPACEDIR)/srv/fs/fat/fat \ 96 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 97 $(USPACEDIR)/srv/part/mbr_part/mbr_part 98 99 RD_APPS = \ 100 $(USPACEDIR)/app/edit/edit \ 101 $(USPACEDIR)/app/getvc/getvc \ 102 $(USPACEDIR)/app/tetris/tetris \ 103 $(USPACEDIR)/app/tester/tester \ 104 $(USPACEDIR)/app/trace/trace \ 105 $(USPACEDIR)/app/bdsh/bdsh \ 106 $(USPACEDIR)/app/klog/klog 107 108 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 109 COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) 110 111 .PHONY: all clean depend 112 113 all: image.boot 114 115 -include Makefile.depend 116 117 image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) 118 $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ 119 120 depend: 121 -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null 34 all: ../../../../version ../../../../Makefile.config ../../../../config.h ../../../../config.defs 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 122 37 123 38 clean: 124 -for file in $(RD_SRVS) ; do \39 for file in $(RD_SRVS) ; do \ 125 40 rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ 126 41 done 127 -for file in $(RD_APPS) ; do \42 for file in $(RD_APPS) ; do \ 128 43 rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ 129 44 done 130 -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend 131 132 _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in 133 for file in $(RD_SRVS) ; do \ 134 cp $$file $(USPACEDIR)/dist/srv/ ; \ 135 done 136 for file in $(RD_APPS) ; do \ 137 cp $$file $(USPACEDIR)/dist/app/ ; \ 138 done 139 ifeq ($(RDFMT),tmpfs) 140 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs 141 endif 142 ifeq ($(RDFMT),fat) 143 ../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs 144 endif 145 ../../../../tools/mkhord.py 4096 initrd.fs initrd.img 146 rm initrd.fs 147 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 148 149 %.o: %.S 150 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ 151 152 %.o: %.c 153 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 45 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(COMPS).h $(COMPS).c $(LINK) $(INITRD).img $(INITRD).fs 46 find . -name '*.o' -follow -exec rm \{\} \; 47 find . -name '*.co' -follow -exec rm \{\} \; -
boot/tools/pack.py
r00413c5c rcc1f8d4 72 72 plainname = os.path.splitext(basename)[0] 73 73 path = os.path.dirname(task) 74 object = plainname + ". o"74 object = plainname + ".co" 75 75 symbol = "_binary_" + basename.replace(".", "_") 76 76 macro = plainname.upper() -
kernel/Makefile
r00413c5c rcc1f8d4 27 27 # 28 28 29 include Makefile.common 29 30 30 ## Include configuration 31 # 31 .PHONY: all clean 32 32 33 include ../version 34 -include ../Makefile.config 35 -include ../config.defs 36 37 INCLUDES = generic/include 38 OPTIMIZATION = 3 39 40 ifndef CROSS_PREFIX 41 CROSS_PREFIX = /usr/local 42 endif 43 44 ## Common compiler flags 45 # 46 47 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__ 48 49 GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ 50 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 51 -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \ 52 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Werror \ 53 -pipe 54 55 ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ 56 -ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wmissing-prototypes \ 57 -Werror -wd170 58 59 SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \ 60 -xnolib -xc99=all -features=extensions \ 61 -erroff=E_ZERO_SIZED_STRUCT_UNION 62 63 CLANG_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ 64 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 65 -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \ 66 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -pipe \ 67 -arch $(CLANG_ARCH) 68 69 LFLAGS = -M 70 AFLAGS = 71 72 -include arch/$(KARCH)/Makefile.inc 73 -include genarch/Makefile.inc 74 75 ## The at-sign 76 # 77 # The $(ATSIGN) variable holds the ASCII character representing the at-sign 78 # ('@') used in various $(AS) constructs (e.g. @progbits). On architectures that 79 # don't use '@' for starting a comment, $(ATSIGN) is merely '@'. However, on 80 # those that do use it for starting a comment (e.g. arm32), $(ATSIGN) must be 81 # defined as the percentile-sign ('%') in the architecture-dependent 82 # Makefile.inc. 83 # 84 ATSIGN ?= @ 85 86 ## Cross-platform assembly to start a symtab.data section 87 # 88 SYMTAB_SECTION=".section symtab.data, \"a\", $(ATSIGN)progbits;" 89 90 ## Simple detection for the type of the host system 91 # 92 HOST = $(shell uname) 93 94 ## On Solaris, some utilities have slightly different names 95 # 96 ifeq ($(HOST),SunOS) 97 BINUTILS_PREFIX = "g" 98 else 99 BINUTILS_PREFIX = "" 100 endif 101 102 ## Toolchain configuration 103 # 104 105 ifeq ($(COMPILER),gcc_native) 106 CC = gcc 107 GCC = $(CC) 108 AS = $(BINUTILS_PREFIX)as 109 LD = $(BINUTILS_PREFIX)ld 110 OBJCOPY = $(BINUTILS_PREFIX)objcopy 111 OBJDUMP = $(BINUTILS_PREFIX)objdump 112 LIBDIR = /usr/lib 113 CFLAGS = $(GCC_CFLAGS) 114 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 115 endif 116 117 ifeq ($(COMPILER),gcc_cross) 118 CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc 119 GCC = $(CC) 120 AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as 121 LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld 122 OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy 123 OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump 124 LIBDIR = $(TOOLCHAIN_DIR)/lib 125 CFLAGS = $(GCC_CFLAGS) 126 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 127 endif 128 129 ifeq ($(COMPILER),icc) 130 CC = icc 131 GCC = gcc 132 AS = as 133 LD = ld 134 OBJCOPY = objcopy 135 OBJDUMP = objdump 136 LIBDIR = /usr/lib 137 CFLAGS = $(ICC_CFLAGS) 138 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 139 endif 140 141 ifeq ($(COMPILER),suncc) 142 CC = suncc 143 GCC = gcc 144 AS = $(BINUTILS_PREFIX)as 145 LD = $(BINUTILS_PREFIX)ld 146 OBJCOPY = $(BINUTILS_PREFIX)objcopy 147 OBJDUMP = $(BINUTILS_PREFIX)objdump 148 LIBDIR = /usr/lib 149 CFLAGS = $(SUNCC_CFLAGS) 150 DEFS += $(CONFIG_DEFS) 151 DEPEND_DEFS = $(DEFS) 152 endif 153 154 ifeq ($(COMPILER),clang) 155 CC = clang 156 GCC = gcc 157 AS = $(BINUTILS_PREFIX)as 158 LD = $(BINUTILS_PREFIX)ld 159 OBJCOPY = $(BINUTILS_PREFIX)objcopy 160 OBJDUMP = $(BINUTILS_PREFIX)objdump 161 LIBDIR = /usr/lib 162 CFLAGS = $(CLANG_CFLAGS) 163 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 164 endif 165 166 ## Generic kernel sources 167 # 168 169 GENERIC_SOURCES = \ 170 generic/src/adt/avl.c \ 171 generic/src/adt/bitmap.c \ 172 generic/src/adt/btree.c \ 173 generic/src/adt/hash_table.c \ 174 generic/src/adt/list.c \ 175 generic/src/console/chardev.c \ 176 generic/src/console/console.c \ 177 generic/src/cpu/cpu.c \ 178 generic/src/ddi/ddi.c \ 179 generic/src/ddi/irq.c \ 180 generic/src/ddi/device.c \ 181 generic/src/debug/symtab.c \ 182 generic/src/interrupt/interrupt.c \ 183 generic/src/main/main.c \ 184 generic/src/main/kinit.c \ 185 generic/src/main/uinit.c \ 186 generic/src/main/version.c \ 187 generic/src/main/shutdown.c \ 188 generic/src/proc/program.c \ 189 generic/src/proc/scheduler.c \ 190 generic/src/proc/thread.c \ 191 generic/src/proc/task.c \ 192 generic/src/proc/the.c \ 193 generic/src/proc/tasklet.c \ 194 generic/src/syscall/syscall.c \ 195 generic/src/syscall/copy.c \ 196 generic/src/mm/buddy.c \ 197 generic/src/mm/frame.c \ 198 generic/src/mm/page.c \ 199 generic/src/mm/tlb.c \ 200 generic/src/mm/as.c \ 201 generic/src/mm/backend_anon.c \ 202 generic/src/mm/backend_elf.c \ 203 generic/src/mm/backend_phys.c \ 204 generic/src/mm/slab.c \ 205 generic/src/lib/func.c \ 206 generic/src/lib/memstr.c \ 207 generic/src/lib/sort.c \ 208 generic/src/lib/string.c \ 209 generic/src/lib/elf.c \ 210 generic/src/lib/rd.c \ 211 generic/src/printf/printf_core.c \ 212 generic/src/printf/printf.c \ 213 generic/src/printf/snprintf.c \ 214 generic/src/printf/vprintf.c \ 215 generic/src/printf/vsnprintf.c \ 216 generic/src/time/clock.c \ 217 generic/src/time/timeout.c \ 218 generic/src/time/delay.c \ 219 generic/src/preempt/preemption.c \ 220 generic/src/synch/spinlock.c \ 221 generic/src/synch/condvar.c \ 222 generic/src/synch/rwlock.c \ 223 generic/src/synch/mutex.c \ 224 generic/src/synch/semaphore.c \ 225 generic/src/synch/smc.c \ 226 generic/src/synch/waitq.c \ 227 generic/src/synch/futex.c \ 228 generic/src/smp/ipi.c \ 229 generic/src/smp/smp.c \ 230 generic/src/ipc/ipc.c \ 231 generic/src/ipc/sysipc.c \ 232 generic/src/ipc/ipcrsc.c \ 233 generic/src/ipc/irq.c \ 234 generic/src/ipc/event.c \ 235 generic/src/security/cap.c \ 236 generic/src/sysinfo/sysinfo.c 237 238 ## Kernel console support 239 # 240 241 ifeq ($(CONFIG_KCONSOLE),y) 242 GENERIC_SOURCES += \ 243 generic/src/console/kconsole.c \ 244 generic/src/console/cmd.c 245 endif 246 247 ## Udebug interface sources 248 # 249 250 ifeq ($(CONFIG_UDEBUG),y) 251 GENERIC_SOURCES += \ 252 generic/src/ipc/kbox.c \ 253 generic/src/udebug/udebug.c \ 254 generic/src/udebug/udebug_ops.c \ 255 generic/src/udebug/udebug_ipc.c 256 endif 257 258 ## Test sources 259 # 260 261 ifeq ($(CONFIG_TEST),y) 262 CFLAGS += -Itest/ 263 GENERIC_SOURCES += \ 264 test/test.c \ 265 test/atomic/atomic1.c \ 266 test/btree/btree1.c \ 267 test/avltree/avltree1.c \ 268 test/fault/fault1.c \ 269 test/mm/falloc1.c \ 270 test/mm/falloc2.c \ 271 test/mm/mapping1.c \ 272 test/mm/slab1.c \ 273 test/mm/slab2.c \ 274 test/synch/rwlock1.c \ 275 test/synch/rwlock2.c \ 276 test/synch/rwlock3.c \ 277 test/synch/rwlock4.c \ 278 test/synch/rwlock5.c \ 279 test/synch/semaphore1.c \ 280 test/synch/semaphore2.c \ 281 test/print/print1.c \ 282 test/print/print2.c \ 283 test/print/print3.c \ 284 test/print/print4.c \ 285 test/thread/thread1.c \ 286 test/sysinfo/sysinfo1.c 287 288 ifeq ($(KARCH),mips32) 289 GENERIC_SOURCES += test/debug/mips1.c 290 else 291 GENERIC_SOURCES += test/debug/mips1_skip.c 292 endif 293 294 ifeq ($(KARCH),ia64) 295 GENERIC_SOURCES += test/mm/purge1.c 296 else 297 GENERIC_SOURCES += test/mm/purge1_skip.c 298 endif 299 300 ifeq ($(CONFIG_FPU),y) 301 ifeq ($(KARCH),ia32) 302 TEST_FPU1 = y 303 TEST_SSE1 = y 304 GENERIC_SOURCES += test/fpu/fpu1_x86.c 305 endif 306 307 ifeq ($(KARCH),amd64) 308 TEST_FPU1 = y 309 TEST_SSE1 = y 310 GENERIC_SOURCES += test/fpu/fpu1_x86.c 311 endif 312 313 ifeq ($(KARCH),ia64) 314 TEST_FPU1 = y 315 GENERIC_SOURCES += test/fpu/fpu1_ia64.c 316 endif 317 318 ifeq ($(KARCH),mips32) 319 TEST_MIPS2 = y 320 endif 321 endif 322 323 ifneq ($(TEST_FPU1),y) 324 GENERIC_SOURCES += test/fpu/fpu1_skip.c 325 endif 326 327 ifeq ($(TEST_SSE1),y) 328 GENERIC_SOURCES += test/fpu/sse1.c 329 else 330 GENERIC_SOURCES += test/fpu/sse1_skip.c 331 endif 332 333 ifeq ($(TEST_MIPS2),y) 334 GENERIC_SOURCES += test/fpu/mips2.c 335 else 336 GENERIC_SOURCES += test/fpu/mips2_skip.c 337 endif 338 339 endif 340 341 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 342 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) 343 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) 344 345 ifeq ($(CONFIG_SYMTAB),y) 346 SYMTAB_OBJECTS := generic/src/debug/real_map.o 347 else 348 SYMTAB_OBJECTS := 349 endif 350 351 .PHONY: all build clean archlinks depend disasm 352 353 all: ../Makefile.config ../config.h ../config.defs 354 -rm Makefile.depend 355 $(MAKE) -C . build 356 357 build: kernel.bin disasm 358 359 -include Makefile.depend 33 all: ../version ../Makefile.config ../config.h ../config.defs 34 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 35 $(MAKE) -f Makefile.build 360 36 361 37 clean: 362 -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(KARCH)/_link.ld38 rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* $(ARCH_INCLUDE) $(GENARCH_INCLUDE) arch/*/_link.ld 363 39 find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \; 364 for arch in arch/* ; do \365 [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \366 done ; exit 0367 368 archlinks:369 ln -sfn ../../arch/$(KARCH)/include/ generic/include/arch370 ln -sfn ../../genarch/include/ generic/include/genarch371 372 depend: archlinks373 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null374 375 arch/$(KARCH)/_link.ld: arch/$(KARCH)/_link.ld.in376 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@377 378 generic/src/debug/real_map.bin: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)379 echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o generic/src/debug/empty_map.o380 $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre381 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump382 tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin383 # Do it once again, this time to get correct even the symbols384 # on architectures, that have bss after symtab385 echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o generic/src/debug/sizeok_map.o386 $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre387 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump388 tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin389 390 generic/src/debug/real_map.o: generic/src/debug/real_map.bin391 echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@392 393 kernel.raw: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS)394 $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) -o $@ -Map kernel.map395 396 kernel.bin: kernel.raw397 $(OBJCOPY) -O $(BFD) kernel.raw kernel.bin398 399 disasm: kernel.raw400 $(OBJDUMP) -d kernel.raw > kernel.disasm401 402 %.o: %.S403 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@404 405 %.o: %.s406 $(AS) $(AFLAGS) $< -o $@407 408 #409 # The FPU tests are the only objects for which we allow the compiler to generate410 # FPU instructions.411 #412 test/fpu/%.o: test/fpu/%.c413 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@414 415 #416 # Ordinary objects.417 #418 %.o: %.c419 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@ -
uspace/Makefile
r00413c5c rcc1f8d4 86 86 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(BUILDS) $(CLEANS) clean 87 87 88 all: ../Makefile.config ../config.h ../config.defs$(BUILDS)88 all: $(BUILDS) 89 89 90 90 clean: $(CLEANS) -
uspace/app/bdsh/Makefile
r00413c5c rcc1f8d4 1 # Copyright (c) 2005, Martin Decky2 # All rights reserved.3 # Copyright (c) 200 8, Tim Post <tinkertim@gmail.com>1 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 4 # All rights reserved. 5 5 # 6 6 # Redistribution and use in source and binary forms, with or without 7 # modification, are permitted provided that the following conditions are met: 7 # modification, are permitted provided that the following conditions 8 # are met: 8 9 # 9 # Redistributions of source code must retain the above copyright notice, this 10 # list of conditions and the following disclaimer. 10 # - Redistributions of source code must retain the above copyright 11 # notice, this list of conditions and the following disclaimer. 12 # - Redistributions in binary form must reproduce the above copyright 13 # notice, this list of conditions and the following disclaimer in the 14 # documentation and/or other materials provided with the distribution. 15 # - The name of the author may not be used to endorse or promote products 16 # derived from this software without specific prior written permission. 11 17 # 12 # Redistributions in binary form must reproduce the above copyright notice, 13 # this list of conditions and the following disclaimer in the documentation 14 # and/or other materials provided with the distribution. 18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 28 # 16 # Neither the name of the original program's authors nor the names of its17 # contributors may be used to endorse or promote products derived from this18 # software without specific prior written permission.19 #20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE24 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS27 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN28 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)29 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE30 # POSSIBILITY OF SUCH DAMAGE.31 29 32 include ../../../version30 include Makefile.common 33 31 34 LIBC_PREFIX = ../../lib/libc 35 SOFTINT_PREFIX = ../../lib/softint 36 LIBBLOCK_PREFIX = ../../lib/libblock 32 .PHONY: all clean 37 33 38 include $(LIBC_PREFIX)/Makefile.toolchain 39 40 CFLAGS += -I../../srv/kbd/include -I$(LIBBLOCK_PREFIX) 41 42 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 43 DEFS += -DRELEASE=$(RELEASE) 44 45 PROGRAM = bdsh 46 47 # Any directory that cleaning targets should know about 48 SUBDIRS = \ 49 ./ \ 50 cmds/ \ 51 cmds/modules/ \ 52 cmds/modules/help/ \ 53 cmds/modules/mkdir/ \ 54 cmds/modules/rm/ \ 55 cmds/modules/bdd/ \ 56 cmds/modules/cat/ \ 57 cmds/modules/touch/ \ 58 cmds/modules/ls/ \ 59 cmds/modules/pwd/ \ 60 cmds/modules/sleep/ \ 61 cmds/modules/cp/ \ 62 cmds/modules/mv/ \ 63 cmds/modules/mount/ \ 64 cmds/modules/kcon/ \ 65 cmds/builtins/ \ 66 cmds/builtins/exit/\ 67 cmds/builtins/cd/ 68 69 SOURCES = \ 70 cmds/modules/help/help.c \ 71 cmds/modules/mkdir/mkdir.c \ 72 cmds/modules/rm/rm.c \ 73 cmds/modules/bdd/bdd.c \ 74 cmds/modules/cat/cat.c \ 75 cmds/modules/touch/touch.c \ 76 cmds/modules/ls/ls.c \ 77 cmds/modules/pwd/pwd.c \ 78 cmds/modules/sleep/sleep.c \ 79 cmds/modules/cp/cp.c \ 80 cmds/modules/mv/mv.c \ 81 cmds/modules/mount/mount.c \ 82 cmds/modules/kcon/kcon.c \ 83 cmds/builtins/exit/exit.c \ 84 cmds/builtins/cd/cd.c \ 85 cmds/mod_cmds.c \ 86 cmds/builtin_cmds.c \ 87 errors.c \ 88 input.c \ 89 util.c \ 90 exec.c \ 91 scli.c 92 93 CFLAGS += -I. -Icmds/ -Icmds/builtins -Icmds/modules 94 95 OBJECTS = $(SOURCES:.c=.o) 96 97 # For easy cleaning, *.o is already handled 98 CLEANDIRS := $(addsuffix *~,$(SUBDIRS)) 99 CLEANDIRS += $(addsuffix *.bak,$(SUBDIRS)) 100 CLEANDIRS += $(addsuffix *.tmp,$(SUBDIRS)) 101 CLEANDIRS += $(addsuffix *.out,$(SUBDIRS)) 102 CLEANDIRS += $(addsuffix *.d,$(SUBDIRS)) 103 CLEANDIRS += $(addsuffix *.gch,$(SUBDIRS) ) 104 105 %.o: %.S 106 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 107 108 %.o: %.s 109 $(AS) $(AFLAGS) $< -o $@ 110 111 %.o: %.c 112 $(CC) $(CFLAGS) $(INC) -c $< -o $@ 113 @$(CC) -M $(CFLAGS) $(INC) $*.c > $*.d 114 115 $(PROGRAM): $(OBJECTS) $(LIBS) 116 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map 117 118 # Everything else is a phony target 119 .PHONY: all clean distclean depend 120 121 all: $(PROGRAM) $(PROGRAM).disasm 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 122 37 123 38 clean: 124 @-rm -f $(OBJECTS) 125 @-rm -f $(PROGRAM) 126 @-rm -f $(PROGRAM).map 127 @-rm -f $(PROGRAM).disasm 128 @-rm -f $(CLEANDIRS) 129 130 depend: 131 @echo '' 132 133 $(PROGRAM).disasm: $(PROGRAM) 134 $(OBJDUMP) -d $< > $@ 135 136 distclean: clean 137 138 # Do not delete - dependencies 139 -include $(OBJECTS:.o=.d) 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/edit/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../.. 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = edit 44 SOURCES = \ 45 edit.c \ 46 sheet.c 47 48 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 49 50 .PHONY: all clean depend 51 52 all: $(OUTPUT) $(OUTPUT).disasm 53 54 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 55 37 56 38 clean: 57 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 58 59 depend: 60 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 61 62 $(OUTPUT): $(OBJECTS) $(LIBS) 63 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 64 65 $(OUTPUT).disasm: $(OUTPUT) 66 $(OBJDUMP) -d $< > $@ 67 68 %.o: %.S 69 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 70 71 %.o: %.s 72 $(AS) $(AFLAGS) $< -o $@ 73 74 %.o: %.c 75 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/getvc/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2009 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../version30 include Makefile.common 30 31 31 ## Setup toolchain 32 # 32 .PHONY: all clean 33 33 34 LIBC_PREFIX = ../../lib/libc 35 SOFTINT_PREFIX = ../../lib/softint 36 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" 41 42 ## Sources 43 # 44 45 OUTPUT = getvc 46 SOURCES = \ 47 getvc.c \ 48 version.c 49 50 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 51 52 .PHONY: all clean depend 53 54 all: $(OUTPUT) $(OUTPUT).disasm 55 56 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../version $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 57 37 58 38 clean: 59 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 60 61 depend: 62 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 63 64 $(OUTPUT): $(OBJECTS) $(LIBS) 65 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 66 67 $(OUTPUT).disasm: $(OUTPUT) 68 $(OBJDUMP) -d $< > $@ 69 70 %.o: %.S 71 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 72 73 %.o: %.s 74 $(AS) $(AFLAGS) $< -o $@ 75 76 %.o: %.c 77 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/init/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../.. 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = init 44 SOURCES = \ 45 init.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/init/init.c
r00413c5c rcc1f8d4 48 48 #include <string.h> 49 49 #include <devmap.h> 50 #include <config.h>51 50 #include "init.h" 52 51 -
uspace/app/klog/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 LIBS = $(LIBC_PREFIX)/libc.a 38 39 ## Sources 40 # 41 42 OUTPUT = klog 43 SOURCES = \ 44 klog.c 45 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/tester/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../srv/kbd/include 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = tester 45 SOURCES = tester.c \ 46 thread/thread1.c \ 47 print/print1.c \ 48 print/print2.c \ 49 print/print3.c \ 50 print/print4.c \ 51 console/console1.c \ 52 stdio/stdio1.c \ 53 stdio/stdio2.c \ 54 fault/fault1.c \ 55 fault/fault2.c \ 56 vfs/vfs1.c \ 57 ipc/ping_pong.c \ 58 ipc/register.c \ 59 ipc/connect.c \ 60 loop/loop1.c \ 61 mm/malloc1.c 62 63 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 64 65 .PHONY: all clean depend disasm 66 67 all: $(OUTPUT) $(OUTPUT).disasm 68 69 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 70 37 71 38 clean: 72 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 73 74 depend: 75 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 76 77 $(OUTPUT): $(OBJECTS) $(LIBS) 78 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 79 80 $(OUTPUT).disasm: $(OUTPUT) 81 $(OBJDUMP) -d $< > $@ 82 83 %.o: %.S 84 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 85 86 %.o: %.s 87 $(AS) $(AFLAGS) $< -o $@ 88 89 %.o: %.c 90 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/tetris/Makefile
r00413c5c rcc1f8d4 1 LIBC_PREFIX = ../../lib/libc 2 SOFTINT_PREFIX = ../../lib/softint 1 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 # All rights reserved. 5 # 6 # Redistribution and use in source and binary forms, with or without 7 # modification, are permitted provided that the following conditions 8 # are met: 9 # 10 # - Redistributions of source code must retain the above copyright 11 # notice, this list of conditions and the following disclaimer. 12 # - Redistributions in binary form must reproduce the above copyright 13 # notice, this list of conditions and the following disclaimer in the 14 # documentation and/or other materials provided with the distribution. 15 # - The name of the author may not be used to endorse or promote products 16 # derived from this software without specific prior written permission. 17 # 18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # 3 29 4 include $(LIBC_PREFIX)/Makefile.toolchain30 include Makefile.common 5 31 6 LIBS = $(LIBC_PREFIX)/libc.a 32 .PHONY: all clean 7 33 8 OUTPUT = tetris 9 SOURCES = shapes.c scores.c input.c tetris.c screen.c 10 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 11 12 .PHONY: all clean depend 13 14 all: $(OUTPUT) $(OUTPUT).disasm 15 16 -include Makefile.depend 17 18 depend: 19 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 20 21 $(OUTPUT): $(OBJECTS) $(LIBS) 22 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 23 37 24 38 clean: 25 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o 26 27 $(OUTPUT).disasm: $(OUTPUT) 28 $(OBJDUMP) -d $< > $@ 29 30 %.o: %.S 31 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 32 33 %.o: %.s 34 $(AS) $(AFLAGS) $< -o $@ 35 36 %.o: %.c 37 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/trace/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../srv/kbd/include 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = trace 45 SOURCES = trace.c \ 46 syscalls.c \ 47 ipcp.c \ 48 ipc_desc.c \ 49 proto.c \ 50 errors.c 51 52 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 53 54 .PHONY: all clean depend 55 56 all: $(OUTPUT) $(OUTPUT).disasm 57 58 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 59 37 60 38 clean: 61 -rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend 62 63 depend: 64 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 65 66 $(OUTPUT): $(OBJECTS) $(LIBS) 67 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 68 69 $(OUTPUT).disasm: $(OUTPUT) 70 $(OBJDUMP) -d $< > $@ 71 72 %.o: %.S 73 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 74 75 %.o: %.s 76 $(AS) $(AFLAGS) $< -o $@ 77 78 %.o: %.c 79 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/lib/libblock/Makefile
r00413c5c rcc1f8d4 28 28 # 29 29 30 ## Common compiler flags 31 # 30 include Makefile.common 32 31 33 LIBC_PREFIX = ../libc 32 .PHONY: all clean 34 33 35 ## Setup toolchain 36 # 37 38 include $(LIBC_PREFIX)/Makefile.toolchain 39 40 CFLAGS += -Iinclude 41 42 ## Sources 43 # 44 45 SOURCES = \ 46 libblock.c 47 48 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 49 50 .PHONY: all clean depend 51 52 all: libblock.a 53 54 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 55 37 56 38 clean: 57 -rm -f libblock.a Makefile.depend39 rm -f $(DEPEND) $(DEPEND_PREV) $(LIBBLOCK) 58 40 find . -name '*.o' -follow -exec rm \{\} \; 59 60 depend:61 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null62 63 libblock.a: depend $(OBJECTS)64 $(AR) rc libblock.a $(OBJECTS)65 66 %.o: %.c67 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ -
uspace/lib/libc/Makefile
r00413c5c rcc1f8d4 27 27 # 28 28 29 ## Common compiler flags 30 # 29 include Makefile.common 31 30 32 LIBC_PREFIX = $(shell pwd) 33 SOFTINT_PREFIX = ../softint 31 .PHONY: all clean 34 32 35 36 ## Setup toolchain 37 # 38 39 include $(LIBC_PREFIX)/Makefile.toolchain 40 41 42 ## Sources 43 # 44 45 GENERIC_SOURCES = \ 46 generic/libc.c \ 47 generic/ddi.c \ 48 generic/as.c \ 49 generic/cap.c \ 50 generic/devmap.c \ 51 generic/event.c \ 52 generic/errno.c \ 53 generic/mem.c \ 54 generic/string.c \ 55 generic/fibril.c \ 56 generic/fibril_sync.c \ 57 generic/pcb.c \ 58 generic/smc.c \ 59 generic/thread.c \ 60 generic/tls.c \ 61 generic/task.c \ 62 generic/futex.c \ 63 generic/io/asprintf.c \ 64 generic/io/io.c \ 65 generic/io/printf.c \ 66 generic/io/klog.c \ 67 generic/io/snprintf.c \ 68 generic/io/vprintf.c \ 69 generic/io/vsnprintf.c \ 70 generic/io/printf_core.c \ 71 generic/io/console.c \ 72 generic/malloc.c \ 73 generic/sysinfo.c \ 74 generic/ipc.c \ 75 generic/async.c \ 76 generic/loader.c \ 77 generic/getopt.c \ 78 generic/adt/list.o \ 79 generic/adt/hash_table.o \ 80 generic/time.c \ 81 generic/err.c \ 82 generic/stdlib.c \ 83 generic/mman.c \ 84 generic/udebug.c \ 85 generic/vfs/vfs.c \ 86 generic/vfs/canonify.c 87 88 ARCH_SOURCES += \ 89 arch/$(UARCH)/src/entry.s \ 90 arch/$(UARCH)/src/thread_entry.s 91 92 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 93 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) 94 OBJECTS := $(GENERIC_OBJECTS) $(ARCH_OBJECTS) 95 96 .PHONY: all clean depend kerninc 97 98 all: libc.a 99 100 -include Makefile.depend 33 all: ../../../Makefile.config ../../../config.h ../../../config.defs 34 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 35 $(MAKE) -f Makefile.build 101 36 102 37 clean: 103 -rm -f include/kernel include/arch include/libarch libc.a arch/$(UARCH)/_link.ld Makefile.depend 104 find generic/ arch/$(UARCH)/ -name '*.o' -follow -exec rm \{\} \; 105 106 depend: kerninc arch/$(UARCH)/_link.ld 107 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null 108 109 libc.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 110 $(AR) rc libc.a $(LIBS) $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 111 112 kerninc: 113 ln -sfn ../../../../kernel/generic/include include/kernel 114 ln -sfn kernel/arch include/arch 115 ln -sfn ../arch/$(UARCH)/include include/libarch 116 117 arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in 118 $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ 119 120 %.o: %.S 121 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 122 123 %.o: %.s 124 $(AS) $(AFLAGS) $< -o $@ 125 126 %.o: %.c 127 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 38 rm -f $(DEPEND) $(DEPEND_PREV) $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(LIBC) arch/*/_link.ld 39 find generic/ arch/*/ -name '*.o' -follow -exec rm \{\} \; -
uspace/lib/libc/Makefile.toolchain
r00413c5c rcc1f8d4 59 59 # 60 60 61 -include $(LIBC_PREFIX)/../../../Makefile.config62 -include $(LIBC_PREFIX)/../../../config.defs63 -include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc61 include $(LIBC_PREFIX)/../../../Makefile.config 62 include $(LIBC_PREFIX)/../../../config.defs 63 include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc 64 64 65 65 ## Simple detection of the host system -
uspace/lib/libfs/Makefile
r00413c5c rcc1f8d4 28 28 # 29 29 30 ## Common compiler flags 31 # 30 include Makefile.common 32 31 33 LIBC_PREFIX = ../libc 32 .PHONY: all clean 34 33 35 ## Setup toolchain 36 # 37 38 include $(LIBC_PREFIX)/Makefile.toolchain 39 40 CFLAGS += -Iinclude 41 42 ## Sources 43 # 44 45 SOURCES = \ 46 libfs.c 47 48 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 49 50 .PHONY: all clean depend 51 52 all: libfs.a 53 54 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 55 37 56 38 clean: 57 -rm -f libfs.a Makefile.depend39 rm -f $(DEPEND) $(DEPEND_PREV) $(LIBFS) 58 40 find . -name '*.o' -follow -exec rm \{\} \; 59 60 depend:61 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null62 63 libfs.a: depend $(OBJECTS)64 $(AR) rc libfs.a $(OBJECTS)65 66 %.o: %.c67 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ -
uspace/lib/softfloat/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Common compiler flags 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../libc 32 .PHONY: all clean 33 33 34 ## Setup toolchain 35 # 36 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 CFLAGS += -Iinclude -Iarch/$(UARCH)/include/ 40 41 ## Sources 42 # 43 44 GENERIC_SOURCES = \ 45 generic/add.c \ 46 generic/common.c \ 47 generic/comparison.c \ 48 generic/conversion.c \ 49 generic/div.c \ 50 generic/mul.c \ 51 generic/other.c \ 52 generic/softfloat.c \ 53 generic/sub.c 54 55 ARCH_SOURCES = 56 57 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 58 59 .PHONY: all clean depend 60 61 all: libsoftfloat.a 62 63 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 64 37 65 38 clean: 66 -rm -f libsoftfloat.a Makefile.depend 67 find generic/ -name '*.o' -follow -exec rm \{\} \; 68 69 depend: 70 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null 71 72 libsoftfloat.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 73 $(AR) rc libsoftfloat.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 74 75 %.o: %.S 76 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 77 78 %.o: %.s 79 $(AS) $(AFLAGS) $< -o $@ 80 81 %.o: %.c 82 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(LIBSOFTFLOAT) 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/lib/softint/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Common compiler flags 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../libc 32 .PHONY: all clean 33 33 34 ## Setup toolchain 35 # 36 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 CFLAGS += -Iinclude 40 41 ## Sources 42 # 43 44 ARCH_SOURCES = 45 46 GENERIC_SOURCES = \ 47 generic/division.c\ 48 generic/multiplication.c 49 50 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 51 52 .PHONY: all clean depend 53 54 all: libsoftint.a 55 56 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 57 37 58 38 clean: 59 -rm -f libsoftint.a Makefile.depend 60 find generic/ -name '*.o' -follow -exec rm \{\} \; 61 62 depend: 63 -makedepend -f - -- $(DEPEMD_DEFS) $(CFLAGS) -- $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null 64 65 libsoftint.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 66 $(AR) rc libsoftint.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 67 68 %.o: %.S 69 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 70 71 %.o: %.s 72 $(AS) $(AFLAGS) $< -o $@ 73 74 %.o: %.c 75 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(LIBSOFTINT) 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/bd/ata_bd/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = ata_bd 44 SOURCES = \ 45 ata_bd.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/bd/file_bd/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = file_bd 44 SOURCES = \ 45 file_bd.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/bd/gxe_bd/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = gxe_bd 44 SOURCES = \ 45 gxe_bd.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/bd/rd/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = rd 44 SOURCES = \ 45 rd.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/cir/fhc/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = fhc 44 SOURCES = \ 45 fhc.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/cir/obio/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = obio 44 SOURCES = \ 45 obio.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 $(OUTPUT).disasm: $(OUTPUT) 65 $(OBJDUMP) -d $< > $@ 66 67 %.o: %.S 68 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 69 70 %.o: %.s 71 $(AS) $(AFLAGS) $< -o $@ 72 73 %.o: %.c 74 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/console/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I. 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = console 45 46 GENERIC_SOURCES = \ 47 console.c \ 48 screenbuffer.c \ 49 keybuffer.c \ 50 gcons.c 51 52 IMAGES = \ 53 gfx/helenos.ppm \ 54 gfx/nameic.ppm \ 55 gfx/cons_selected.ppm \ 56 gfx/cons_idle.ppm \ 57 gfx/cons_has_data.ppm \ 58 gfx/cons_kernel.ppm \ 59 gfx/anim_1.ppm \ 60 gfx/anim_2.ppm \ 61 gfx/anim_3.ppm \ 62 gfx/anim_4.ppm 63 64 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \ 65 $(addsuffix .o,$(basename $(IMAGES))) 66 67 OBJECTS := $(GENERIC_OBJECTS) 68 69 .PHONY: all clean depend 70 71 all: $(OUTPUT) $(OUTPUT).disasm 72 73 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 74 37 75 38 clean: 76 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 77 78 depend: 79 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 80 81 $(OUTPUT): $(OBJECTS) $(LIBS) 82 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 83 84 $(OUTPUT).disasm: $(OUTPUT) 85 $(OBJDUMP) -d $< > $@ 86 87 %.o: %.S 88 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 89 90 %.o: %.s 91 $(AS) $(AFLAGS) $< -o $@ 92 93 %.o: %.c 94 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 95 96 %.o: %.ppm 97 $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) $< $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/console/console.c
r00413c5c rcc1f8d4 40 40 #include <ipc/services.h> 41 41 #include <errno.h> 42 #include <keybuffer.h>43 42 #include <ipc/console.h> 44 43 #include <unistd.h> … … 55 54 #include "console.h" 56 55 #include "gcons.h" 56 #include "keybuffer.h" 57 57 #include "screenbuffer.h" 58 58 -
uspace/srv/console/keybuffer.c
r00413c5c rcc1f8d4 35 35 */ 36 36 37 #include <keybuffer.h>38 37 #include <futex.h> 38 #include "keybuffer.h" 39 39 40 40 atomic_t keybuffer_futex = FUTEX_INITIALIZER; -
uspace/srv/console/screenbuffer.c
r00413c5c rcc1f8d4 33 33 */ 34 34 35 #include <screenbuffer.h>36 35 #include <io/style.h> 37 36 #include <malloc.h> 38 37 #include <unistd.h> 38 #include "screenbuffer.h" 39 39 40 40 /** Store one character to screenbuffer. -
uspace/srv/devmap/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 LIBS = $(LIBC_PREFIX)/libc.a 38 39 ## Sources 40 # 41 42 OUTPUT = devmap 43 SOURCES = \ 44 devmap.c 45 46 CFLAGS += -D$(UARCH) 47 48 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 49 50 .PHONY: all clean depend 51 52 all: $(OUTPUT) $(OUTPUT).disasm 53 54 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 55 37 56 38 clean: 57 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 58 59 depend: 60 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 61 62 $(OUTPUT): $(OBJECTS) $(LIBS) 63 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 64 65 $(OUTPUT).disasm: $(OUTPUT) 66 $(OBJDUMP) -d $< > $@ 67 68 %.o: %.S 69 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 70 71 %.o: %.s 72 $(AS) $(AFLAGS) $< -o $@ 73 74 %.o: %.c 75 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/fb/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 LIBS = $(LIBC_PREFIX)/libc.a 38 39 ## Sources 40 # 41 42 OUTPUT = fb 43 SOURCES = \ 44 main.c \ 45 ppm.c 46 47 ifneq ($(UARCH),ia64) 48 SOURCES += fb.c \ 49 font-8x16.c 50 CFLAGS += -DFB_ENABLED 51 endif 52 53 ifeq ($(UARCH),ia32) 54 SOURCES += ega.c 55 CFLAGS += -DEGA_ENABLED 56 endif 57 58 ifeq ($(UARCH),ia64) 59 SOURCES += ega.c \ 60 ski.c \ 61 serial_console.c 62 CFLAGS += -DSKI_ENABLED 63 CFLAGS += -DEGA_ENABLED 64 endif 65 66 ifeq ($(UARCH),amd64) 67 SOURCES += ega.c 68 CFLAGS += -DEGA_ENABLED 69 endif 70 71 ifeq ($(UARCH),mips32) 72 SOURCES += msim.c \ 73 serial_console.c 74 CFLAGS += -DMSIM_ENABLED 75 endif 76 77 ifeq ($(UARCH),sparc64) 78 SOURCES += sgcn.c \ 79 serial_console.c 80 CFLAGS += -DSGCN_ENABLED 81 endif 82 83 CFLAGS += -D$(UARCH) 84 85 86 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 87 88 .PHONY: all clean depend 89 90 all: $(OUTPUT) $(OUTPUT).disasm 91 92 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 93 37 94 38 clean: 95 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 96 97 depend: 98 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 99 100 $(OUTPUT): $(OBJECTS) $(LIBS) 101 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 102 103 $(OUTPUT).disasm: $(OUTPUT) 104 $(OBJDUMP) -d $< > $@ 105 106 %.o: %.S 107 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 108 109 %.o: %.s 110 $(AS) $(AFLAGS) $< -o $@ 111 112 %.o: %.c 113 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/fs/devfs/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../../lib/libc 33 LIBFS_PREFIX = ../../../lib/libfs 34 SOFTINT_PREFIX = ../../../lib/softint 32 .PHONY: all clean 35 33 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 CFLAGS += -I $(LIBFS_PREFIX) 39 40 LIBS = \ 41 $(LIBFS_PREFIX)/libfs.a \ 42 $(LIBC_PREFIX)/libc.a 43 44 ## Sources 45 # 46 47 OUTPUT = devfs 48 SOURCES = \ 49 devfs.c \ 50 devfs_ops.c 51 52 53 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 54 55 .PHONY: all clean depend 56 57 all: $(OUTPUT) $(OUTPUT).disasm 58 59 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 60 37 61 38 clean: 62 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 63 64 depend: 65 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 66 67 $(OUTPUT): $(OBJECTS) $(LIBS) 68 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 69 70 $(OUTPUT).disasm: $(OUTPUT) 71 $(OBJDUMP) -d $< > $@ 72 73 %.o: %.S 74 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 75 76 %.o: %.s 77 $(AS) $(AFLAGS) $< -o $@ 78 79 %.o: %.c 80 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/fs/fat/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../../lib/libc 33 LIBFS_PREFIX = ../../../lib/libfs 34 LIBBLOCK_PREFIX = ../../../lib/libblock 35 SOFTINT_PREFIX = ../../../lib/softint 32 .PHONY: all clean 36 33 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 CFLAGS += -I $(LIBFS_PREFIX) -I $(LIBBLOCK_PREFIX) 40 41 LIBS = \ 42 $(LIBFS_PREFIX)/libfs.a \ 43 $(LIBBLOCK_PREFIX)/libblock.a \ 44 $(LIBC_PREFIX)/libc.a 45 46 ## Sources 47 # 48 49 OUTPUT = fat 50 SOURCES = \ 51 fat.c \ 52 fat_ops.c \ 53 fat_idx.c \ 54 fat_dentry.c \ 55 fat_fat.c 56 57 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 58 59 .PHONY: all clean depend 60 61 all: $(OUTPUT) $(OUTPUT).disasm 62 63 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 64 37 65 38 clean: 66 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 67 68 depend: 69 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 70 71 $(OUTPUT): $(OBJECTS) $(LIBS) 72 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 73 74 $(OUTPUT).disasm: $(OUTPUT) 75 $(OBJDUMP) -d $< > $@ 76 77 %.o: %.S 78 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 79 80 %.o: %.s 81 $(AS) $(AFLAGS) $< -o $@ 82 83 %.o: %.c 84 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/fs/tmpfs/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../../lib/libc 33 LIBFS_PREFIX = ../../../lib/libfs 34 LIBBLOCK_PREFIX = ../../../lib/libblock 35 SOFTINT_PREFIX = ../../../lib/softint 32 .PHONY: all clean 36 33 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 CFLAGS += -I $(LIBFS_PREFIX) -I $(LIBBLOCK_PREFIX) 40 41 LIBS = \ 42 $(LIBFS_PREFIX)/libfs.a \ 43 $(LIBBLOCK_PREFIX)/libblock.a \ 44 $(LIBC_PREFIX)/libc.a 45 46 ## Sources 47 # 48 49 OUTPUT = tmpfs 50 SOURCES = \ 51 tmpfs.c \ 52 tmpfs_ops.c \ 53 tmpfs_dump.c 54 55 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 56 57 .PHONY: all clean depend 58 59 all: $(OUTPUT) $(OUTPUT).disasm 60 61 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 62 37 63 38 clean: 64 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 65 66 depend: 67 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 68 69 $(OUTPUT): $(OBJECTS) $(LIBS) 70 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 71 72 $(OUTPUT).disasm: $(OUTPUT) 73 $(OBJDUMP) -d $< > $@ 74 75 %.o: %.S 76 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 77 78 %.o: %.s 79 $(AS) $(AFLAGS) $< -o $@ 80 81 %.o: %.c 82 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/kbd/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -Iinclude 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = kbd 45 GENERIC_SOURCES = \ 46 generic/kbd.c \ 47 genarch/gsp.c \ 48 genarch/stroke.c 49 50 ARCH_SOURCES = 51 GENARCH_SOURCES = \ 52 layout/cz.c \ 53 layout/us_qwerty.c \ 54 layout/us_dvorak.c 55 56 ifeq ($(UARCH), amd64) 57 GENARCH_SOURCES += \ 58 port/i8042.c \ 59 ctl/pc.c 60 endif 61 62 ifeq ($(UARCH), arm32) 63 ifeq ($(MACHINE), testarm) 64 GENARCH_SOURCES += \ 65 port/gxemul.c 66 67 ifeq ($(CONFIG_FB), y) 68 GENARCH_SOURCES += \ 69 ctl/gxe_fb.c 70 else 71 GENARCH_SOURCES += \ 72 ctl/stty.c 73 endif 74 endif 75 ifeq ($(MACHINE), integratorcp) 76 GENARCH_SOURCES += \ 77 port/pl050.c \ 78 ctl/pl050.c 79 endif 80 endif 81 82 ifeq ($(UARCH), ia32) 83 GENARCH_SOURCES += \ 84 port/i8042.c \ 85 ctl/pc.c 86 endif 87 88 ifeq ($(MACHINE), i460GX) 89 GENARCH_SOURCES += \ 90 port/i8042.c \ 91 ctl/pc.c 92 endif 93 94 ifeq ($(MACHINE), ski) 95 GENARCH_SOURCES += \ 96 port/ski.c \ 97 ctl/stty.c 98 endif 99 100 ifeq ($(MACHINE), msim) 101 GENARCH_SOURCES += \ 102 port/msim.c \ 103 ctl/stty.c 104 endif 105 106 ifeq ($(MACHINE), lgxemul) 107 GENARCH_SOURCES += \ 108 port/gxemul.c 109 110 ifeq ($(CONFIG_FB), y) 111 GENARCH_SOURCES += \ 112 ctl/gxe_fb.c 113 else 114 GENARCH_SOURCES += \ 115 ctl/stty.c 116 endif 117 endif 118 119 ifeq ($(MACHINE), bgxemul) 120 GENARCH_SOURCES += \ 121 port/gxemul.c 122 123 ifeq ($(CONFIG_FB), y) 124 GENARCH_SOURCES += \ 125 ctl/gxe_fb.c 126 else 127 GENARCH_SOURCES += \ 128 ctl/stty.c 129 endif 130 endif 131 132 ifeq ($(UARCH), ppc32) 133 GENARCH_SOURCES += \ 134 port/dummy.c \ 135 ctl/stty.c 136 endif 137 138 ifeq ($(UARCH), sparc64) 139 ifeq ($(MACHINE),serengeti) 140 GENARCH_SOURCES += \ 141 port/sgcn.c \ 142 ctl/stty.c 143 else 144 GENARCH_SOURCES += \ 145 port/sun.c \ 146 port/z8530.c \ 147 port/ns16550.c \ 148 ctl/sun.c 149 endif 150 endif 151 152 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) 153 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) 154 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) 155 156 OBJECTS := $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(GENARCH_OBJECTS) 157 158 .PHONY: all clean depend 159 160 all: $(OUTPUT) $(OUTPUT).disasm 161 162 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 163 37 164 38 clean: 165 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 166 167 depend: 168 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 169 170 $(OUTPUT): $(OBJECTS) $(LIBS) 171 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 172 173 $(OUTPUT).disasm: $(OUTPUT) 174 $(OBJDUMP) -d $< > $@ 175 176 %.o: %.S 177 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 178 179 %.o: %.s 180 $(AS) $(AFLAGS) $< -o $@ 181 182 %.o: %.c 183 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/loader/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 200 8 Jiri Svoboda3 # Copyright (c) 2007 Jakub Jermar 4 4 # All rights reserved. 5 5 # … … 28 28 # 29 29 30 ## Setup toolchain 31 # 30 include Makefile.common 32 31 33 LIBC_PREFIX = ../../lib/libc 34 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 35 33 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 include arch/$(UARCH)/Makefile.inc 38 39 CFLAGS += -Iinclude 40 41 LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a 42 43 ## Sources 44 # 45 46 OUTPUT = loader 47 GENERIC_SOURCES = \ 48 main.c \ 49 elf_load.c \ 50 interp.s 51 52 SOURCES := $(GENERIC_SOURCES) $(ARCH_SOURCES) 53 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 54 55 .PHONY: all clean depend 56 57 all: $(OUTPUT) $(OUTPUT).disasm 58 59 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 60 37 61 38 clean: 62 -rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm arch/$(UARCH)/_link.ld Makefile.depend 63 64 depend: 65 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 66 67 $(OUTPUT): $(OBJECTS) $(LIBS) arch/$(UARCH)/_link.ld 68 $(LD) -T arch/$(UARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map 69 70 $(OUTPUT).disasm: $(OUTPUT) 71 $(OBJDUMP) -d $< > $@ 72 73 arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in 74 $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ 75 76 %.o: %.S 77 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 78 79 %.o: %.s 80 $(AS) $(AFLAGS) $< -o $@ 81 82 %.o: %.c 83 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm arch/*/_link.ld 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/ns/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 LIBS = $(LIBC_PREFIX)/libc.a 38 39 ## Sources 40 # 41 42 OUTPUT = ns 43 SOURCES = \ 44 ns.c \ 45 service.c \ 46 clonable.c \ 47 task.c 48 49 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 50 51 .PHONY: all clean depend 52 53 all: $(OUTPUT) $(OUTPUT).disasm 54 55 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 56 37 57 38 clean: 58 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 59 60 depend: 61 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 62 63 $(OUTPUT): $(OBJECTS) $(LIBS) 64 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 65 66 $(OUTPUT).disasm: $(OUTPUT) 67 $(OBJDUMP) -d $< > $@ 68 69 %.o: %.S 70 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 71 72 %.o: %.s 73 $(AS) $(AFLAGS) $< -o $@ 74 75 %.o: %.c 76 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/part/mbr_part/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 2006 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 .PHONY: all clean 32 33 33 LIBC_PREFIX = ../../../lib/libc 34 SOFTINT_PREFIX = ../../../lib/softint 35 LIBBLOCK_PREFIX = ../../../lib/libblock 36 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 CFLAGS += -I$(LIBBLOCK_PREFIX) 40 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 41 42 ## Sources 43 # 44 45 OUTPUT = mbr_part 46 SOURCES = \ 47 mbr_part.c 48 49 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 50 51 .PHONY: all clean depend 52 53 all: $(OUTPUT) $(OUTPUT).disasm 54 55 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 56 37 57 38 clean: 58 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 59 60 depend: 61 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 62 63 $(OUTPUT): $(OBJECTS) $(LIBS) 64 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 65 66 $(OUTPUT).disasm: $(OUTPUT) 67 $(OBJDUMP) -d $< > $@ 68 69 %.o: %.S 70 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 71 72 %.o: %.s 73 $(AS) $(AFLAGS) $< -o $@ 74 75 %.o: %.c 76 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/pci/Makefile
r00413c5c rcc1f8d4 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 36 37 37 38 LIBS = libpci/libpci.a $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = pci 44 SOURCES = \ 45 pci.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 38 $(LIBPCI): 39 $(MAKE) -C libpci 54 40 55 41 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)57 42 $(MAKE) -C libpci clean 58 59 depend: 60 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 61 62 $(OUTPUT): $(OBJECTS) $(LIBS) 63 $(MAKE) -C libpci 64 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 65 66 $(OUTPUT).disasm: $(OUTPUT) 67 $(OBJDUMP) -d $< > $@ 68 69 %.o: %.S 70 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 71 72 %.o: %.s 73 $(AS) $(AFLAGS) $< -o $@ 74 75 %.o: %.c 76 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 77 78 libpci/libpci.a: 79 $(MAKE) -C libpci 43 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 44 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/pci/libpci/Makefile
r00413c5c rcc1f8d4 1 # Makefile for The PCI Library 2 # (c) 1999 Martin Mares <mj@ucw.cz> 1 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 # All rights reserved. 5 # 6 # Redistribution and use in source and binary forms, with or without 7 # modification, are permitted provided that the following conditions 8 # are met: 9 # 10 # - Redistributions of source code must retain the above copyright 11 # notice, this list of conditions and the following disclaimer. 12 # - Redistributions in binary form must reproduce the above copyright 13 # notice, this list of conditions and the following disclaimer in the 14 # documentation and/or other materials provided with the distribution. 15 # - The name of the author may not be used to endorse or promote products 16 # derived from this software without specific prior written permission. 17 # 18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # 3 29 4 # Modified and ported to HelenOS by Jakub Jermar 30 include Makefile.common 5 31 6 LIBC_PREFIX=$(shell cd ../../../lib/libc; pwd) 32 .PHONY: all clean 7 33 8 include $(LIBC_PREFIX)/Makefile.toolchain 9 10 LIBS = $(LIBC_PREFIX)/libc.a 11 CFLAGS += -I$(LIBC_PREFIX)/include -trigraphs 12 13 OBJS=access.o generic.o names.o 14 INCL=internal.h pci.h header.h sysdep.h types.h pci_ids.h 15 16 PCILIB=libpci.a 17 18 OBJS += i386-ports.o 19 20 all: $(PCILIB) 21 22 $(PCILIB): $(OBJS) 23 $(AR) rc $@ $(OBJS) 24 25 %.o: %.c $(INCL) 26 $(CC) $(CFLAGS) -c $< -o $@ 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 27 37 28 38 clean: 29 -rm *.o libpci.a 39 rm -f $(DEPEND) $(DEPEND_PREV) $(LIBPCI) 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/srv/vfs/Makefile
r00413c5c rcc1f8d4 1 1 # 2 # Copyright (c) 200 6Martin Decky3 # Copyright (c) 200 8Jakub Jermar2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 4 # All rights reserved. 5 5 # … … 28 28 # 29 29 30 ## Setup toolchain 31 # 30 include Makefile.common 32 31 33 LIBC_PREFIX = ../../lib/libc 34 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 35 33 36 include $(LIBC_PREFIX)/Makefile.toolchain 37 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = vfs 44 SOURCES = \ 45 vfs.c \ 46 vfs_node.c \ 47 vfs_file.c \ 48 vfs_ops.c \ 49 vfs_lookup.c \ 50 vfs_register.c 51 52 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 53 54 .PHONY: all clean depend 55 56 all: $(OUTPUT) $(OUTPUT).disasm 57 58 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 59 37 60 38 clean: 61 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 62 63 depend: 64 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 65 66 $(OUTPUT): $(OBJECTS) $(LIBS) 67 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 68 69 $(OUTPUT).disasm: $(OUTPUT) 70 $(OBJDUMP) -d $< > $@ 71 72 %.o: %.S 73 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 74 75 %.o: %.s 76 $(AS) $(AFLAGS) $< -o $@ 77 78 %.o: %.c 79 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \;
Note:
See TracChangeset
for help on using the changeset viewer.