1# ;;; -*- Mode:makefile;-*- 
2# Generated automatically from Makefile.in by configure.
3# This requires GNU make.
4
5srcdir = .
6VPATH = .
7
8# point this to proper location
9STL_INCL=-I../../stlport
10
11AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp
12
13TEST_LIST=test_algo.cpp  \
14test_algobase.cpp     test_list.cpp test_slist.cpp \
15test_bit_vector.cpp   test_vector.cpp \
16test_deque.cpp test_set.cpp test_map.cpp \
17test_hash_map.cpp  test_hash_set.cpp test_rope.cpp \
18test_string.cpp test_bitset.cpp test_valarray.cpp
19
20LIST=${AUX_LIST} ${TEST_LIST}
21
22OBJECTS = $(LIST:%.cpp=obj/%.o) $(STAT_MODULE)
23D_OBJECTS = $(LIST:%.cpp=d_obj/%.o) $(STAT_MODULE)
24NOSGI_OBJECTS = $(LIST:%.cpp=nosgi_obj/%.o) $(STAT_MODULE)
25
26EXECS = $(LIST:%.cpp=%)
27TESTS = $(LIST:%.cpp=%.out)
28TEST_EXE  = ./eh_test
29D_TEST_EXE = ./eh_test_d
30NOSGI_TEST_EXE = ./eh_test_nosgi
31
32TEST  = ./eh_test.out
33D_TEST = ./eh_test_d.out
34NOSGI_TEST = ./eh_test_nosgi.out
35
36CC = gcc
37CXX = $(CC)
38
39# dwa 12/22/99 -- had to turn off -ansi flag so we could use SGI IOSTREAMS
40# also, test_slist won't compile with -O3/-O2 when targeting PPC. It fails 
41# in the assembler with 'invalid relocation type'
42CXXFLAGS = -Wall -ftemplate-depth-32 -mbnu210 -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW -D_STLP_NO_SGI_IOSTREAMS
43D_CXXFLAGS = -Wall -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW -D_STLP_DEBUG -D_STLP_USE_STATIC_LIB
44NOSGI_CXXFLAGS = -Wall -g -O2 ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -D_STLP_NO_SGI_IOSTREAMS -D_STLP_DEBUG_UNINITIALIZED -DEH_VECTOR_OPERATOR_NEW
45
46check: $(TEST)
47
48LIBS = -lstdcxx -lm 
49D_LIBSTLPORT = ../../lib/libstlport_djgpp_debug_static.a
50LIBSTLPORT = ../../lib/libstlport_djgpp_stldebug_static.a
51
52all: $(TEST_EXE) $(D_TEST_EXE) $(NOSGI_TEST_EXE)
53
54check_nosgi: $(NOSGI_TEST)
55check_d: $(D_TEST)
56
57
58OBJDIR=obj
59D_OBJDIR=d_obj
60NOSGI_OBJDIR=nosgi_obj
61
62$(OBJDIR):
63	mkdir obj
64$(D_OBJDIR):
65	mkdir d_obj
66$(NOSGI_OBJDIR):
67	mkdir nosgi_obj
68
69$(TEST_EXE) : $(OBJDIR) $(OBJECTS)
70	$(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBSTLPORT) $(LIBS) -o $(TEST_EXE)
71
72$(D_TEST_EXE) : $(D_OBJDIR) $(D_OBJECTS)
73	$(CXX) $(D_CXXFLAGS) $(D_OBJECTS) $(D_LIBSTLPORT) $(LIBS) -o $(D_TEST_EXE)
74
75$(NOSGI_TEST_EXE) : $(NOSGI_OBJDIR) $(NOSGI_OBJECTS)
76	$(CXX) $(NOSGI_CXXFLAGS) $(NOSGI_OBJECTS) $(LIBS) -o $(NOSGI_TEST_EXE)
77
78
79$(TEST) : $(TEST_EXE)
80	$(TEST_EXE)
81
82$(D_TEST) : $(D_TEST_EXE)
83	$(D_TEST_EXE)
84
85$(NOSGI_TEST) : $(NOSGI_TEST_EXE)
86	$(NOSGI_TEST_EXE)
87
88SUFFIXES: .cpp.o.exe.out.res
89
90nosgi_obj/%.o : %.cpp
91	$(CXX) $(NOSGI_CXXFLAGS) $< -c -o $@
92
93d_obj/%.o : %.cpp
94	$(CXX) $(D_CXXFLAGS) $< -c -o $@
95
96obj/%.o : %.cpp
97	$(CXX) $(CXXFLAGS) $< -c -o $@
98
99nosgi_obj/%.i : %.cpp
100	$(CXX) $(NOSGI_CXXFLAGS) $< -E -H > $@
101
102d_obj/%.i : %.cpp
103	$(CXX) $(D_CXXFLAGS) $< -E -H > $@
104
105obj/%.i : %.cpp
106	$(CXX) $(CXXFLAGS) $< -E -H > $@
107
108%.out: %.cpp
109	$(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -g -o $*.o
110	$(CXX) $(CXXFLAGS) $*.o $(LIBS) -o $*
111	./$* > $@
112	-rm -f $*
113
114%.s: %.cpp
115	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
116
117%.E: %.cpp
118	$(CXX) $(CXXFLAGS) -E $<  -o $@
119
120clean:
121	-rm -fr ${TEST_EXE} *.o */*.o *.rpo *.obj *.out core *~ Templates.DB
122