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

Subversion Repositories potato

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

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

powered by: WebSVN 2.1.0

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