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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [Makefile] - Diff between revs 18 and 30

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 18 Rev 30
Line 35... Line 35...
##
##
################################################################################
################################################################################
##
##
##
##
.PHONY: all
.PHONY: all
PROGRAMS := wbregs netuart wbsettime dumpflash wbprogram eqspiscope
PROGRAMS := wbregs netuart wbsettime dumpflash wbprogram netsetup manping zipload zipstate zipdbg
all: $(PROGRAMS)
SCOPES := eqspiscope etxscope erxscope cpuscope
 
all: $(PROGRAMS) $(SCOPES)
CXX := g++
CXX := g++
OBJDIR := obj-pc
OBJDIR := obj-pc
BUSOBJS := $(OBJDIR)/ttybus.o $(OBJDIR)/llcomms.o $(OBJDIR)/regdefs.o
BUSOBJS := $(OBJDIR)/ttybus.o $(OBJDIR)/llcomms.o $(OBJDIR)/regdefs.o
SOURCES := wbregs.cpp wbprogram.cpp netuart.cpp wbsettime.cpp   \
SOURCES := wbregs.cpp wbprogram.cpp netuart.cpp wbsettime.cpp   \
        ttybus.cpp llcomms.cpp dumpflash.cpp eqspiscope.cpp flashdrvr.cpp \
        ttybus.cpp llcomms.cpp dumpflash.cpp eqspiscope.cpp flashdrvr.cpp \
        portbus.cpp regdefs.cpp scopecls.cpp sdramscope.cpp ttybus.cpp  \
        regdefs.cpp scopecls.cpp sdramscope.cpp ttybus.cpp              \
        cfgscope.cpp
        cfgscope.cpp zipload.cpp zipstate.cpp zipdbg.cpp                \
        # ziprun.cpp zipload.cpp
        erxscope.cpp etxscope.cpp netsetup.cpp cpuscope.cpp             \
 
         mdioscope.cpp manping.cpp
 
        # ziprun.cpp
HEADERS := llcomms.h ttybus.h devbus.h
HEADERS := llcomms.h ttybus.h devbus.h
OBJECTS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
OBJECTS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
 
ZIPD := ../../../../../zipcpu/trunk/sw/zasm
 
 
%.o: $(OBJDIR)/%.o
%.o: $(OBJDIR)/%.o
$(OBJDIR)/%.o: %.cpp
$(OBJDIR)/%.o: %.cpp
        $(CXX) -g -c $< -o $@
        $(CXX) -g -c $< -o $@
 
 
Line 71... Line 75...
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
wbsettime: $(OBJDIR)/wbsettime.o $(BUSOBJS)
wbsettime: $(OBJDIR)/wbsettime.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
mtest: $(OBJDIR)/mtest.o $(BUSOBJS)
mtest: $(OBJDIR)/mtest.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
 
manping: $(OBJDIR)/manping.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
wbregs: $(OBJDIR)/wbregs.o $(BUSOBJS)
wbregs: $(OBJDIR)/wbregs.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
 
zipstate: $(OBJDIR)/zipstate.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
 
netsetup: $(OBJDIR)/netsetup.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
dumpflash: $(OBJDIR)/dumpflash.o $(BUSOBJS)
dumpflash: $(OBJDIR)/dumpflash.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
eqspiscope: $(OBJDIR)/eqspiscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
eqspiscope: $(OBJDIR)/eqspiscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
sdramscope: $(OBJDIR)/sdramscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
sdramscope: $(OBJDIR)/sdramscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
 
wbprogram: $(OBJDIR)/wbprogram.o $(OBJDIR)/flashdrvr.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
 
zipload: $(OBJDIR)/zipload.o $(OBJDIR)/flashdrvr.o $(BUSOBJS)
 
        $(CXX) -g $^ -lelf -o $@
 
 
 
 
 
## SCOPES
cfgscope: $(OBJDIR)/cfgscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
cfgscope: $(OBJDIR)/cfgscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
wbprogram: $(OBJDIR)/wbprogram.o $(OBJDIR)/flashdrvr.o $(BUSOBJS)
cpuscope: $(OBJDIR)/cpuscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
 
erxscope: $(OBJDIR)/erxscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
 
etxscope: $(OBJDIR)/etxscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
 
        $(CXX) -g $^ -o $@
 
mdioscope: $(OBJDIR)/mdioscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
        $(CXX) -g $^ -o $@
        $(CXX) -g $^ -o $@
# ziprun: $(OBJDIR)/ziprun.o $(OBJDIR)/flashdrvr.o $(BUSOBJS)
wbuscope: $(OBJDIR)/wbuscope.o $(OBJDIR)/scopecls.o $(BUSOBJS)
#       $(CXX) -g $^ -lelf -o $@
        $(CXX) -g $^ -o $@
# zipdbg: zipdbg.cpp $(ZIPD)/zparser.cpp $(ZIPD)/zopcodes.cpp $(ZIPD)/twoc.cpp $(BUSOBJS)
 
#       $(CXX) -g -I../bench/cpp -I $(ZIPD)/ $^ -lncurses -o $@
DBGRAW  := zparser.cpp zopcodes.cpp twoc.cpp
# zipstate: zipstate.cpp $(BUSOBJS)
DBGSRCS := $(addprefix $(ZIPD)/,$(DBGRAW))
        # $(CXX) -g $^ -o $@
DBGOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(DBGRAW)))
 
$(OBJDIR)/zipdbg.o: zipdbg.cpp
 
        $(CXX) -g -I$(ZIPD) -c $< -o $@
 
$(OBJDIR)/zparser.o: $(ZIPD)/zparser.cpp
 
        $(CXX) -g -I$(ZIPD) -c $< -o $@
 
$(OBJDIR)/zopcodes.o: $(ZIPD)/zopcodes.cpp
 
        $(CXX) -g -I$(ZIPD) -c $< -o $@
 
$(OBJDIR)/twoc.o: $(ZIPD)/twoc.cpp
 
        $(CXX) -g -I$(ZIPD) -c $< -o $@
 
zipdbg: $(OBJDIR)/zipdbg.o $(BUSOBJS) $(DBGOBJS)
 
        $(CXX) -g -I$(ZIPD) $^ -lcurses -o $@
 
 
define  build-depends
define  build-depends
        @echo "Building dependency file(s)"
        @echo "Building dependency file(s)"
        @$(CXX) $(CPPFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdepends.txt
        $(CXX) $(CPPFLAGS) -I$(ZIPD) -MM $(SOURCES) > $(OBJDIR)/xdepends.txt
        @sed -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdepends.txt > $(OBJDIR)/depends.txt
        @sed -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdepends.txt > $(OBJDIR)/depends.txt
        @rm $(OBJDIR)/xdepends.txt
        @rm $(OBJDIR)/xdepends.txt
endef
endef
 
 
tags: $(SOURCES) $(HEADERS)
tags: $(SOURCES) $(HEADERS)

powered by: WebSVN 2.1.0

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