Changeset 440 for trunk/kernel/Makefile
- Timestamp:
- May 3, 2018, 5:51:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/Makefile
r439 r440 8 8 endif 9 9 10 #We choose drivers and hal file we need to linkwith kernel.elf10 #We choose drivers and hal file to be linked with kernel.elf 11 11 ifeq ($(ARCH_NAME), tsar_mips32) 12 12 13 DRIVERS_OBJS = $(HAL_ARCH)/build/drivers/soclib_tty.o \ 13 $(HAL_ARCH)/build/drivers/soclib_bdv.o \14 $(HAL_ARCH)/build/drivers/soclib_hba.o \15 $(HAL_ARCH)/build/drivers/soclib_mmc.o \16 $(HAL_ARCH)/build/drivers/soclib_pic.o \17 $(HAL_ARCH)/build/drivers/soclib_nic.o \18 $(HAL_ARCH)/build/drivers/soclib_dma.o \19 $(HAL_ARCH)/build/drivers/soclib_iob.o20 21 CORE_OBJS = $(HAL_ARCH)/build/core/hal_special.o\22 $(HAL_ARCH)/build/core/hal_context.o\23 $(HAL_ARCH)/build/core/hal_atomic.o\24 $(HAL_ARCH)/build/core/hal_remote.o\25 $(HAL_ARCH)/build/core/hal_uspace.o\26 $(HAL_ARCH)/build/core/hal_irqmask.o\27 $(HAL_ARCH)/build/core/hal_gpt.o\28 $(HAL_ARCH)/build/core/hal_ppm.o\29 $(HAL_ARCH)/build/core/hal_vmm.o\30 $(HAL_ARCH)/build/core/hal_exception.o\31 $(HAL_ARCH)/build/core/hal_interrupt.o\32 $(HAL_ARCH)/build/core/hal_syscall.o\33 $(HAL_ARCH)/build/core/hal_drivers.o\34 $(HAL_ARCH)/build/core/hal_kentry.o\35 $(HAL_ARCH)/build/core/hal_switch.o14 $(HAL_ARCH)/build/drivers/soclib_bdv.o \ 15 $(HAL_ARCH)/build/drivers/soclib_hba.o \ 16 $(HAL_ARCH)/build/drivers/soclib_mmc.o \ 17 $(HAL_ARCH)/build/drivers/soclib_pic.o \ 18 $(HAL_ARCH)/build/drivers/soclib_nic.o \ 19 $(HAL_ARCH)/build/drivers/soclib_dma.o \ 20 $(HAL_ARCH)/build/drivers/soclib_iob.o 21 22 HAL_OBJS = $(HAL_ARCH)/build/core/hal_special.o \ 23 $(HAL_ARCH)/build/core/hal_context.o \ 24 $(HAL_ARCH)/build/core/hal_atomic.o \ 25 $(HAL_ARCH)/build/core/hal_remote.o \ 26 $(HAL_ARCH)/build/core/hal_uspace.o \ 27 $(HAL_ARCH)/build/core/hal_irqmask.o \ 28 $(HAL_ARCH)/build/core/hal_gpt.o \ 29 $(HAL_ARCH)/build/core/hal_ppm.o \ 30 $(HAL_ARCH)/build/core/hal_vmm.o \ 31 $(HAL_ARCH)/build/core/hal_kentry.o \ 32 $(HAL_ARCH)/build/core/hal_switch.o \ 33 $(HAL_ARCH)/build/core/hal_syscall.o \ 34 $(HAL_ARCH)/build/core/hal_exception.o \ 35 $(HAL_ARCH)/build/core/hal_interrupt.o \ 36 $(HAL_ARCH)/build/core/hal_drivers.o 36 37 endif 37 38 … … 39 40 40 41 DRIVERS_OBJS = $(HAL_ARCH)/build/drivers/ioc_ata.o \ 41 $(HAL_ARCH)/build/drivers/pic_apic.o \ 42 $(HAL_ARCH)/build/drivers/txt_rs232.o 43 44 CORE_OBJS = \ 45 $(HAL_ARCH)/build/core/hal_boot.o \ 46 $(HAL_ARCH)/build/core/hal_smpboot.o \ 47 $(HAL_ARCH)/build/core/hal_init.o \ 48 $(HAL_ARCH)/build/core/hal_cpu.o \ 49 $(HAL_ARCH)/build/core/hal_kentry.o \ 50 $(HAL_ARCH)/build/core/hal_acpi.o \ 51 $(HAL_ARCH)/build/core/hal_apic.o \ 52 $(HAL_ARCH)/build/core/x86_printf.o \ 53 $(HAL_ARCH)/build/core/hal_drivers.o \ 54 $(HAL_ARCH)/build/core/hal_special.o \ 55 $(HAL_ARCH)/build/core/hal_context.o \ 56 $(HAL_ARCH)/build/core/hal_atomic.o \ 57 $(HAL_ARCH)/build/core/hal_remote.o \ 58 $(HAL_ARCH)/build/core/hal_uspace.o \ 59 $(HAL_ARCH)/build/core/hal_irqmask.o \ 60 $(HAL_ARCH)/build/core/hal_gpt.o \ 61 $(HAL_ARCH)/build/core/hal_ppm.o \ 62 $(HAL_ARCH)/build/core/hal_exception.o \ 63 $(HAL_ARCH)/build/core/hal_interrupt.o \ 64 $(HAL_ARCH)/build/core/hal_syscall.o 65 42 $(HAL_ARCH)/build/drivers/pic_apic.o \ 43 $(HAL_ARCH)/build/drivers/txt_rs232.o 44 45 HAL_OBJS = $(HAL_ARCH)/build/core/hal_boot.o \ 46 $(HAL_ARCH)/build/core/hal_smpboot.o \ 47 $(HAL_ARCH)/build/core/hal_init.o \ 48 $(HAL_ARCH)/build/core/hal_cpu.o \ 49 $(HAL_ARCH)/build/core/hal_kentry.o \ 50 $(HAL_ARCH)/build/core/hal_acpi.o \ 51 $(HAL_ARCH)/build/core/hal_apic.o \ 52 $(HAL_ARCH)/build/core/x86_printf.o \ 53 $(HAL_ARCH)/build/core/hal_drivers.o \ 54 $(HAL_ARCH)/build/core/hal_special.o \ 55 $(HAL_ARCH)/build/core/hal_context.o \ 56 $(HAL_ARCH)/build/core/hal_atomic.o \ 57 $(HAL_ARCH)/build/core/hal_remote.o \ 58 $(HAL_ARCH)/build/core/hal_uspace.o \ 59 $(HAL_ARCH)/build/core/hal_irqmask.o \ 60 $(HAL_ARCH)/build/core/hal_gpt.o \ 61 $(HAL_ARCH)/build/core/hal_ppm.o \ 62 $(HAL_ARCH)/build/core/hal_exception.o \ 63 $(HAL_ARCH)/build/core/hal_interrupt.o \ 64 $(HAL_ARCH)/build/core/hal_syscall.o 66 65 endif 67 66 … … 187 186 # List of directories to be searched for included files 188 187 # when compiling for kernel.elf generation 189 KERNEL_INCLUDE = -I. \190 -Ikern \191 -Idevices \192 -Isyscalls \188 KERNEL_INCLUDE = -I. \ 189 -Ikern \ 190 -Idevices \ 191 -Isyscalls \ 193 192 -I$(HAL_ARCH)/drivers \ 194 -Isyscalls \195 -Ilibk \196 -Imm \197 -Ifs \198 -I../tools/arch_info 199 -I$(HAL)/generic 193 -Isyscalls \ 194 -Ilibk \ 195 -Imm \ 196 -Ifs \ 197 -I../tools/arch_info \ 198 -I$(HAL)/generic \ 200 199 -I$(HAL_ARCH)/core \ 201 200 -I.. … … 225 224 ####################################### 226 225 # Rules to generate kernel/kern objects 227 build/kern/%.o: kern/%.c \228 kern/%.h\229 kernel_config.h\230 226 build/kern/%.o: kern/%.c \ 227 kern/%.h \ 228 kernel_config.h \ 229 $(HAL_ARCH)/core/hal_types.h 231 230 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 232 231 … … 234 233 ###################################### 235 234 # Rules to generate kernel/dev objects 236 build/devices/%.o: devices/%.c\237 devices/%.h\238 kernel_config.h\239 235 build/devices/%.o: devices/%.c \ 236 devices/%.h \ 237 kernel_config.h \ 238 $(HAL_ARCH)/core/hal_types.h 240 239 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 241 240 242 241 ##################################### 243 242 # Rules to generate kernel/mm objects 244 build/mm/%.o: mm/%.c\245 mm/%.h\246 kernel_config.h\247 243 build/mm/%.o: mm/%.c \ 244 mm/%.h \ 245 kernel_config.h \ 246 $(HAL_ARCH)/core/hal_types.h 248 247 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 249 248 250 249 ####################################### 251 250 # Rules to generate kernel/libk objects 252 build/libk/%.o: libk/%.c\253 libk/%.h\254 kernel_config.h\255 251 build/libk/%.o: libk/%.c \ 252 libk/%.h \ 253 kernel_config.h \ 254 $(HAL_ARCH)/core/hal_types.h 256 255 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 257 256 258 257 ########################################### 259 258 # Rules to generate kernel/syscalls objects 260 build/syscalls/%.o: syscalls/%.c\261 syscalls/syscalls.h\262 kernel_config.h\263 259 build/syscalls/%.o: syscalls/%.c \ 260 syscalls/syscalls.h \ 261 kernel_config.h \ 262 $(HAL_ARCH)/core/hal_types.h 264 263 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 265 264 266 265 ####################################### 267 266 # Rules to generate kernel/fs objects 268 build/fs/%.o: fs/%.c\269 fs/%.h\270 kernel_config.h\271 272 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 273 274 ############################## ###############################267 build/fs/%.o: fs/%.c \ 268 fs/%.h \ 269 kernel_config.h \ 270 $(HAL_ARCH)/core/hal_types.h 271 $(CC) $(KERNEL_INCLUDE) $(CFLAGS) -c -o $@ $< 272 273 ############################## 275 274 # Rule to generate kernel.elf 276 # TODO the syscalls grouped in SYS_OBJS_2 must be introduced 277 build/kernel.elf: $(KERN_OBJS) \278 $(CORE_OBJS)\279 $(DEV_OBJS)\280 $(MM_OBJS)\281 $(LIBK_OBJS)\282 $(DRIVERS_OBJS)\283 $(VFS_OBJS)\284 $(SYS_OBJS_0)\285 $(SYS_OBJS_1)\286 $(SYS_OBJS_2)\287 $(SYS_OBJS_3)\288 $(SYS_OBJS_4)\289 290 $(LD) -o $@ -T $(HAL_ARCH)/kernel.ld $(LIBGCC) \291 $(KERN_OBJS) $( CORE_OBJS) $(DEV_OBJS) $(MM_OBJS)\292 $(LIBK_OBJS) $(DRIVERS_OBJS) $(VFS_OBJS) 293 $(SYS_OBJS_0) $(SYS_OBJS_1) $(SYS_OBJS_2) 275 build/kernel.elf: $(KERN_OBJS) \ 276 $(HAL_OBJS_0) \ 277 $(HAL_OBJS_1) \ 278 $(DEV_OBJS) \ 279 $(MM_OBJS) \ 280 $(LIBK_OBJS) \ 281 $(DRIVERS_OBJS) \ 282 $(VFS_OBJS) \ 283 $(SYS_OBJS_0) \ 284 $(SYS_OBJS_1) \ 285 $(SYS_OBJS_2) \ 286 $(SYS_OBJS_3) \ 287 $(SYS_OBJS_4) \ 288 $(HAL_ARCH)/kernel.ld 289 $(LD) -o $@ -T $(HAL_ARCH)/kernel.ld $(LIBGCC) \ 290 $(KERN_OBJS) $(HAL_OBJS) $(DEV_OBJS) $(MM_OBJS) \ 291 $(LIBK_OBJS) $(DRIVERS_OBJS) $(VFS_OBJS) \ 292 $(SYS_OBJS_0) $(SYS_OBJS_1) $(SYS_OBJS_2) \ 294 293 $(SYS_OBJS_3) $(SYS_OBJS_4) -lgcc 295 294 $(DU) -D $@ > $@.txt
Note: See TracChangeset
for help on using the changeset viewer.