URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [debugger/] [makefiles/] [make_simple_plugin] - Rev 5
Go to most recent revision | 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 -pthread
LDFLAGS=-shared -pthread -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/simple_plugin
VPATH = $(SRC_PATH)
SOURCES = \
attribute \
autobuffer \
simple_plugin
LIBS = \
m \
stdc++ \
dbg64g
SRC_FILES = $(addsuffix .cpp,$(SOURCES))
OBJ_FILES = $(addprefix $(PLUGINS_OBJ_DIR)/,$(addsuffix .o,$(SOURCES)))
EXECUTABLE = $(addprefix $(PLUGINS_ELF_DIR)/,simple_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 $@
Go to most recent revision | Compare with Previous | Blame | View Log