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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [examples/] [elf2raw64/] [makefiles/] [makefile] - Rev 5

Compare with Previous | Blame | View Log

include util.mak

CC=gcc
CFLAGS= -c -g -O2
LDFLAGS=
LIBS=-lstdc++

SOURCES = \
        elfreader.cpp \
        main.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = elf2raw64
SRC_DIR = ../src
OBJ_DIR = obj
ELF_DIR = elf

.PHONY: $(EXECUTABLE)

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
        $(MKDIR) ./$(ELF_DIR)
        $(CC) $(LDFLAGS) $(addprefix $(OBJ_DIR)/,$(OBJECTS)) -o $(addprefix $(ELF_DIR)/,$@) -lstdc++

#.cpp.o:
%.o: $(SRC_DIR)/%.cpp
        $(MKDIR) ./$(OBJ_DIR)
        $(CC) $(CFLAGS) $< -o $(addprefix $(OBJ_DIR)/,$@)

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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