1# 2# This requires GNU make. 3# 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 \ 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 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 37CC = gcc 38CXX = g++ 39 40CXXFLAGS = -s -noixemul -m68020 -Wall -O2 ${STL_INCL} -I. -DEH_VECTOR_OPERATOR_NEW 41D_CXXFLAGS = -Wall -g -O ${STL_INCL} -I. -DEH_VECTOR_OPERATOR_NEW -D_STLP_DEBUG -D_STLP_USE_STATIC_LIB 42NOSGI_CXXFLAGS = -Wall -g -O2 ${STL_INCL} -I. -D_STLP_NO_OWN_IOSTREAMS -D_STLP_DEBUG_UNINITIALIZED -DEH_VECTOR_OPERATOR_NEW 43 44check: $(TEST) 45 46LIBS = -lm 47D_LIBSTLPORT = -L../../lib -lstlport_gcc_stldebug 48LIBSTLPORT = -L../../lib -lstlport_gcc 49 50all: $(TEST_EXE) 51 52check_nosgi: $(NOSGI_TEST) 53check_d: $(D_TEST) 54 55 56OBJDIR=obj 57D_OBJDIR=d_obj 58NOSGI_OBJDIR=nosgi_obj 59 60$(OBJDIR): 61 mkdir obj 62$(D_OBJDIR): 63 mkdir d_obj 64$(NOSGI_OBJDIR): 65 mkdir nosgi_obj 66 67$(TEST_EXE) : $(OBJDIR) $(OBJECTS) 68 $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBSTLPORT) $(LIBS) -o $(TEST_EXE) 69 70$(D_TEST_EXE) : $(D_OBJDIR) $(D_OBJECTS) 71 $(CXX) $(D_CXXFLAGS) $(D_OBJECTS) $(D_LIBSTLPORT) $(LIBS) -o $(D_TEST_EXE) 72 73$(NOSGI_TEST_EXE) : $(NOSGI_OBJDIR) $(NOSGI_OBJECTS) 74 $(CXX) $(NOSGI_CXXFLAGS) $(NOSGI_OBJECTS) $(LIBS) -o $(NOSGI_TEST_EXE) 75 76$(TEST) : $(TEST_EXE) 77 $(TEST_EXE) -s 100 78 79$(D_TEST) : $(D_TEST_EXE) 80 LD_LIBRARY_PATH="../../lib:$(LD_LIBRARY_PATH)" ./$(D_TEST_EXE) -s 100 81 82 83$(NOSGI_TEST) : $(NOSGI_TEST_EXE) 84 $(NOSGI_TEST_EXE) 85 86SUFFIXES: .cpp.o.exe.out.res 87 88nosgi_obj/%.o : %.cpp 89 $(CXX) $(NOSGI_CXXFLAGS) $< -c -o $@ 90 91d_obj/%.o : %.cpp 92 $(CXX) $(D_CXXFLAGS) $< -c -o $@ 93 94obj/%.o : %.cpp 95 $(CXX) $(CXXFLAGS) $< -c -o $@ 96 97nosgi_obj/%.i : %.cpp 98 $(CXX) $(NOSGI_CXXFLAGS) $< -E -H > $@ 99 100d_obj/%.i : %.cpp 101 $(CXX) $(D_CXXFLAGS) $< -E -H > $@ 102 103obj/%.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 118clean: 119 -rm -fr ${TEST_EXE} *.o */*.o *.rpo *.obj *.out core *~ Templates.DB 120