2 # Makefile fragment for the JOS kernel.
3 # This is NOT a complete makefile;
4 # you must run GNU make in the top-level directory
5 # where the GNUmakefile is located.
10 BOOT_OBJS := $(OBJDIR)/boot/boot.o $(OBJDIR)/boot/main.o
12 $(OBJDIR)/boot/%.o: boot/%.c
15 $(V)$(CC) -nostdinc $(KERN_CFLAGS) -Os -c -o $@ $<
17 $(OBJDIR)/boot/%.o: boot/%.S
20 $(V)$(CC) -nostdinc $(KERN_CFLAGS) -c -o $@ $<
22 $(OBJDIR)/boot/main.o: boot/main.c
24 $(V)$(CC) -nostdinc $(KERN_CFLAGS) -Os -c -o $(OBJDIR)/boot/main.o boot/main.c
26 $(OBJDIR)/boot/boot: $(BOOT_OBJS)
28 $(V)$(LD) $(LDFLAGS) -N -e start -Ttext 0x7C00 -o $@.out $^
29 $(V)$(OBJDUMP) -S $@.out >$@.asm
30 $(V)$(OBJCOPY) -S -O binary $@.out $@
31 $(V)perl boot/sign.pl $(OBJDIR)/boot/boot