URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [debugger/] [makefiles/] [make_socsim_plugin] - Rev 4
Compare with Previous | Blame | View Log
###
## @file
## @copyright Copyright 2016 GNSS Sensor Ltd. All right reserved.
## @author Sergey Khabarov - sergeykhbr@gmail.com
##
include util.mak
CC=gcc
CPP=gcc
CFLAGS=-g -c -Wall -Werror -fPIC
LDFLAGS=-shared -L$(PLUGINS_ELF_DIR)/..
INCL_KEY=-I
DIR_KEY=-B
# include sub-folders list
INCL_PATH= \
$(TOP_DIR)src/common
# source files directories list:
SRC_PATH =\
$(TOP_DIR)src/common \
$(TOP_DIR)src/common/debug \
$(TOP_DIR)src/socsim_plugin
VPATH = $(SRC_PATH)
SOURCES = \
attribute \
autobuffer \
boardsim \
gnss_stub \
irqctrl \
gpio \
uart \
pnp \
dsu \
greth \
gptimers \
fsev2 \
rfctrl \
uartmst \
hardreset \
plugin_init
LIBS = \
m \
stdc++ \
dbg64g
SRC_FILES = $(addsuffix .cpp,$(SOURCES))
OBJ_FILES = $(addprefix $(PLUGINS_OBJ_DIR)/,$(addsuffix .o,$(SOURCES)))
EXECUTABLE = $(addprefix $(PLUGINS_ELF_DIR)/,socsim_plugin.so)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJ_FILES)
echo $(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@
$(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@ $(addprefix -l,$(LIBS))
$(ECHO) "\n Plugin '"$@"' has been built successfully.\n"
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.cpp
echo $(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.c
echo $(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@