• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8srcdir = .
9VPATH = .
10
11# point this to proper location
12STL_INCL=../../stlport
13
14AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp
15
16TEST_LIST=test_algo.cpp  \
17test_algobase.cpp     test_list.cpp test_slist.cpp \
18test_bit_vector.cpp   test_vector.cpp \
19test_deque.cpp test_set.cpp test_map.cpp \
20test_hash_map.cpp  test_hash_set.cpp test_rope.cpp \
21test_string.cpp test_bitset.cpp test_valarray.cpp
22
23LIST=${AUX_LIST} ${TEST_LIST}
24
25OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
26EXECS = $(LIST:%.cpp=%)
27TESTS = $(LIST:%.cpp=%.out)
28TEST_EXE  = ./eh_test
29TEST  = ./eh_test.out
30
31CC = como
32CXX = $(CC)
33
34CXXFLAGS = -DLIBCIO= --diag_suppress=68 -D__null=0L -D__GNUG__ -D_STLP_DEBUG -I${STL_INCL}  -I. ${CXX_EXTRA_FLAGS}
35
36LIBS = -L../../lib -lstlport_como_stldebug -lpthread -lm
37LIBSTDCXX =
38
39check: $(TEST)
40
41$(TEST_EXE) : $(OBJECTS)
42	$(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $(TEST_EXE)
43
44
45$(TEST) : $(TEST_EXE)
46	$(TEST_EXE)
47
48SUFFIXES: .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
68clean:
69	-rm -fr ${TEST_EXE} *.out *.o *.ii *.ti
70