#
# makefile for the c30 simulator library which is part of the
# freely distributable C30 simulator package
#
# Copyright (c) 1996-1998 The University of Texas
# All Rights Reserved.
# 
# Authors: Chi Duong, Brian Evans, and Chris Moy
# Version: @(#)make.template	1.23	01/19/98
# 
# Department of Electrical and Computer Engineering
# The University of Texas, Austin, TX 78712-1084

# Root of Ptolemy directory
ROOT=../..
# Where we are
VPATH = ../../src/libc30sim
# get configuration info
CONFIG=$(ROOT)/mk/config-$(PTARCH).mk
include $(CONFIG)

# Turn on the simulator flag
USERFLAGS = -DUTSIM3X

# Library name
# Build a non-shared libptolemy.a for faster startup time
# It would be nice if we built both
LIBNONSHARED=libc30sim.a

# Put the libc30asm directory in the include path
INCL = -I$(ROOT)/src/libc30asm -I$(ROOT)/src/libc30sim

# Source files owned by Texas Instruments 
TISRCS = dasmc40.cc

TIHDRS =

# Source files owned by the University of Texas
UTSRCS = \
cycle.cc \
execute.cc \
fetch.cc \
loadc30.cc \
memmap.cc \
simmisc.cc \
simulator.cc \
state.cc

UTHDRS = \
cycle.h \
execute.h \
fetch.h \
loadc30.h \
memmap.h \
pipeline.h \
sim3x.h \
simmisc.h \
simulator.h \
state.h

# The complete list of .cc files used in the library
SRCS = \
$(TISRCS) \
$(UTSRCS)

# Header files.
HDRS = \
$(TIHDRS) \
$(UTHDRS)

# Library objects
OBJS = $(SRCS:.cc=.o)

EXTRA_SRCS = README

all:	makefile $(LIBNONSHARED)

# "make install" puts things in the official place
install:	makefile $(LIBDIR)/$(LIBNONSHARED)

# Include common make definitions
include $(ROOT)/mk/common.mk

# Don't add anything after the next line; makedepend will zap it.
# DO NOT DELETE THIS LINE -- make depend depends on it.

dasmc40.o: dasmc40.cc opcodes.h typedefs.h assm_fun.h errormsg.h \
 sim3x.h state.h pipeline.h execute.h tmsfloat.h \
 ../../src/libc30asm/symbols.h ../../src/libc30asm/typedefs.h \
 ../../src/libc30asm/errormsg.h dsk.h
cycle.o: cycle.cc state.h pipeline.h memmap.h cycle.h fetch.h \
 assm_fun.h typedefs.h errormsg.h execute.h opcodes.h sim3x.h
execute.o: execute.cc state.h pipeline.h execute.h tmsfloat.h \
 typedefs.h memmap.h simmisc.h
fetch.o: fetch.cc pipeline.h state.h memmap.h
loadc30.o: loadc30.cc pipeline.h state.h memmap.h simmisc.h \
 simulator.h assm_fun.h typedefs.h errormsg.h
memmap.o: memmap.cc state.h pipeline.h memmap.h
simmisc.o: simmisc.cc pipeline.h state.h simmisc.h memmap.h execute.h \
 assm_fun.h typedefs.h errormsg.h
simulator.o: simulator.cc ../../src/libc30asm/asupport.h \
 ../../src/libc30asm/errormsg.h dsk.h typedefs.h errormsg.h state.h \
 pipeline.h memmap.h cycle.h simmisc.h loadc30.h sim3x.h execute.h \
 simulator.h assm_fun.h
state.o: state.cc state.h
