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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [gps4020/] [current/] [support/] [download/] [Makefile] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#########################################################################
2
#                                                                       #
3
#           Template Makefile for Assembly Language Programs            #
4
#                                                                       #
5
#########################################################################
6
 
7
# Author:   John Zaitseff , Modified by
8
#           Andrew Greenberg (andrew@uad.com)
9
# Date:     18th August, 2003
10
# Version:  1.0
11
 
12
# Please note that every line that is indented (or, in the language of
13
# Makefiles, the command part of the rules) is done so with TAB
14
# characters, NOT with spaces.  This is important and a subtle trap for
15
# the unwary!
16
 
17
ALL = gps4020_download
18
all: $(ALL)
19
 
20
GPS4020_DOWNLOAD_FILES = gps4020_start.o gps4020_download.o tty.o
21
gps4020_download: $(GPS4020_DOWNLOAD_FILES)
22
        $(CC) $(LDFLAGS) -Tarm.ld -o $@ $(GPS4020_DOWNLOAD_FILES)
23
        $(OC) $(OCFLAGS) $@ $@.bin
24
        $(SIZE) $@
25
 
26
clean:
27
        rm -f $(ALL) *.o *~
28
 
29
# The following variables and implicit rules are required for the GNU
30
# Assembler for ARM.  You probably do not need to modify anything here.
31
 
32
AS        = arm-elf-as
33
SIZE      = arm-elf-size
34
LD        = arm-elf-ld
35
CC        = arm-elf-gcc
36
OC        = arm-elf-objcopy
37
 
38
# ADG: we don't need debugging info: removed "ASFLAGS   = --gdwarf2"
39
ASFLAGS   =
40
LDFLAGS   = -nostdlib -Wl,-static -Wl,-Map,$@.map
41
OCFLAGS   = --output-target binary
42
LOADLIBES =
43
LDLIBS    =
44
CFLAGS    = -O2 -msoft-float
45
 
46
.SUFFIXES:
47
 
48
# Assemble ARM assembly language source (.s) to an object file (.o) using as.
49
# eg: "arm-elf-as -marm7tdmi gps4020_download.s -o gps4020_download.o"
50
 
51
%.o: %.s
52
        $(AS) -marm7tdmi $(ASFLAGS) $< -o $@
53
 
54
%.o: %.S
55
        $(CC) -c -marm7tdmi $(ASFLAGS) $< -o $@
56
 
57
# Link object file (.0) into an ARM executable (.elf), using ld.
58
# eg: "arm-elf-ld -o gps4020_download.o gps4020_download.elf"
59
 
60
%.elf: %.o
61
        $(LD) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -o $@
62
 
63
# "Copy" ELF file (.elf) into a binary file for execution using objcopy.
64
# eg: "arm-elf-objcopy --output-target binary gps4020_download.elf gps4020_download.bin"
65
 
66
%.bin: %.elf
67
        $(OC) $(OCFLAGS) $< $@
68
 
69
# Compile "C" code
70
%.o: %.c
71
        $(CC) $(CFLAGS) -c -o $@ $<
72
 
73
# Miscellaneous rules
74
 
75
.PHONY: all clean
76
.DEFAULT:
77
.SUFFIXES:

powered by: WebSVN 2.1.0

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