Line 1... |
Line 1... |
all:
|
all:
|
PROGRAMS := wbregs
|
PROGRAMS := wbregs readflash zipload
|
all: $(PROGRAMS)
|
all: $(PROGRAMS)
|
|
|
CXX := g++
|
CXX := g++
|
OBJDIR := obj-pc
|
OBJDIR := obj-pc
|
BUSSRCS:= deppbus.cpp regdefs.cpp
|
# BUSSRCS:= deppbus.cpp regdefs.cpp
|
SOURCES:= wbregs.cpp # flashload.cpp/ziprun.cpp
|
BUSSRCS:= deppi.cpp regdefs.cpp llcomms.cpp ttybus.cpp
|
|
SOURCES:= wbregs.cpp readflash.cpp zipload.cpp flashdrvr.cpp # flashload.cpp/ziprun.cpp
|
ADEPT := ../../../refs/digilent.adept.sdk_2.3.1
|
ADEPT := ../../../refs/digilent.adept.sdk_2.3.1
|
HEADERS:= deppbus.h devbus.h flashdrvr.h regdefs.h twoc.h
|
HEADERS:= deppbus.h devbus.h flashdrvr.h regdefs.h twoc.h
|
OBJECTS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
|
OBJECTS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
|
BUSOBJS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(BUSSRCS)))
|
BUSOBJS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(BUSSRCS)))
|
CFLAGS := -g -Wall -I$(ADEPT)/inc -I.
|
CFLAGS := -g -Wall -I$(ADEPT)/inc -I.
|
Line 22... |
Line 23... |
rm -rf $(OBJDIR)/ $(PROGRAMS)
|
rm -rf $(OBJDIR)/ $(PROGRAMS)
|
|
|
wbregs: $(OBJDIR)/wbregs.o $(BUSOBJS)
|
wbregs: $(OBJDIR)/wbregs.o $(BUSOBJS)
|
$(CXX) $(CFLAGS) $^ $(LIBS) -o $@
|
$(CXX) $(CFLAGS) $^ $(LIBS) -o $@
|
|
|
|
readflash: $(OBJDIR)/readflash.o $(BUSOBJS)
|
|
$(CXX) $(CFLAGS) $^ $(LIBS) -o $@
|
|
|
|
zipload: $(OBJDIR)/zipload.o $(OBJDIR)/flashdrvr.o $(BUSOBJS)
|
|
$(CXX) $(CFLAGS) $^ $(LIBS) -lelf -o $@
|
|
|
define build-depends
|
define build-depends
|
@echo "Building dependency file(s)"
|
@echo "Building dependency file(s)"
|
@$(CXX) $(CFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdepends.txt
|
@$(CXX) $(CFLAGS) -MM $(SOURCES) $(BUSSRCS) > $(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)
|