URL
https://opencores.org/ocsvn/s6soc/s6soc/trunk
Subversion Repositories s6soc
[/] [s6soc/] [trunk/] [bench/] [cpp/] [Makefile] - Rev 52
Go to most recent revision | Compare with Previous | Blame | View Log
################################################################################## Filename: Makefile## Project: Zip CPU -- a small, lightweight, RISC CPU soft core## Purpose: This makefile builds the final verilator simulation of the# zipsystem. Specifically, it builds the final C++ portion# of the simulator, and thus the final simulator executable.## This simulator depends upon the libelf library.## Creator: Dan Gisselquist, Ph.D.# Gisselquist Technology, LLC################################################################################### Copyright (C) 2015,2017, Gisselquist Technology, LLC## This program is free software (firmware): you can redistribute it and/or# modify it under the terms of the GNU General Public License as published# by the Free Software Foundation, either version 3 of the License, or (at# your option) any later version.## This program is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# for more details.## License: GPL, v3, as defined and found on www.gnu.org,# http://www.gnu.org/licenses/gpl.html###################################################################################all: zip_simCXX := g++CFLAGS := -Wall -Og -gOBJDIR := obj-pcSWHOST := ../../sw/hostRTLD := ../../rtlRTLOBJD := $(RTLD)/obj_dirVERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')VROOT := $(VERILATOR_ROOT)VINCS := -I$(VROOT)/include -I$(VROOT)/include/vltstdINCS := -I$(RTLOBJD) -I$(RTLD) -I$(VROOT)/include -I$(SWHOST) $(VINCS)SOURCES := zip_sim.cpp twoc.cpp qspiflashsim.cpp uartsim.cpp zipelf.cpp byteswap.cppVLSRCS := verilated.cpp verilated_vcd_c.cppVLOBJS := $(OBJDIR)/verilated.o $(OBJDIR)/verilated_vcd_c.oVLIB := $(addprefix $(VROOT)/include/,$(VLSRCS))RAWLIB := $(RTLOBJD)/Vbusmaster__ALL.aOBJECTS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES) $(VLSRCS)))LIBS := $(RAWLIB) -lelfTESTF := $(ZASM)/z.outDHRYSTONEF := ../asm/zipdhry.z$(OBJDIR)/%.o: %.cpp$(CXX) $(CFLAGS) $(INCS) -c $< -o $@$(OBJDIR)/%.o: $(VROOT)/include/%.cpp$(CXX) $(CFLAGS) $(INCS) -c $< -o $@zip_sim: $(OBJECTS)$(CXX) $(CFLAGS) $(INCS) $(OBJECTS) $(LIBS) -o $@define build-depends@echo "Building dependencies"@$(CXX) $(CFLAGS) $(INCS) -MM $(VLIB) $(SOURCES) > $(OBJDIR)/xdepends.txt@sed -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdepends.txt > $(OBJDIR)/depends.txt@rm $(OBJDIR)/xdepends.txtendeftags: $(VLIB) $(SOURCES)@ctags $(SOURCES) $(VLIB).PHONY: dependsdepends: tags $(OBJDIR)/$(build-depends)$(OBJDIR)/:@bash -c "if [ ! -e $(OBJDIR) ]; then mkdir -p $(OBJDIR)/; fi"$(OBJDIR)/depends.txt: $(OBJDIR)/ depends.PHONY: cleanclean:rm -rf $(OBJDIR)/rm -f ./zip_sim-include $(OBJDIR)/depends.txt
Go to most recent revision | Compare with Previous | Blame | View Log
