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