os/ossrv/genericopenlibs/cppstdlib/stl/test/eh/cray.mak
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
SHELL=/bin/sh
sl@0
     3
sl@0
     4
# srcdir = .
sl@0
     5
# VPATH = .
sl@0
     6
sl@0
     7
STL_INCL=-I${PWD}/../../stlport/
sl@0
     8
sl@0
     9
AUX_LIST=TestClass.o main.o nc_alloc.o random_number.o
sl@0
    10
sl@0
    11
TEST_LIST=test_algo.o  \
sl@0
    12
test_algobase.o     test_list.o test_slist.o \
sl@0
    13
test_bit_vector.o   test_vector.o \
sl@0
    14
test_deque_cray.o test_set.o test_map.o \
sl@0
    15
test_hash_map.o  test_hash_set.o test_rope.o \
sl@0
    16
test_string.o test_bitset.o test_valarray.o
sl@0
    17
sl@0
    18
LIST=${AUX_LIST} ${TEST_LIST}
sl@0
    19
sl@0
    20
OBJECTS = $(LIST)
sl@0
    21
EXECS = $(LIST:%.o=%)
sl@0
    22
TESTS = $(LIST:%.o=%.out)
sl@0
    23
TEST_EXE  = eh_test
sl@0
    24
TEST  = eh_test.out
sl@0
    25
sl@0
    26
CC = CC
sl@0
    27
CXX = $(CC)
sl@0
    28
sl@0
    29
#CXXFLAGS = -hexceptions -DEH_DELETE_HAS_THROW_SPEC -I. ${STL_INCL} ${DEBUG_FLAGS}
sl@0
    30
CXXFLAGS = -D_STLP_HAS_NO_EXCEPTIONS -I. ${STL_INCL} ${DEBUG_FLAGS}
sl@0
    31
sl@0
    32
#LIBS = -L../../lib -lstlportx -lpthread
sl@0
    33
LIBS = -L../../lib -lstlport -lpthread
sl@0
    34
sl@0
    35
.SUFFIXES: .cpp .i .o .out
sl@0
    36
sl@0
    37
check: $(TEST)
sl@0
    38
sl@0
    39
$(TEST) : $(OBJECTS)
sl@0
    40
	$(CXX) $(CXXFLAGS) $(LIBS) $(OBJECTS) -o $(TEST_EXE)
sl@0
    41
	./$(TEST_EXE) -s 100
sl@0
    42
sl@0
    43
.cpp.o:
sl@0
    44
	$(CXX) $(CXXFLAGS) $< -c -o $@
sl@0
    45
sl@0
    46
.cpp.i:
sl@0
    47
	$(CXX) $(CXXFLAGS) $< -E > $@
sl@0
    48
sl@0
    49
%.out: %.cpp
sl@0
    50
	$(CXX) $(CXXFLAGS) $*.cpp -c -USINGLE -DMAIN -g -o $*.o
sl@0
    51
	$(CXX) $(CXXFLAGS) $(LIBS) $*.o -o $*
sl@0
    52
	./$* -q
sl@0
    53
	-rm -f $*
sl@0
    54
sl@0
    55
clean:
sl@0
    56
	-rm -fr ${TEST_EXE} *.o *.ii *.out core