diff -up teal-1_40b/test/Makefile.test teal-1_40b/test/Makefile --- teal-1_40b/test/Makefile.test 2006-05-24 17:44:11.000000000 +0530 +++ teal-1_40b/test/Makefile 2010-07-06 16:48:10.310333877 +0530 @@ -11,8 +11,13 @@ #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. +ARCH=Linux -include ../Makefile.$(ARCH) +ifndef $(LIBDIR) + LIBDIR=.. +endif + +include $(LIBDIR)/Makefile.$(ARCH) SRC = . OBJ = . LIB = . @@ -144,7 +149,7 @@ endif .cpp.o: $(SYS_ARCH_CC) -c $(ARCH_RELOCATE_OPT) $(SRC)/$*.cpp -o $(OBJ)/$@ $(CFLAGS) $(SP) $(TEST).so: $(TEST).o - $(SYS_ARCH_CC) $(ARCH_RELOCATE_OPT) $(TEST).o -o $@ $(CFLAGS) $(SP) -L..-L/usr/local/lib ../libteal.a -lstdc++ -lpthread -shared + $(SYS_ARCH_CC) $(ARCH_RELOCATE_OPT) $(TEST).o -o $@ $(CFLAGS) $(SP) -L..-L/usr/lib $(LIBDIR)/libteal.$(SIM).so -lstdc++ -lpthread -shared $(TEST).$(SIM).so: $(TEST).o ../libteal.$(SIM).a @@ -155,7 +160,7 @@ ifeq ($(SIM),mti_2_0) $(SYS_ARCH_CC) $(ARCH_RELOCATE_OPT) $(TEST).o -o $@ $(SP) -L.. -L/usr/local/lib ../libteal.$(SIM).a -lstdc++ -lpthread -shared $(CFLAGS) endif ifeq ($(SIM),ivl) - $(SYS_ARCH_CC) $(ARCH_RELOCATE_OPT) $(TEST).o -o $@ $(CFLAGS) $(SP) -L.. -L/usr/local/lib ../libteal.$(SIM).a -lstdc++ -lpthread -shared -lveriuser -lvpi + $(SYS_ARCH_CC) $(ARCH_RELOCATE_OPT) $(TEST).o -o $@ $(CFLAGS) $(SP) -L.. -lteal.$(SIM) -Wl,-rpath,.. -L/usr/lib -lstdc++ -lpthread -shared -lveriuser -lvpi iverilog -m./$@ -o $(TEST) -s top $(TEST).v endif ifeq ($(SIM),ncsim) @@ -182,6 +187,14 @@ endif ################# Target section +TESTS = dictionary_test memory_test reg_test semaphore_test synch_test \ + vout_test vrandom_test vreg_test + +ivl_check: + for i in $(TESTS); do \ + ARCH=Linux SIMULATOR_HOME=/usr ./run -c -ivl -t $$i; \ + done + automatic: clean test clean test: setup compile_cpp compile elaborate simulate verify