summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile83
1 files changed, 83 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 000000000..8c36f9806
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,83 @@
+# $Id$
+
+CC= gcc
+CXX= g++
+
+CURDIR?= $(shell /bin/pwd)
+SRCDIR?= .
+TARGET?= alpha
+
+TEST_SRCDIR?= $(SRCDIR)
+ARCH_SRCDIR?= $(SRCDIR)/../arch/$(TARGET)
+BASE_SRCDIR?= $(SRCDIR)/../base
+SIM_SRCDIR?= $(SRCDIR)/../sim
+CACHE_SRCDIR?= $(SRCDIR)/../sim/cache
+OLD_SRCDIR= $(SRCDIR)/../old
+
+vpath % $(TEST_SRCDIR)
+vpath % $(BASE_SRCDIR)
+vpath % $(SIM_SRCDIR)
+vpath % $(CACHE_SRCDIR)
+vpath % $(OLD_SRCDIR)
+
+INCLDIRS= -I$(ARCH_SRCDIR) -I$(BASE_SRCDIR) -I$(SIM_SRCDIR) \
+ -I$(CACHE_SRCDIR) -I$(OLD_SRCDIR)
+CCFLAGS= -g -O0 -MMD -I. $(INCLDIRS) -I- -DTRACING_ON=0
+
+default:
+ @echo "You must specify a target"
+
+bitvectest: bitvectest.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+circletest: circletest.o circlebuf.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+cprintftest: cprintftest.o cprintf.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+initest: initest.o str.o inifile.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+lrutest: lru_test.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+nmtest: nmtest.o object_file.o symtab.o misc.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+offtest: offtest.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+rangetest: rangetest.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+stattest: statistics.o stattest.o cprintf.o misc.o omisc.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+strnumtest: strnumtest.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+symtest: misc.o symtest.o symtab.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+tokentest: tokentest.o str.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+tracetest: tracetest.o trace.o trace_flags.o cprintf.o str.o misc.o omisc.o
+ $(CXX) $(LFLAGS) -o $@ $^
+
+clean:
+ @rm -f *.o *.d *test *~ .#* *.core core
+.PHONY: clean
+
+# C++ Compilation
+%.o: %.cc
+ @echo '$(CXX) $(CCFLAGS) -c $(notdir $<) -o $@'
+ @$(CXX) $(CCFLAGS) -c $< -o $@
+
+# C Compilation
+%.o: %.c
+ @echo '$(CC) $(CCFLAGS) -c $(notdir $<) -o $@'
+ @$(CC) $(CCFLAGS) -c $< -o $@
+
+-include *.d