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

Subversion Repositories potato

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

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 61 skordal
        -ffreestanding -fno-builtin -I.. -std=gnu99 \
16
        -Wall -Werror=implicit-function-declaration
17 13 skordal
TARGET_LDFLAGS += -m elf32lriscv -T../benchmark.ld
18
 
19 61 skordal
OBJECTS := gpio.o main.o seg7.o sha256.o start.o timer.o uart.o utilities.o
20 13 skordal
 
21
all: sha256.coe
22
 
23
sha256.elf: $(OBJECTS)
24
        $(TARGET_LD) -o sha256.elf $(TARGET_LDFLAGS) $(OBJECTS)
25
        $(TARGET_SIZE) sha256.elf
26
 
27
sha256.bin: sha256.elf
28
        $(TARGET_OBJCOPY) -j .text -j .data -O binary sha256.elf sha256.bin
29
 
30
sha256.coe: sha256.bin
31
        echo "memory_initialization_radix=16;" > sha256.coe
32
        echo "memory_initialization_vector=" >> sha256.coe
33 58 skordal
        for i in $$(seq 0 63); do echo 00000013 >> sha256.coe; done
34 13 skordal
        $(HEXDUMP) -v -e '1/4 "%08x\n"' sha256.bin >> sha256.coe
35
        echo ";" >> sha256.coe
36
 
37
clean:
38
        -$(RM) $(OBJECTS)
39
        -$(RM) sha256.elf sha256.bin sha256.coe
40
 
41
# Object file rules:
42
 
43
gpio.o: gpio.c gpio.h ../platform.h
44
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
45
 
46 61 skordal
main.o: main.c gpio.h timer.h seg7.h sha256.h ../platform.h ../potato.h
47 13 skordal
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
48
 
49 61 skordal
seg7.o: seg7.c seg7.h ../platform.h
50
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
51
 
52 13 skordal
sha256.o: sha256.c sha256.h
53
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
54
 
55
start.o: ../start.S ../platform.h
56
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
57
 
58
timer.o: timer.c timer.h ../platform.h
59
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
60
 
61
uart.o: uart.c uart.h ../platform.h
62
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
63
 
64
utilities.o: utilities.c utilities.h
65
        $(TARGET_CC) -c -o $@ $(TARGET_CFLAGS) $<
66
 

powered by: WebSVN 2.1.0

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