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

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [sha256/] [Makefile] - Blame information for rev 48

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 skordal
# The Potato Processor Benchmark Applications
2
# (c) Kristian Klomsten Skordal 2015 
3 15 skordal
# Report bugs and issues on 
4 13 skordal
 
5
.PHONY: all clean
6
 
7
TARGET_PREFIX ?= riscv64-unknown-elf
8
TARGET_CC := $(TARGET_PREFIX)-gcc
9
TARGET_LD := $(TARGET_PREFIX)-ld
10
TARGET_SIZE := $(TARGET_PREFIX)-size
11
TARGET_OBJCOPY := $(TARGET_PREFIX)-objcopy
12
HEXDUMP ?= hexdump
13
 
14 20 skordal
TARGET_CFLAGS += -m32 -march=RV32I -Wall -Os -fomit-frame-pointer \
15
        -ffreestanding -fno-builtin -I.. -std=gnu99
16 13 skordal
TARGET_LDFLAGS += -m elf32lriscv -T../benchmark.ld
17
 
18
OBJECTS := gpio.o main.o sha256.o start.o timer.o uart.o utilities.o
19
 
20
all: sha256.coe
21
 
22
sha256.elf: $(OBJECTS)
23
        $(TARGET_LD) -o sha256.elf $(TARGET_LDFLAGS) $(OBJECTS)
24
        $(TARGET_SIZE) sha256.elf
25
 
26
sha256.bin: sha256.elf
27
        $(TARGET_OBJCOPY) -j .text -j .data -O binary sha256.elf sha256.bin
28
 
29
sha256.coe: sha256.bin
30
        echo "memory_initialization_radix=16;" > sha256.coe
31
        echo "memory_initialization_vector=" >> sha256.coe
32
        $(HEXDUMP) -v -e '1/4 "%08x\n"' sha256.bin >> sha256.coe
33
        echo ";" >> sha256.coe
34
 
35
clean:
36
        -$(RM) $(OBJECTS)
37
        -$(RM) sha256.elf sha256.bin sha256.coe
38
 
39
# Object file rules:
40
 
41
gpio.o: gpio.c gpio.h ../platform.h
42
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
43
 
44
main.o: main.c gpio.h timer.h sha256.h ../platform.h ../potato.h
45
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
46
 
47
sha256.o: sha256.c sha256.h
48
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
49
 
50
start.o: ../start.S ../platform.h
51
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
52
 
53
timer.o: timer.c timer.h ../platform.h
54
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
55
 
56
uart.o: uart.c uart.h ../platform.h
57
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
58
 
59
utilities.o: utilities.c utilities.h
60
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
61
 

powered by: WebSVN 2.1.0

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