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