1# ;;; -*- Mode:makefile;-*- 
2# Generated automatically from Makefile.in by configure.
3# This requires GNU make.
4
5
6SHELL=/bin/sh
7
8# point this to proper location
9STL_INCL= -I${PWD}/../../stlport
10
11# STL_INCL= -DEH_NO_SGI_STL
12
13AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp
14
15TEST_LIST=test_algo.cpp  \
16test_algobase.cpp     test_list.cpp test_slist.cpp \
17test_bit_vector.cpp   test_vector.cpp \
18test_deque.cpp test_set.cpp test_map.cpp \
19test_hash_map.cpp  test_hash_set.cpp test_rope.cpp \
20test_string.cpp test_bitset.cpp test_valarray.cpp
21
22LIST=${AUX_LIST} ${TEST_LIST}
23
24OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
25EXECS = $(LIST:%.cpp=%)
26TESTS = $(LIST:%.cpp=%.out)
27TEST_EXE  = eh_test
28TEST  = eh_test.out
29
30CC = CC
31CXX = $(CC)
32
33# CXXFLAGS = ${STL_INCL} -library=no%Cstd -qoption ccfe -instlib=../../lib/libstlport_sunpro.so -features=rtti -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC
34
35CXXFLAGS = ${STL_INCL} -library=no%Cstd -features=rtti -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC
36
37# This is to test with native STL
38# CXXFLAGS = +w2 -xildoff -D_STLP_USE_NEWALLOC -DEH_NO_SGI_STL -DEH_NEW_HEADERS -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC
39
40
41LIBS = -lm 
42LIBSTDCXX = 
43
44LIBSTLPORT = -library=no%Cstd -L../../lib -lstlport_sunpro
45
46
47check: $(TEST)
48
49$(TEST) : $(OBJECTS)
50	$(CXX) $(CXXFLAGS) $(OBJECTS) ${LIBSTLPORT} $(LIBS) -o $(TEST_EXE)
51	LD_LIBRARY_PATH="../../lib;${LD_LIBRARY_PATH}" ./$(TEST_EXE) -s 100
52
53SUFFIXES: .cpp.o.out.res
54
55%.o : %.cpp
56	$(CXX) $(CXXFLAGS) $< -c -o $@
57
58%.i : %.cpp
59	$(CXX) $(CXXFLAGS) $< -E -H > $@
60
61%.out: %.cpp
62	$(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -g -o $*.o
63	$(CXX) $(CXXFLAGS) $*.o $(LIBS) ${LIBSTLPORT} -o $*
64	LD_LIBRARY_PATH="../../lib;${LD_LIBRARY_PATH}" ./$* 
65
66
67%.s: %.cpp
68	$(CXX) $(CXXFLAGS) -O4 -S -pto $<  -o $@
69
70clean:
71	-rm -fr ${TEST_EXE} *.o *.rpo *.obj *.out core *~ Templates.DB SunWS_cache
72