|
|
1.1 root 1: # ***************************************************************************** 1.1.1.2 ! root 2: # * Copyright (c) 2004, 2011 IBM Corporation 1.1 root 3: # * All rights reserved. 4: # * This program and the accompanying materials 5: # * are made available under the terms of the BSD License 6: # * which accompanies this distribution, and is available at 7: # * http://www.opensource.org/licenses/bsd-license.php 8: # * 9: # * Contributors: 10: # * IBM Corporation - initial implementation 11: # ****************************************************************************/ 12: 13: include $(TOPCMNDIR)/make.rules 14: 15: SNKDIR = $(TOPCMNDIR)/clients/net-snk 16: 17: CFLAGS += -fno-builtin -I$(LIBCMNDIR)/libc/include 18: CFLAGS += -I$(SNKDIR)/include -I. $(CPUARCHDEF) 1.1.1.2 ! root 19: CFLAGS += -I$(INCLBRDDIR) -I$(INCLCMNDIR) -I$(INCLCMNDIR)/$(CPUARCH) 1.1 root 20: CFLAGS += -O2 -msoft-float -Wa,-mregnames $(RELEASE) 21: 22: OBJS = $(SNKDIR)/kernel/kernel.o 23: OBJS += $(SNKDIR)/oflib/oflib.o 24: OBJS += $(SNKDIR)/libc/time/timer.o 1.1.1.2 ! root 25: OBJS += entry.o main.o of.elf takeover.o ! 26: OBJS += $(LIBCMNDIR)/libelf.a $(LIBCMNDIR)/libc.a 1.1 root 27: 28: %.o: %.S 29: $(CC) $(CFLAGS) -c $^ 30: 31: all: takeover.elf 32: 33: takeover.elf: ppc32wrap.o takeover.elf32 34: @echo " ====== Building $@ ======" 35: $(LD) -N -melf32ppclinux -static -nostdlib \ 36: -Ttext=0x400000 -Tdata=0x400100 \ 37: $(LDFLAGS) $^ -o $@ 38: 39: takeover.elf64: entry.o main.o takeover.o $(SNKDIR)/libc/time/timer.o of.elf 1.1.1.2 ! root 40: $(MAKE) -C $(LIBCMNDIR) libc ! 41: $(MAKE) -C $(CLIENTSDIR) 1.1 root 42: $(LD) $(LDFLAGS) -o $@ -Tclient.lds $(OBJS) 43: 44: of.elf: ../../boot_rom.bin 45: $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf64-powerpc $< $@ 46: 47: takeover.elf32: takeover.elf64 48: $(OBJCOPY) -O binary $^ takeover.tmp 49: $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf32-powerpc takeover.tmp $@ 50: 51: ppc32wrap.o: ppc32wrap.S 52: $(CROSS)gcc -m32 -a32 $(CFLAGS) -c $< -o $@ 53: 54: clean distclean: 1.1.1.2 ! root 55: $(MAKE) -C $(LIBCMNDIR) $@ ! 56: $(MAKE) -C $(CLIENTSDIR) $@ 1.1 root 57: $(RM) *.o *.bin *.elf 58: $(RM) takeover.elf32 takeover.elf64 takeover.tmp 59: %.o: %.oco 60: cp -f $< $@
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.