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