1 | # @configure_input@ |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | # |
---|
5 | # GNUmakefile.in - used by `configure' to create `GNUmakefile', the |
---|
6 | # makefile for the Factory Test Environment. |
---|
7 | # |
---|
8 | # In general, you should let `configure' guess the correct values |
---|
9 | # for the variables below. But if something seriously goes wrong |
---|
10 | # in configuring, please inform the authors and feel free to |
---|
11 | # edit the marked section. |
---|
12 | # |
---|
13 | # See the `INSTALL' file for information on how to build the |
---|
14 | # Factory Test Environment. |
---|
15 | # |
---|
16 | # Note: Use GNU `make' (`gmake') to make with this makefile. |
---|
17 | # |
---|
18 | # Note: Allthough you may use this `GNUmakefile' directly you |
---|
19 | # better use the top level `GNUmakefile' to make the test |
---|
20 | # programs. Furthermore, you first have to `make' Factory before |
---|
21 | # you can `make' the Factory Test Environment. |
---|
22 | # |
---|
23 | |
---|
24 | ############### START OF CONFIGURABLE SECTION ############### |
---|
25 | |
---|
26 | SHELL = /bin/sh |
---|
27 | |
---|
28 | # |
---|
29 | # - paths. |
---|
30 | # |
---|
31 | srcdir = @srcdir@ |
---|
32 | VPATH = @srcdir@ |
---|
33 | NTLPATH = $(srcdir)/../../ntl-2.0 |
---|
34 | |
---|
35 | # |
---|
36 | # - programs. |
---|
37 | # |
---|
38 | CXX = @CXX@ |
---|
39 | M4 = @M4@ |
---|
40 | |
---|
41 | # |
---|
42 | # - flags. |
---|
43 | # |
---|
44 | CPPFLAGS = @CPPFLAGS@ |
---|
45 | CXXFLAGS = @CXXFLAGS@ |
---|
46 | DEFS = @DEFS@ |
---|
47 | LDFLAGS = @LDFLAGS@ |
---|
48 | LIBS = @LIBS@ |
---|
49 | |
---|
50 | M4FLAGS = @M4FLAGS@ |
---|
51 | |
---|
52 | ############### END OF CONFIGURABLE SECTION ############### |
---|
53 | |
---|
54 | # |
---|
55 | # - compiler flags. |
---|
56 | # |
---|
57 | WARNFLAGS = -w |
---|
58 | |
---|
59 | # flags to translate library c++ files |
---|
60 | LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates \ |
---|
61 | -I$(srcdir) -I.. -I$(srcdir)/.. \ |
---|
62 | $(DEFS) $(CPPFLAGS) $(CXXFLAGS) |
---|
63 | |
---|
64 | # flags to translate test programs |
---|
65 | FTESTCXXFLAGS = $(LIBCXXFLAGS) |
---|
66 | |
---|
67 | # flags to link test programs |
---|
68 | FTESTLDFLAGS = $(LIBS) $(LDFLAGS) |
---|
69 | |
---|
70 | # |
---|
71 | # - source files. |
---|
72 | # |
---|
73 | |
---|
74 | # use value from environment if set, otherwise supply reasonable |
---|
75 | # default value |
---|
76 | ifndef ftestm4src |
---|
77 | ftestm4src := feval.m4 |
---|
78 | endif |
---|
79 | ftestccsrc := $(ftestm4src:.m4=.cc) |
---|
80 | ftestobj := $(ftestm4src:.m4=.o) |
---|
81 | ftestexec := $(ftestm4src:.m4=) |
---|
82 | |
---|
83 | # |
---|
84 | # - phony and precious targets. |
---|
85 | # |
---|
86 | .PHONY: all clean distclean |
---|
87 | .PRECIOUS: %.cc %.o |
---|
88 | |
---|
89 | # |
---|
90 | # - pattern rules. |
---|
91 | # |
---|
92 | |
---|
93 | # cancel some builtin rules which may cause confusion |
---|
94 | %: %.o |
---|
95 | %: %.cc |
---|
96 | |
---|
97 | # how to link the ntl test files |
---|
98 | %.ntl: %.ntl.o ftest_util.o ftest_io.o ntl_util.o ../libcf.a ../libcfmem.a ../ftmpl_inst.o |
---|
99 | $(CXX) $^ $(FTESTLDFLAGS) $(NTLPATH)/ntl.a -o $@ |
---|
100 | |
---|
101 | # how to create the ntl test file objects |
---|
102 | %.ntl.o: %.ntl.cc ../factory.h ftest_util.h ftest_io.h ntl_util.h |
---|
103 | $(CXX) -c $< -I$(NTLPATH) $(FTESTCXXFLAGS) -o $@ |
---|
104 | |
---|
105 | # how to link the test files |
---|
106 | %: %.o ftest_util.o ftest_io.o ../libcf.a ../libcfmem.a ../ftmpl_inst.o |
---|
107 | $(CXX) $^ $(FTESTLDFLAGS) -o $@ |
---|
108 | |
---|
109 | # how to create the test file objects |
---|
110 | %.o: %.cc ../factory.h ftest_util.h ftest_io.h |
---|
111 | $(CXX) -c $< $(FTESTCXXFLAGS) -o $@ |
---|
112 | |
---|
113 | # how to create the test programs |
---|
114 | %.cc: %.m4 ftest_util.m4 |
---|
115 | $(M4) $(M4FLAGS) $(srcdir)/ftest_util.m4 $< > $@ |
---|
116 | |
---|
117 | # |
---|
118 | # - create `feval'. |
---|
119 | # |
---|
120 | # This is a dummy target only just in case the user types `make' |
---|
121 | # in the FTE directory. |
---|
122 | # |
---|
123 | all: feval |
---|
124 | |
---|
125 | # |
---|
126 | # - explicit targets. |
---|
127 | # |
---|
128 | |
---|
129 | # do not create ftest_util.cc from ftest_util.m4! |
---|
130 | ftest_util.cc: |
---|
131 | touch $@ |
---|
132 | |
---|
133 | ftest_util.o: ftest_util.cc ftest_util.h ftest_io.h ../factory.h |
---|
134 | $(CXX) -c $< $(LIBCXXFLAGS) -o $@ |
---|
135 | |
---|
136 | ftest_io.o: ftest_io.cc ftest_io.h ftest_util.h ../factory.h |
---|
137 | $(CXX) -c $< $(LIBCXXFLAGS) -o $@ |
---|
138 | |
---|
139 | ntl_util.o: ntl_util.cc ntl_util.h ../factory.h |
---|
140 | $(CXX) -c $< -I$(NTLPATH) $(LIBCXXFLAGS) -o $@ |
---|
141 | |
---|
142 | # |
---|
143 | # - cleaning up. |
---|
144 | # |
---|
145 | clean: |
---|
146 | -rm -f $(ftestexec) $(ftestccsrc) *.o |
---|
147 | |
---|
148 | distclean: clean |
---|
149 | -rm -f GNUmakefile |
---|
150 | |
---|
151 | |
---|
152 | # |
---|
153 | # - configure stuff. |
---|
154 | # |
---|
155 | GNUmakefile: GNUmakefile.in ../config.status |
---|
156 | cd .. && CONFIG_FILES=ftest/GNUmakefile CONFIG_HEADERS= ./config.status |
---|