1*c2c66affSColin Finck# 2*c2c66affSColin Finck# This requires GNU make. 3*c2c66affSColin Finck# 4*c2c66affSColin Finck 5*c2c66affSColin Fincksrcdir = . 6*c2c66affSColin FinckVPATH = . 7*c2c66affSColin FinckSHELL = /bin/sh 8*c2c66affSColin Finck 9*c2c66affSColin Finck# point this to proper location 10*c2c66affSColin FinckSTL_INCL = -I../../stlport 11*c2c66affSColin Finck 12*c2c66affSColin FinckAUX_LIST = TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp 13*c2c66affSColin Finck 14*c2c66affSColin FinckTEST_LIST = test_algo.cpp \ 15*c2c66affSColin Finck test_algobase.cpp test_list.cpp test_slist.cpp \ 16*c2c66affSColin Finck test_bit_vector.cpp test_vector.cpp \ 17*c2c66affSColin Finck test_deque.cpp test_set.cpp test_map.cpp \ 18*c2c66affSColin Finck test_hash_map.cpp test_hash_set.cpp test_rope.cpp \ 19*c2c66affSColin Finck test_string.cpp test_bitset.cpp test_valarray.cpp 20*c2c66affSColin Finck 21*c2c66affSColin FinckLIST = ${AUX_LIST} ${TEST_LIST} 22*c2c66affSColin Finck 23*c2c66affSColin FinckOBJECTS = $(LIST:%.cpp=obj/%.o) $(STAT_MODULE) 24*c2c66affSColin FinckD_OBJECTS = $(LIST:%.cpp=d_obj/%.o) $(STAT_MODULE) 25*c2c66affSColin FinckNOSGI_OBJECTS = $(LIST:%.cpp=nosgi_obj/%.o) $(STAT_MODULE) 26*c2c66affSColin Finck 27*c2c66affSColin FinckEXECS = $(LIST:%.cpp=%) 28*c2c66affSColin FinckTESTS = $(LIST:%.cpp=%.out) 29*c2c66affSColin FinckTEST_EXE = ./eh_test 30*c2c66affSColin FinckD_TEST_EXE = ./eh_test_d 31*c2c66affSColin FinckNOSGI_TEST_EXE = ./eh_test_nosgi 32*c2c66affSColin Finck 33*c2c66affSColin FinckTEST = ./eh_test.out 34*c2c66affSColin FinckD_TEST = ./eh_test_d.out 35*c2c66affSColin FinckNOSGI_TEST = ./eh_test_nosgi.out 36*c2c66affSColin Finck 37*c2c66affSColin FinckCC = gcc 38*c2c66affSColin FinckCXX = g++ 39*c2c66affSColin Finck 40*c2c66affSColin FinckCXXFLAGS = -s -noixemul -m68020 -Wall -O2 ${STL_INCL} -I. -DEH_VECTOR_OPERATOR_NEW 41*c2c66affSColin FinckD_CXXFLAGS = -Wall -g -O ${STL_INCL} -I. -DEH_VECTOR_OPERATOR_NEW -D_STLP_DEBUG -D_STLP_USE_STATIC_LIB 42*c2c66affSColin FinckNOSGI_CXXFLAGS = -Wall -g -O2 ${STL_INCL} -I. -D_STLP_NO_OWN_IOSTREAMS -D_STLP_DEBUG_UNINITIALIZED -DEH_VECTOR_OPERATOR_NEW 43*c2c66affSColin Finck 44*c2c66affSColin Finckcheck: $(TEST) 45*c2c66affSColin Finck 46*c2c66affSColin FinckLIBS = -lm 47*c2c66affSColin FinckD_LIBSTLPORT = -L../../lib -lstlport_gcc_stldebug 48*c2c66affSColin FinckLIBSTLPORT = -L../../lib -lstlport_gcc 49*c2c66affSColin Finck 50*c2c66affSColin Finckall: $(TEST_EXE) 51*c2c66affSColin Finck 52*c2c66affSColin Finckcheck_nosgi: $(NOSGI_TEST) 53*c2c66affSColin Finckcheck_d: $(D_TEST) 54*c2c66affSColin Finck 55*c2c66affSColin Finck 56*c2c66affSColin FinckOBJDIR=obj 57*c2c66affSColin FinckD_OBJDIR=d_obj 58*c2c66affSColin FinckNOSGI_OBJDIR=nosgi_obj 59*c2c66affSColin Finck 60*c2c66affSColin Finck$(OBJDIR): 61*c2c66affSColin Finck mkdir obj 62*c2c66affSColin Finck$(D_OBJDIR): 63*c2c66affSColin Finck mkdir d_obj 64*c2c66affSColin Finck$(NOSGI_OBJDIR): 65*c2c66affSColin Finck mkdir nosgi_obj 66*c2c66affSColin Finck 67*c2c66affSColin Finck$(TEST_EXE) : $(OBJDIR) $(OBJECTS) 68*c2c66affSColin Finck $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBSTLPORT) $(LIBS) -o $(TEST_EXE) 69*c2c66affSColin Finck 70*c2c66affSColin Finck$(D_TEST_EXE) : $(D_OBJDIR) $(D_OBJECTS) 71*c2c66affSColin Finck $(CXX) $(D_CXXFLAGS) $(D_OBJECTS) $(D_LIBSTLPORT) $(LIBS) -o $(D_TEST_EXE) 72*c2c66affSColin Finck 73*c2c66affSColin Finck$(NOSGI_TEST_EXE) : $(NOSGI_OBJDIR) $(NOSGI_OBJECTS) 74*c2c66affSColin Finck $(CXX) $(NOSGI_CXXFLAGS) $(NOSGI_OBJECTS) $(LIBS) -o $(NOSGI_TEST_EXE) 75*c2c66affSColin Finck 76*c2c66affSColin Finck$(TEST) : $(TEST_EXE) 77*c2c66affSColin Finck $(TEST_EXE) -s 100 78*c2c66affSColin Finck 79*c2c66affSColin Finck$(D_TEST) : $(D_TEST_EXE) 80*c2c66affSColin Finck LD_LIBRARY_PATH="../../lib:$(LD_LIBRARY_PATH)" ./$(D_TEST_EXE) -s 100 81*c2c66affSColin Finck 82*c2c66affSColin Finck 83*c2c66affSColin Finck$(NOSGI_TEST) : $(NOSGI_TEST_EXE) 84*c2c66affSColin Finck $(NOSGI_TEST_EXE) 85*c2c66affSColin Finck 86*c2c66affSColin FinckSUFFIXES: .cpp.o.exe.out.res 87*c2c66affSColin Finck 88*c2c66affSColin Fincknosgi_obj/%.o : %.cpp 89*c2c66affSColin Finck $(CXX) $(NOSGI_CXXFLAGS) $< -c -o $@ 90*c2c66affSColin Finck 91*c2c66affSColin Finckd_obj/%.o : %.cpp 92*c2c66affSColin Finck $(CXX) $(D_CXXFLAGS) $< -c -o $@ 93*c2c66affSColin Finck 94*c2c66affSColin Finckobj/%.o : %.cpp 95*c2c66affSColin Finck $(CXX) $(CXXFLAGS) $< -c -o $@ 96*c2c66affSColin Finck 97*c2c66affSColin Fincknosgi_obj/%.i : %.cpp 98*c2c66affSColin Finck $(CXX) $(NOSGI_CXXFLAGS) $< -E -H > $@ 99*c2c66affSColin Finck 100*c2c66affSColin Finckd_obj/%.i : %.cpp 101*c2c66affSColin Finck $(CXX) $(D_CXXFLAGS) $< -E -H > $@ 102*c2c66affSColin Finck 103*c2c66affSColin Finckobj/%.i : %.cpp 104*c2c66affSColin Finck $(CXX) $(CXXFLAGS) $< -E -H > $@ 105*c2c66affSColin Finck 106*c2c66affSColin Finck%.out: %.cpp 107*c2c66affSColin Finck $(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -g -o $*.o 108*c2c66affSColin Finck $(CXX) $(CXXFLAGS) $*.o $(LIBS) -o $* 109*c2c66affSColin Finck ./$* > $@ 110*c2c66affSColin Finck -rm -f $* 111*c2c66affSColin Finck 112*c2c66affSColin Finck%.s: %.cpp 113*c2c66affSColin Finck $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@ 114*c2c66affSColin Finck 115*c2c66affSColin Finck%.E: %.cpp 116*c2c66affSColin Finck $(CXX) $(CXXFLAGS) -E $< -o $@ 117*c2c66affSColin Finck 118*c2c66affSColin Finckclean: 119*c2c66affSColin Finck -rm -fr ${TEST_EXE} *.o */*.o *.rpo *.obj *.out core *~ Templates.DB 120