[BACK]Return to Makefile CVS log [TXT][DIR] Up to [Development] / linux-2.4-xfs / arch / mips / lasat / image

File: [Development] / linux-2.4-xfs / arch / mips / lasat / image / Makefile (download)

Revision 1.2, Thu Jan 20 13:59:19 2005 UTC (12 years, 8 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -3 lines

Merge up to 2.4.29.
Merge of 2.4.x-xfs-melb:linux:21231a by kenmcd.

#
# MAKEFILE FOR THE MIPS LINUX BOOTLOADER AND ROM DEBUGGER
#
# i-data Networks
#
# Author: Thomas Horsten <thh@i-data.com>
#

ifndef Version
 Version = "$(USER)-test"
endif

MKLASATIMG = mklasatimg
MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
ifdef CONFIG_LASAT_SERVICE
MKLASATIMG_FLAG = -s
else
MKLASATIMG_FLAG = -k
endif

KERNEL_IMAGE = $(TOPDIR)/vmlinux
KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep _ftext | cut -f1 -d\ )
KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )

LDSCRIPT= -Tromscript.normal

HEAD_DEFINES = -D_kernel_start=0x$(KERNEL_START) \
		-D_kernel_entry=0x$(KERNEL_ENTRY) \
		-D VERSION="\"$(Version)\"" \
		-D TIMESTAMP=$(shell date +%s) 

head.o: head.S $(KERNEL_IMAGE)
	$(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<

OBJECTS= head.o kImage.o

rom.sw:	rom.bin
	$(MKLASATIMG) -o rom.sw $(MKLASATIMG_FLAG) rom.bin -m $(MKLASATIMG_ARCH)

rom.bin: rom
	$(OBJCOPY) -O binary -S rom rom.bin

# Rule to make the bootloader
rom:	$(OBJECTS)
	$(LD) $(LDFLAGS) $(LDSCRIPT) -o rom $(OBJECTS) 

%.o: %.gz
	$(LD) $(LDFLAGS) -r -o $@ -b binary $<

%.gz: %.bin
	gzip -cf -9 $< > $@

kImage.bin: $(KERNEL_IMAGE)
	$(OBJCOPY) -O binary -S $(TOPDIR)/vmlinux kImage.bin

clean:
	rm -f rom rom.bin rom.sw kImage.bin

USE_STANDARD_AS_RULE = 1
include $(TOPDIR)/Rules.make