Line 11... |
Line 11... |
# make clean
|
# make clean
|
# make test
|
# make test
|
# Assembles a test file and then produces a disassembly of it.
|
# Assembles a test file and then produces a disassembly of it.
|
# make depends
|
# make depends
|
# Doesn't work. Dependencies are currently all hand coded.
|
# Doesn't work. Dependencies are currently all hand coded.
|
# make optest
|
|
# make tags
|
# make tags
|
|
# make install
|
|
# Attempts to copy zasm, zpp and zdump to the install directory,
|
|
# defined herein
|
#
|
#
|
#
|
#
|
# Creator: Dan Gisselquist, Ph.D.
|
# Creator: Dan Gisselquist, Ph.D.
|
# Gisselquist Technology, LLC
|
# Gisselquist Technology, LLC
|
#
|
#
|
Line 47... |
Line 49... |
LEX= flex
|
LEX= flex
|
YYMMDD=`date +%Y%m%d`
|
YYMMDD=`date +%Y%m%d`
|
DBGFLAGS= -g -O0
|
DBGFLAGS= -g -O0
|
OPTFLAGS= -O3
|
OPTFLAGS= -O3
|
CCFLAGS= $(DBGFLAGS)
|
CCFLAGS= $(DBGFLAGS)
|
PROGRAMS= zasm optest zdump zpp
|
PROGRAMS= zasm zdump zpp
|
|
INSTALLD= ../install/cross-tools/bin
|
|
|
.PHONY: programs
|
.PHONY: programs
|
all: $(OBJDIR)/ programs
|
all: $(OBJDIR)/ programs
|
|
|
|
install: zasm zdump zpp
|
|
cp $^ $(INSTALLD)/
|
|
|
programs: $(PROGRAMS)
|
programs: $(PROGRAMS)
|
|
|
$(OBJDIR)/zpp.cpp: zpp.l
|
$(OBJDIR)/zpp.cpp: zpp.l
|
$(LEX) -o $@ $^
|
$(LEX) -o $@ $^
|
$(OBJDIR)/zpp.o: $(OBJDIR)/zpp.cpp
|
$(OBJDIR)/zpp.o: $(OBJDIR)/zpp.cpp
|
Line 77... |
Line 83... |
$(CXX) -c -I. $(CCFLAGS) asmdata.cpp -o $@
|
$(CXX) -c -I. $(CCFLAGS) asmdata.cpp -o $@
|
zasm: $(OBJDIR)/zasm.lex.o $(OBJDIR)/zasm.tab.o $(OBJDIR)/asmdata.o
|
zasm: $(OBJDIR)/zasm.lex.o $(OBJDIR)/zasm.tab.o $(OBJDIR)/asmdata.o
|
zasm: $(OBJDIR)/zparser.o $(OBJDIR)/zopcodes.o $(OBJDIR)/twoc.o
|
zasm: $(OBJDIR)/zparser.o $(OBJDIR)/zopcodes.o $(OBJDIR)/twoc.o
|
$(CXX) -o $@ $(CCFLAGS) $^
|
$(CXX) -o $@ $(CCFLAGS) $^
|
|
|
optest: optest.cpp zopcodes.cpp twoc.cpp twoc.h zopcodes.h
|
|
$(CXX) $(CCFLAGS) optest.cpp zopcodes.cpp twoc.cpp -o optest
|
|
|
|
ZDMPSRC= zdump.cpp zopcodes.cpp twoc.cpp
|
ZDMPSRC= zdump.cpp zopcodes.cpp twoc.cpp
|
ZDMPOBJ= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(ZDMPSRC)))
|
ZDMPOBJ= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(ZDMPSRC)))
|
zdump: $(ZDMPOBJ)
|
zdump: $(ZDMPOBJ)
|
$(CXX) $(CCFLAGS) $(ZDMPOBJ) -o $@
|
$(CXX) $(CCFLAGS) $(ZDMPOBJ) -o $@
|
|
|