Makefile 2.81 KB
#!smake
#
#  This makefile has rules for making both the executables
#  which make up the simulator, and for running test cases.
#
#  This makefile should do a make in InData/ before making
#  any test in this directory.
#
# $Revision: 1.1.1.1 $
#
COMMONPREF=RDPSIM
PRDEPTH = ../../..

include $(PRDEPTH)/PRdefs
include $(ROOT)/usr/include/make/ismcommondefs


#
#  Tools
#

#
#  Directories
#
SIMLIB		= $(PRDEPTH)/rdpsim/simlib
SRC    		= $(PRDEPTH)/rdpsim/src
HDR    		= $(PRDEPTH)/rdpsim/hdr
WIR    		= Wir
INDATA 		= InData
OUTDATA		= OutData
SUBDIRS		= Wir InData OutData/at_all

#
#  Check for objects in this directory
#
VPATH		= $(SRC)

#
#  Verilog Sources
#
VSRCS  		=  

#
#  C Sources
#
TEST_FILES 	= \
        	$(SRC)/at.c \
		expand.c \
		driver.c \
        	at_test_0.c

#
#  Object Files
#
TEST_OBJ 	= ${TEST_FILES:.c=.o}
TEST_OBJS    	= ${TEST_OBJ:T}

#
#  Header file Directories
#
LCINCS 		= -DJUNK -g -I. \
	 	-I$(SIMLIB) \
	 	-I$(HDR)

GCINCS 		=
#
#  Linker Directories and Options
# 
LLDOPTS 	= -L. -L$(SIMLIB)
GLDOPTS 	=
LLDLIBS 	= -lsimlib
LNFLAGS 	= $(CFLAGS) 

#
#  Default Targets
#
TARGETS 	= at_test
LDIRT   	= at_test_0.c dump *.tab

default install: $(TARGETS)
	
$(COMMONTARGS): $(COMMONPREF)$$@
	$(SUBDIRS_MAKERULE)

#
#  SGI Common Rules
#
include $(PRDEPTH)/PRrules

#
#  Target for creating all .tab files
#
tab_files: $(_FORCE)
	cd InData; $(MAKE) tab_files

#
#  Target for creating .1 files, Viewlogic Netlists
#
net_lists:
	cd Wir; $(MAKE)

#
#  Target for running all tests and comparing to Verilog
#
all_tests: vtest000 vtest001 vtest002 vtest003 vtest004 vtest005

#
#  Compile 'C' processes
#
at_test_0.c: net_lists at_test.config $(XNET)
	$(XNET) -d $(WIR) at_test -c at_test.config

at_test: $(TEST_OBJS)
	$(HOST_CC) $(TEST_OBJS) $(LDFLAGS) -o $@


#
#  Test Targets
#

#
# test000  Check unsynced attributes
# test000  
#
test000: tab_files at_test 
	at_test -i 0 -o at_all -t 0

vtest000: test000
	cd OutData/at_all; $(MAKE) at_all000

#
# test001  Check left flag delay
# test001  
#
test001: tab_files at_test 
	at_test -i 1 -o at_all -t 1

vtest001: test001
	cd OutData/at_all; $(MAKE) at_all001

#
# test002  Check EW, ST attributes
# test002  
#
test002: tab_files at_test 
	at_test -i 2 -o at_all -t 2

vtest002: test002
	cd OutData/at_all; $(MAKE) at_all002

#
# test003  Check release sync pipe/tile commands
# test003  
#
test003: tab_files at_test 
	at_test -i 3 -o at_all -t 3

vtest003: test003
	cd OutData/at_all; $(MAKE) at_all003

#
# test004  Check prim color, prim depth and scissor commands
# test004  
#
test004: tab_files at_test 
	at_test -i 4 -o at_all -t 4

vtest004: test004
	cd OutData/at_all; $(MAKE) at_all004

#
# test005  Check tile, level, load, shift_coord signals
# test005  
#
test005: tab_files at_test 
	at_test -i 5 -o at_all -t 5

vtest005: test005
	cd OutData/at_all; $(MAKE) at_all005