1 # 2 # Note : this makefile has been tested for como-4.3.0.1+gcc-2.96 on Redhat 7.3 3 # 4 5 .SUFFIXES: 6 .SUFFIXES: .cc .cpp .o .exe .out 7 8 srcdir = . 9 VPATH = . 10 11 # point this to proper location 12 STL_INCL=../../stlport 13 14 AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp 15 16 TEST_LIST=test_algo.cpp \ 17 test_algobase.cpp test_list.cpp test_slist.cpp \ 18 test_bit_vector.cpp test_vector.cpp \ 19 test_deque.cpp test_set.cpp test_map.cpp \ 20 test_hash_map.cpp test_hash_set.cpp test_rope.cpp \ 21 test_string.cpp test_bitset.cpp test_valarray.cpp 22 23 LIST=${AUX_LIST} ${TEST_LIST} 24 25 OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE) 26 EXECS = $(LIST:%.cpp=%) 27 TESTS = $(LIST:%.cpp=%.out) 28 TEST_EXE = ./eh_test 29 TEST = ./eh_test.out 30 31 CC = como 32 CXX = $(CC) 33 34 CXXFLAGS = -DLIBCIO= --diag_suppress=68 -D__null=0L -D__GNUG__ -D_STLP_DEBUG -I${STL_INCL} -I. ${CXX_EXTRA_FLAGS} 35 36 LIBS = -L../../lib -lstlport_como_stldebug -lpthread -lm 37 LIBSTDCXX = 38 39 check: $(TEST) 40 41 $(TEST_EXE) : $(OBJECTS) 42 $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $(TEST_EXE) 43 44 45 $(TEST) : $(TEST_EXE) 46 $(TEST_EXE) 47 48 SUFFIXES: .cpp.o.exe.out.res 49 50 %.o : %.cpp 51 $(CXX) $(CXXFLAGS) $< -c -o $@ 52 53 %.i : %.cpp 54 $(CXX) $(CXXFLAGS) $< -E -H -o $@ 55 56 %.out: %.cpp 57 $(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -g -o $*.o 58 $(CXX) $(CXXFLAGS) $*.o $(LIBS) -o $* 59 ./$* > $@ 60 -rm -f $* 61 62 %.s: %.cpp 63 $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@ 64 65 %.E: %.cpp 66 $(CXX) $(CXXFLAGS) -E $< -o $@ 67 68 clean: 69 -rm -fr ${TEST_EXE} *.out *.o *.ii *.ti 70