comparison src/makefile-armgccbc @ 54:aa0095c4c2b0

fix cmake linker options
author anatofuz
date Thu, 06 Jun 2019 19:16:22 +0900
parents 36bd61f5c847
children
comparison
equal deleted inserted replaced
53:435bfab09924 54:aa0095c4c2b0
29 $(1) -c -o $@ $<," AS $(TARGET_DIR)$@") 29 $(1) -c -o $@ $<," AS $(TARGET_DIR)$@")
30 30
31 # link the libgcc.a for __aeabi_idiv. ARM has no native support for div 31 # link the libgcc.a for __aeabi_idiv. ARM has no native support for div
32 LIBS = $(LIBGCC) 32 LIBS = $(LIBGCC)
33 33
34 CMAKEDIR = CMakeFiles/kernel.dir
35
34 OBJS = \ 36 OBJS = \
35 lib/string.o \ 37 $(CMAKEDIR)/lib/string.c.o \
38 $(CMAKEDIR)/c/kernel-context.c.o\
39 $(CMAKEDIR)/arm.c.o\
40 $(CMAKEDIR)/asm.S.o\
41 $(CMAKEDIR)/bio.c.o\
42 $(CMAKEDIR)/buddy.c.o\
43 $(CMAKEDIR)/c/console.c.o\
44 $(CMAKEDIR)/exec.c.o\
45 $(CMAKEDIR)/c/file.c.o\
46 $(CMAKEDIR)/fs.c.o\
47 $(CMAKEDIR)/log.c.o\
48 $(CMAKEDIR)/main.c.o\
49 $(CMAKEDIR)/memide.c.o\
50 $(CMAKEDIR)/c/pipe.c.o\
51 $(CMAKEDIR)/c/proc.c.o\
52 $(CMAKEDIR)/c/spinlock.c.o\
53 $(CMAKEDIR)/start.c.o\
54 $(CMAKEDIR)/swtch.S.o\
55 $(CMAKEDIR)/c/syscall.c.o\
56 $(CMAKEDIR)/c/sysfile.c.o\
57 $(CMAKEDIR)/sysproc.c.o\
58 $(CMAKEDIR)/trap_asm.c.o\
59 $(CMAKEDIR)/trap.c.o\
60 $(CMAKEDIR)/vm.c.o \
36 \ 61 \
37 arm.o\ 62 $(CMAKEDIR)/device/picirq.c.o \
38 asm.o\ 63 $(CMAKEDIR)/device/timer.c.o \
39 bio.o\ 64 $(CMAKEDIR)/device/uart.c.o
40 buddy.o\
41 console.o\
42 exec.o\
43 file.o\
44 fs.o\
45 log.o\
46 main.o\
47 memide.o\
48 pipe.o\
49 proc.o\
50 spinlock.o\
51 start.o\
52 swtch.o\
53 syscall.o\
54 sysfile.o\
55 sysproc.o\
56 trap_asm.o\
57 trap.o\
58 vm.o \
59 \
60 device/picirq.o \
61 device/timer.o \
62 device/uart.o
63 65
64 KERN_OBJS = $(OBJS) entry.o 66 KERN_OBJS = $(OBJS) entry.S.o
65 kernel.elf: $(addprefix build/,$(KERN_OBJS)) kernel.ld build/initcode build/fs.img 67 kernel.elf: $(KERN_OBJS) kernel.ld build/initcode build/fs.img
66 cp -f build/initcode initcode 68 cp -f build/initcode initcode
67 cp -f build/fs.img fs.img 69 cp -f build/fs.img fs.img
68 $(call LINK_BIN, kernel.ld, kernel.elf, \ 70 $(call LINK_BIN, kernel.ld, kernel.elf, \
69 $(addprefix build/,$(KERN_OBJS)), \ 71 $(KERN_OBJS), \
70 initcode fs.img) 72 initcode fs.img)
71 $(OBJDUMP) -S kernel.elf > kernel.asm 73 $(OBJDUMP) -S kernel.elf > kernel.asm
72 $(OBJDUMP) -t kernel.elf | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernel.sym 74 $(OBJDUMP) -t kernel.elf | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernel.sym
73 rm -f initcode fs.img 75 rm -f initcode fs.img
74 76