OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [baget/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#
2
# Makefile for the Baget specific kernel interface routines
3
# under Linux.
4
#
5
# Note! Dependencies are done automagically by 'make dep', which also
6
# removes any old dependencies. DON'T put your own dependencies here
7
# unless it's something special (ie not a .c file).
8
#
9
# Note 2! The CFLAGS definitions are now in the main makefile...
10
 
11
all: baget.a
12
 
13
O_TARGET := baget.a
14
 
15
export-objs             := vacrtc.o
16
obj-y                   := baget.o print.o setup.o time.o irq.o bagetIRQ.o \
17
                           reset.o
18
obj-$(CONFIG_VAC_RTC)   += vacrtc.o
19
 
20
bagetIRQ.o : bagetIRQ.S
21
        $(CC) $(CFLAGS) -c -o $@ $<
22
 
23
 
24
##################### Baget Loader stuff ########################
25
 
26
image: ../../../vmlinux
27
        cp -f $< $@
28
 
29
image.bin: image
30
        $(OBJCOPY) -O binary $< $@
31
 
32
ramdisk.bin:
33
        echo "Dummy ramdisk used. Provide your own if needed !" > $@
34
 
35
dummy.c:
36
        touch $@
37
 
38
dummy.o: dummy.c image.bin ramdisk.bin
39
        $(CC) $(CFLAGS) -c -o $@ $<
40
        $(OBJCOPY) --add-section=.vmlinux=image.bin \
41
                   --add-section=.ramdisk=ramdisk.bin   $@
42
 
43
balo.h: image
44
        $(NM) $< | awk ' \
45
        BEGIN               { printf "/* DO NOT EDIT THIS FILE */\n" }    \
46
        /_ftext/            { printf "#define LOADADDR 0x%s\n", $$1     } \
47
        /kernel_entry/      { printf "#define START 0x%s\n", $$1 }        \
48
        /balo_ramdisk_base/ { printf "#define RAMDISK_BASE 0x%s\n", $$1 } \
49
        /balo_ramdisk_size/ { printf "#define RAMDISK_SIZE 0x%s\n", $$1 } \
50
                       ' > $@
51
balo.o:   balo.c balo.h
52
        $(CC) $(CFLAGS) -c $<
53
 
54
balo_supp.o: balo_supp.S
55
        $(CC) $(CFLAGS) -c $<
56
 
57
balo:   balo.o dummy.o balo_supp.o print.o
58
        $(LD) $(LDFLAGS) -T ld.script.balo -o $@ $^
59
 
60
clean:
61
        rm -f balo balo.h dummy.c image image.bin
62
 
63
include $(TOPDIR)/Rules.make

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.