Changeset bd1deed in mainline for kernel/Makefile


Ignore:
Timestamp:
2007-02-11T20:04:08Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c993e45
Parents:
ce8aed1
Message:

experimental support for Objective C
(disabled by default)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rce8aed1 rbd1deed  
    129129        OBJCOPY = objcopy
    130130        OBJDUMP = objdump
     131        LIBDIR = /usr/lib
    131132else
    132         CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
    133         AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
    134         LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
    135         OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
    136         OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
     133        CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc
     134        AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as
     135        LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld
     136        OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy
     137        OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump
     138        LIBDIR = $(TOOLCHAIN_DIR)/lib
    137139endif
    138140
     
    240242endif
    241243
     244## Experimental features
     245#
     246
     247ifeq ($(CONFIG_EXPERIMENTAL),y)
     248        GENERIC_SOURCES += generic/src/lib/objc.c
     249        EXTRA_OBJECTS = $(LIBDIR)/libobjc.a
     250        EXTRA_FLAGS += -x objective-c
     251endif
     252
    242253GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
    243254ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
     
    280291generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
    281292        $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile generic/src/debug/empty_map.o
    282         $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre
     293        $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre
    283294        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump
    284295        tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin
     
    286297        # on architectures, that have bss after symtab
    287298        $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab generic/src/debug/real_map.bin generic/src/debug/sizeok_map.o
    288         $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre
     299        $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre
    289300        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump
    290301        tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin
     
    294305
    295306kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o
    296         $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map
     307        $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map
    297308
    298309kernel.bin: kernel.raw
     
    309320
    310321%.o: %.c
    311         $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
     322        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
Note: See TracChangeset for help on using the changeset viewer.