Changeset 6bc4dbd in mainline for Makefile


Ignore:
Timestamp:
2005-11-08T00:00:15Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5b65205
Parents:
849ba5cb
Message:

new build system upgrade
finished work for IA-32, IA-64, PPC-32, SPARC-64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r849ba5cb r6bc4dbd  
    4747#
    4848
     49DEFS = -DARCH=$(ARCH)
    4950CFLAGS = -fno-builtin -fomit-frame-pointer -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
    5051LFLAGS = -M
     52AFLAGS =
    5153
    5254## Setup kernel configuration
     
    129131
    130132clean:
     133        -rm -f kernel.bin kernel.map kernel.map.pre kernel.objdump generic/src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
    131134        find generic/src/ arch/$(ARCH)/src/ genarch/src/ -name '*.o' -exec rm \{\} \;
    132         -rm -f kernel.bin kernel.map kernel.map.pre kernel.objdump generic/src/debug/real_map.bin Makefile.depend generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
    133135        $(MAKE) -C arch/$(ARCH)/boot clean
    134136
     
    138140
    139141depend: config
    140         $(CC) $(CFLAGS) -M $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend
     142        $(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend
    141143
    142144arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
    143         $(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
     145        $(CC) $(DEFS) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
    144146
    145147generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
     
    156158
    157159boot: kernel.bin
    158         $(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`"
     160        $(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`" CC=$(CC) AS=$(AS) LD=$(LD)
    159161
    160162%.o: %.S
    161         $(CC) $(ASFLAGS) $(CFLAGS) -c $< -o $@
     163        $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -c $< -o $@
    162164
    163165%.o: %.s
    164         $(AS) $(ASFLAGS) $< -o $@
     166        $(AS) $(AFLAGS) $< -o $@
    165167
    166168%.o: %.c
    167         $(CC) $(CFLAGS) -c $< -o $@
     169        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracChangeset for help on using the changeset viewer.