]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/arch/x86/Makefile.final
makefile: introduce target flags (TFLAGS)
[polintos/scott/priv.git] / kernel / arch / x86 / Makefile.final
index 090c11d9ba638bda89810275de418ad54d5340a7..93aa5ed440443a7f4dd418cc7da6debe44e75e59 100644 (file)
@@ -2,8 +2,9 @@ DIR := arch/x86/
 
 $(BUILDDIR)/kernel: $(OBJS) $(LIBS) $(DIR)linker-script
        @echo $(COMP): Linking kernel: $@
-       @$(MKDIR) $(dir $@)
-       @$(CXX) $(OBJS) $(LIBS) -lgcc -lsupc++ -nostdlib -o "$@" -Wl,-T$(DIR)linker-script
+       $(V)$(MKDIR) $(dir $@)
+       $(V)$(CXX) $(LDFLAGS) $(OBJS) $(LIBS) -lgcc -lsupc++ \
+               -nostdlib -o "$@" -Wl,-T$(DIR)linker-script
 
 # GRUB refuses to use the addresses in the multiboot header if it
 # finds a valid ELF header, so the dd hacks a zero into the high byte
@@ -14,6 +15,6 @@ $(BUILDDIR)/kernel: $(OBJS) $(LIBS) $(DIR)linker-script
 
 $(BUILDDIR)/kernel.stripped: $(BUILDDIR)/kernel
        @echo $(COMP): Stripping kernel: $@
-       @$(STRIP) $(BUILDDIR)/kernel -o "$@"
-       @dd if=/dev/zero of=$(BUILDDIR)/kernel.stripped conv=notrunc \
-       bs=1 count=1 seek=67
+       $(V)$(STRIP) $(BUILDDIR)/kernel -o "$@"
+       $(V)dd if=/dev/zero of=$(BUILDDIR)/kernel.stripped conv=notrunc \
+               bs=1 count=1 seek=67