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

Subversion Repositories potato

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

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 58 skordal
        for i in $$(seq 0 63); do echo 00000013 >> sha256.coe; done
33 13 skordal
        $(HEXDUMP) -v -e '1/4 "%08x\n"' sha256.bin >> sha256.coe
34
        echo ";" >> sha256.coe
35
 
36
clean:
37
        -$(RM) $(OBJECTS)
38
        -$(RM) sha256.elf sha256.bin sha256.coe
39
 
40
# Object file rules:
41
 
42
gpio.o: gpio.c gpio.h ../platform.h
43
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
44
 
45
main.o: main.c gpio.h timer.h sha256.h ../platform.h ../potato.h
46
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
47
 
48
sha256.o: sha256.c sha256.h
49
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
50
 
51
start.o: ../start.S ../platform.h
52
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
53
 
54
timer.o: timer.c timer.h ../platform.h
55
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
56
 
57
uart.o: uart.c uart.h ../platform.h
58
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
59
 
60
utilities.o: utilities.c utilities.h
61
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
62
 

powered by: WebSVN 2.1.0

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