2681
|
1 # |
|
2 # Makefile for octave's src directory |
|
3 # |
|
4 # John W. Eaton |
|
5 # jwe@bevo.che.wisc.edu |
|
6 # University of Wisconsin-Madison |
|
7 # Department of Chemical Engineering |
|
8 |
3077
|
9 TARGETS = octave-bug mkoctfile libcruft liboctave kpathsea dlfcn \ |
3148
|
10 readline src scripts doc check octave.info INSTALL.OCTAVE BUGS \ |
2811
|
11 install install-strip uninstall tags TAGS dist conf-dist \ |
|
12 snapshot snapshot-version |
2681
|
13 |
|
14 NO_DEP_TARGETS = clean mostlyclean distclean maintainer-clean |
|
15 |
|
16 all: header-msg config-check |
|
17 $(MAKE) -f octMakefile all |
|
18 |
|
19 $(TARGETS): FORCE |
|
20 $(MAKE) -f octMakefile $@ |
|
21 |
|
22 $(NO_DEP_TARGETS): FORCE |
|
23 $(MAKE) -f octMakefile omit_deps=true $@ |
|
24 |
|
25 binary-dist: FORCE |
3029
|
26 @if test -f configure && test -f octMakefile.in; then \ |
|
27 ./configure --disable-shared --disable-dl --disable-shl; \ |
2682
|
28 else \ |
3029
|
29 echo ""; \ |
|
30 echo "*** You must run make binary-dist in the source directory."; \ |
|
31 echo ""; \ |
|
32 exit 1; \ |
2682
|
33 fi |
|
34 $(MAKE) -f octMakefile CFLAGS=-O CXXFLAGS=-O LDFLAGS=-static all |
|
35 $(MAKE) -f octMakefile binary-dist |
2681
|
36 |
|
37 # Maybe this message will prevent people from asking why the |
|
38 # Makefiles don't work for them. Maybe not. |
|
39 |
|
40 header-msg: FORCE |
|
41 @echo "" |
3148
|
42 @echo "***********************************************************" |
|
43 @echo "* *" |
|
44 @echo "* To compile Octave, you will need a recent version of *" |
|
45 @echo "* GNU Make. *" |
|
46 @echo "* *" |
|
47 @echo "* You will also need g++ 2.7.2 or later. Version 2.8.0 *" |
|
48 @echo "* or egcs 1.0.x should work. Later versions may work, *" |
|
49 @echo "* but C++ is still evolving, so don't be too surprised *" |
|
50 @echo "* if you run into some trouble. *" |
|
51 @echo "* *" |
|
52 @echo "* libg++ is no longer required (if you are using g++ *" |
|
53 @echo "* 2.7.2, libstdc++ is distributed along with libg++, *" |
|
54 @echo "* but for later versions, libstdc++ is distributed *" |
|
55 @echo "* separately). *" |
|
56 @echo "* *" |
|
57 @echo "* Now would be a good time to read INSTALL.OCTAVE if *" |
|
58 @echo "* you have not done so already. *" |
|
59 @echo "* *" |
|
60 @echo "***********************************************************" |
2681
|
61 @echo "" |
|
62 |
|
63 help: header-msg |
|
64 @echo "" |
|
65 @echo "For more information, please read the files INSTALL," |
|
66 @echo "INSTALL.OCTAVE, and any other system-specific README" |
|
67 @echo "files that apply (e.g., README.Linux)." |
|
68 @echo "" |
|
69 @echo "The following targets are available:" |
|
70 @echo "" |
|
71 @echo " all build everything" |
|
72 @echo " check run self tests" |
|
73 @echo " install install files" |
|
74 @echo " install-strip same as install but strip binaries" |
|
75 @echo " uninstall delete installed files" |
|
76 @echo "" |
|
77 @echo " dist create a source distribution" |
|
78 @echo " conf-dist create a config files distribution" |
2682
|
79 @echo " binary-dist create a binary distribution" |
2681
|
80 @echo "" |
|
81 @echo " clean remove files created by make all" |
|
82 @echo " mostlyclean remove most files created by make all" |
|
83 @echo " distclean remove all files not in distribution" |
|
84 @echo " maintainer-clean clean up everything" |
|
85 @echo "" |
|
86 @echo " octave-bug create octave-bug script" |
|
87 @echo " mkoctfile create mkoctfile script" |
|
88 @echo " INSTALL.OCTAVE create INSTALL.OCTAVE doc file" |
|
89 @echo " BUGS create BUGS doc file" |
|
90 @echo " tags create tags files" |
|
91 @echo " TAGS create TAGS files" |
|
92 @echo "" |
|
93 @echo " dlfcn make all in subdirectory dlfcn" |
|
94 @echo " doc make all in subdirectory doc" |
|
95 @echo " kpathsea make all in subdirectory kpathsea" |
|
96 @echo " libcruft make all in subdirectory libcruft" |
|
97 @echo " liboctave make all in subdirectory liboctave" |
|
98 @echo " scripts make all in subdirectory scripts" |
|
99 @echo " src make all in subdirectory src" |
|
100 @echo "" |
|
101 @echo " help print this message" |
|
102 @echo "" |
|
103 |
|
104 config-check: |
3029
|
105 @if test -f octMakefile; then \ |
|
106 true; \ |
2681
|
107 else \ |
3029
|
108 echo ""; \ |
|
109 echo "*** You must run configure before running make."; \ |
|
110 echo "***"; \ |
|
111 echo "*** Please read the INSTALL and INSTALL.OCTAVE files"; \ |
|
112 echo "*** for more information about how to configure and"; \ |
|
113 echo "*** compile Octave."; \ |
|
114 echo ""; \ |
|
115 exit 1; \ |
2681
|
116 fi |
|
117 |
|
118 FORCE: |