1 # ;;; -*- Mode:makefile;-*- 2 # Generated automatically from Makefile.in by configure. 3 # This requires GNU make. 4 5 srcdir = . 6 VPATH = . 7 8 # point this to proper location 9 STL_INCL=-I../../stlport 10 11 AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp 12 13 TEST_LIST=test_algo.cpp \ 14 test_algobase.cpp test_list.cpp test_slist.cpp \ 15 test_bit_vector.cpp test_vector.cpp \ 16 test_deque.cpp test_set.cpp test_map.cpp \ 17 test_hash_map.cpp test_hash_set.cpp test_rope.cpp \ 18 test_string.cpp test_bitset.cpp test_valarray.cpp 19 20 LIST=${AUX_LIST} ${TEST_LIST} 21 22 OBJECTS = $(LIST:%.cpp=obj/%.o) $(STAT_MODULE) 23 D_OBJECTS = $(LIST:%.cpp=d_obj/%.o) $(STAT_MODULE) 24 NOSGI_OBJECTS = $(LIST:%.cpp=nosgi_obj/%.o) $(STAT_MODULE) 25 26 EXECS = $(LIST:%.cpp=%) 27 TESTS = $(LIST:%.cpp=%.out) 28 TEST_EXE = ./eh_test 29 D_TEST_EXE = ./eh_test_d 30 NOSGI_TEST_EXE = ./eh_test_nosgi 31 32 TEST = ./eh_test.out 33 D_TEST = ./eh_test_d.out 34 NOSGI_TEST = ./eh_test_nosgi.out 35 36 CC = aCC 37 CXX = $(CC) 38 39 CXX_EXTRA_FLAGS = -AA -DEH_DELETE_HAS_THROW_SPEC 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 = -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW 44 D_CXXFLAGS = -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW -D_STLP_DEBUG -D_STLP_USE_STATIC_LIB 45 NOSGI_CXXFLAGS = -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -D_STLP_NO_OWN_IOSTREAMS -D_STLP_DEBUG_UNINITIALIZED -DEH_VECTOR_OPERATOR_NEW 46 47 check: $(TEST) 48 49 HP_VERSION=$(shell uname -r) 50 ifeq (${HP_VERSION},B.10.20) 51 PTHREAD_LIB=-lcma 52 else 53 PTHREAD_LIB=-lpthread +nostl 54 endif 55 56 LIBS = $(PTHREAD_LIB) -lm 57 58 D_LIBSTLPORT = -L../../lib -lstlport_aCC_debug 59 LIBSTLPORT = -L../../lib -lstlport_aCC 60 61 all: $(TEST_EXE) $(D_TEST_EXE) $(NOSGI_TEST_EXE) 62 63 check_nosgi: $(NOSGI_TEST) 64 check_d: $(D_TEST) 65 66 67 $(TEST_EXE) : $(OBJECTS) 68 $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBSTLPORT) $(LIBS) -o $(TEST_EXE) 69 70 $(D_TEST_EXE) : $(D_OBJECTS) 71 $(CXX) $(D_CXXFLAGS) $(D_OBJECTS) $(D_LIBSTLPORT) $(LIBS) -o $(D_TEST_EXE) 72 73 $(NOSGI_TEST_EXE) : $(NOSGI_OBJECTS) 74 $(CXX) $(NOSGI_CXXFLAGS) $(NOSGI_OBJECTS) $(LIBS) -o $(NOSGI_TEST_EXE) 75 76 77 $(TEST) : $(TEST_EXE) 78 $(TEST_EXE) 79 80 $(D_TEST) : $(D_TEST_EXE) 81 $(D_TEST_EXE) 82 83 $(NOSGI_TEST) : $(NOSGI_TEST_EXE) 84 $(NOSGI_TEST_EXE) 85 86 SUFFIXES: .cpp.o.exe.out.res 87 88 nosgi_obj/%.o : %.cpp 89 $(CXX) $(NOSGI_CXXFLAGS) $< -c -o $@ 90 91 d_obj/%.o : %.cpp 92 $(CXX) $(D_CXXFLAGS) $< -c -o $@ 93 94 obj/%.o : %.cpp 95 $(CXX) $(CXXFLAGS) $< -c -o $@ 96 97 nosgi_obj/%.i : %.cpp 98 $(CXX) $(NOSGI_CXXFLAGS) $< -E -H > $@ 99 100 d_obj/%.i : %.cpp 101 $(CXX) $(D_CXXFLAGS) $< -E -H > $@ 102 103 obj/%.i : %.cpp 104 $(CXX) $(CXXFLAGS) $< -E -H > $@ 105 106 %.out: %.cpp 107 $(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -g -o $*.o 108 $(CXX) $(CXXFLAGS) $*.o $(LIBS) -o $* 109 ./$* > $@ 110 -rm -f $* 111 112 %.s: %.cpp 113 $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@ 114 115 %.E: %.cpp 116 $(CXX) $(CXXFLAGS) -E $< -o $@ 117 118 clean: 119 -rm -fr ${TEST_EXE} *.o */*.o *.rpo *.obj *.out core *~ Templates.DB 120