Home | History | Annotate | Download | only in eh
      1 
      2 SHELL=/bin/sh
      3 
      4 # srcdir = .
      5 # VPATH = .
      6 
      7 STL_INCL=-I${PWD}/../../stlport/
      8 
      9 AUX_LIST=TestClass.o main.o nc_alloc.o random_number.o
     10 
     11 TEST_LIST=test_algo.o  \
     12 test_algobase.o     test_list.o test_slist.o \
     13 test_bit_vector.o   test_vector.o \
     14 test_deque_cray.o test_set.o test_map.o \
     15 test_hash_map.o  test_hash_set.o test_rope.o \
     16 test_string.o test_bitset.o test_valarray.o
     17 
     18 LIST=${AUX_LIST} ${TEST_LIST}
     19 
     20 OBJECTS = $(LIST)
     21 EXECS = $(LIST:%.o=%)
     22 TESTS = $(LIST:%.o=%.out)
     23 TEST_EXE  = eh_test
     24 TEST  = eh_test.out
     25 
     26 CC = CC
     27 CXX = $(CC)
     28 
     29 #CXXFLAGS = -hexceptions -DEH_DELETE_HAS_THROW_SPEC -I. ${STL_INCL} ${DEBUG_FLAGS}
     30 CXXFLAGS = -D_STLP_HAS_NO_EXCEPTIONS -I. ${STL_INCL} ${DEBUG_FLAGS}
     31 
     32 #LIBS = -L../../lib -lstlportx -lpthread
     33 LIBS = -L../../lib -lstlport -lpthread
     34 
     35 .SUFFIXES: .cpp .i .o .out
     36 
     37 check: $(TEST)
     38 
     39 $(TEST) : $(OBJECTS)
     40 	$(CXX) $(CXXFLAGS) $(LIBS) $(OBJECTS) -o $(TEST_EXE)
     41 	./$(TEST_EXE) -s 100
     42 
     43 .cpp.o:
     44 	$(CXX) $(CXXFLAGS) $< -c -o $@
     45 
     46 .cpp.i:
     47 	$(CXX) $(CXXFLAGS) $< -E > $@
     48 
     49 %.out: %.cpp
     50 	$(CXX) $(CXXFLAGS) $*.cpp -c -USINGLE -DMAIN -g -o $*.o
     51 	$(CXX) $(CXXFLAGS) $(LIBS) $*.o -o $*
     52 	./$* -q
     53 	-rm -f $*
     54 
     55 clean:
     56 	-rm -fr ${TEST_EXE} *.o *.ii *.out core
     57