5
|
1 # |
|
2 # Common configuration rules for all of octave's Makefiles. |
|
3 # |
|
4 # John W. Eaton |
|
5 # jwe@che.utexas.edu |
|
6 # Department of Chemical Engineering |
|
7 # The University of Texas at Austin |
|
8 |
|
9 SHELL = /bin/sh |
|
10 |
|
11 #### Start of system configuration section. #### |
|
12 |
|
13 LEX = @LEX@ |
|
14 LFLAGS = @LFLAGS@ |
|
15 LEXLIB = @LEXLIB@ |
|
16 |
|
17 YACC = @YACC@ |
|
18 YFLAGS = -dv |
|
19 |
|
20 INSTALL = @INSTALL@ |
169
|
21 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
5
|
22 INSTALL_DATA = @INSTALL_DATA@ |
|
23 |
|
24 RANLIB = @RANLIB@ |
|
25 |
|
26 RUNTEST = @RUNTEST@ |
|
27 |
|
28 DEFAULT_PAGER = @DEFAULT_PAGER@ |
|
29 |
|
30 # Fortran to C translator and associated flags. |
|
31 |
|
32 F2C = @F2C@ |
|
33 F2CFLAGS = @F2CFLAGS@ |
|
34 |
|
35 # Fortran compiler flags. |
|
36 |
|
37 FFLAGS = @FFLAGS@ |
|
38 |
|
39 # cc and associated flags. |
|
40 |
|
41 INCFLAGS = -I. -I$(srcdir) |
|
42 LIBFLAGS = -L$(TOPDIR) |
|
43 DEFS = @DEFS@ |
|
44 |
|
45 CC = @CC@ |
|
46 CFLAGS = @CFLAGS@ |
|
47 ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(CFLAGS) |
|
48 |
|
49 ifeq ($(CXX), ) |
|
50 CXX = $(C++) |
|
51 endif |
|
52 |
|
53 CXXFLAGS = @CXXFLAGS@ # GNU Make 3.63 and beyond |
|
54 C++FLAGS = $(CXXFLAGS) # backward compatibility |
|
55 ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(CXXFLAGS) |
|
56 |
|
57 LDFLAGS = @LDFLAGS@ |
|
58 ALL_LDFLAGS = $(LIBFLAGS) $(LDFLAGS) |
|
59 |
|
60 FLIBS = @FLIBS@ |
|
61 |
|
62 # A shell command to extract the version number from version.h. |
|
63 getversion = sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q |
|
64 |
|
65 # The version number. TOPDIR is something like `.' or `..' or `../..' |
|
66 # and gets us back up to the top level of the source tree. |
|
67 version = `$(getversion) $(srcdir)/$(TOPDIR)/src/version.h` |
|
68 |
|
69 # Common prefix for installation directories. |
|
70 # NOTE: This directory must exist when you start installation. |
|
71 prefix = /usr/local |
|
72 |
|
73 # Directory in which to put host dependent programs and libraries |
|
74 exec_prefix = $(prefix) |
|
75 |
|
76 # Where to install the executables. |
|
77 bindir = $(exec_prefix)/bin |
|
78 |
|
79 # Where to put libraries like libcruft.a, liboctave.a, and libreadline.a |
|
80 libdir = $(exec_prefix)/lib |
|
81 |
|
82 # Where octave will look for M-files |
|
83 libsubdir = $(libdir)/octave/$(version) |
|
84 |
|
85 # Where to put the manual pages. |
|
86 mandir = $(prefix)/man/man1 |
|
87 # Extension (not including `.') for the installed manual page filenames. |
|
88 manext = 1 |
|
89 |
|
90 # Where to put the info files. |
|
91 infodir = $(prefix)/info |
|
92 |
|
93 # Where to put extra data files, system-wide startup files, etc. |
|
94 datadir = $(prefix)/lib/octave |
|
95 |
|
96 # Where to put installed include files. |
|
97 includedir = $(prefix)/include |
|
98 |
|
99 # The type of computer we are running on. |
|
100 target_host_type = @target_host_type@ |
|
101 |
|
102 # The following pattern rules and the substitution functions require |
|
103 # GNU make. If you don't have it, get it! |
|
104 |
|
105 @DEFAULT_DOT_C_FROM_DOT_F@ |
|
106 |
|
107 @DEFAULT_DOT_O_FROM_DOT_F@ |
|
108 |
|
109 # How to make .o files from .c files: |
|
110 |
|
111 .c.o: |
|
112 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
|
113 |
|
114 .cc.o: |
|
115 $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $< |