source: git/factory/examples/GNUmakefile @ a8af6a8

spielwiese
Last change on this file since a8af6a8 was 0a6813, checked in by Jens Schmidt <schmidt@…>, 27 years ago
* examples/GNUmakefile: doc fix git-svn-id: file:///usr/local/Singular/svn/trunk@862 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2# GNUmakefile - `GNUmakefile' to make some sample applications of
3#   Factory.
4#
5# Note: This `GNUmakefile' is not configured by `configure'.  To
6# configure it, change the variables at the beginning of the
7# file.
8#
9# For more information on the files in the `examples/' directory,
10# see the section "Examples and Tests" in the `README' file.
11#
12
13#
14# - paths.
15#
16
17# where to look for GMP and Factory
18GMPPREFIX=/usr/local
19FACTORYPREFIX=$(HOME)/factory
20
21#
22# - flags.
23#
24
25# compiler
26CXX=g++
27
28# compiler and linker options.  Configured for an optimized
29# version of Factory.
30WARNFLAGS=-w
31DEFS=
32CPPFLAGS=
33CFLAGS=-O2 -fomit-frame-pointer
34CXXFLAGS=-O2 -fomit-frame-pointer
35LIBS=-L$(FACTORYPREFIX)/lib -lcf -lcfmem -L$(GMPPREFIX)/lib -lgmp -lm
36LDFLAGS=
37
38#
39# - compiler flags.
40#
41
42# flags to translate ftmpl_inst.cc.  We allow implicit template
43# instantiations in this case.
44TMPLCXXFLAGS =  $(WARNFLAGS) \
45                -I$(FACTORYPREFIX)/include \
46                $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
47
48# flags to translate application
49APPLCXXFLAGS =  $(WARNFLAGS) -fno-implicit-templates \
50                -I$(FACTORYPREFIX)/include \
51                $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
52
53# flags to link application
54APPLLDFLAGS =   $(LIBS) $(LDFLAGS)
55
56#
57# - files.
58#
59applications := \
60                application \
61                factorize \
62                gcd
63
64#
65# - phony targets.
66#
67.PHONY:         all clean
68
69#
70# - pattern rules.
71#
72%.o:            %.cc
73                $(CXX) -c $< $(APPLCXXFLAGS) -o $@
74
75#
76# - explicit targets.
77#
78
79# compile all applications
80all:            $(applications)
81
82ftmpl_inst.o:   $(FACTORYPREFIX)/include/templates/ftmpl_inst.cc
83                $(CXX) -c $< $(TMPLCXXFLAGS) -o $@
84
85application:    application.o ftmpl_inst.o
86                $(CXX) $^ $(APPLLDFLAGS) -o $@
87                strip $@
88
89factorize:      factorize.o ftmpl_inst.o
90                $(CXX) $^ $(APPLLDFLAGS) -o $@
91                strip $@
92
93gcd:            gcd.o ftmpl_inst.o
94                $(CXX) $^ $(APPLLDFLAGS) -o $@
95                strip $@
96
97# clean up this directory
98clean:
99                rm -f *.o $(applications)
Note: See TracBrowser for help on using the repository browser.