1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
####
#### Makefile for Ted.
####
#### No explicit 'configure' is needed as it is done by the 'make' process
#### for the various targets.
####
#### I admit that this makefile is more like a shell script.
####
#### Sensible targets are:
####
#### compile: Just build an executable in the 'Ted' directory
#### package: Build a package. Must be run as root.
#### install: Install the package. Must be run as root.
#### clean: Cleanup rubbish from previous attempts.
####
#### compile.shared: Compile, do not try to link statically.
#### package.shared: Build a package, using the dynamically linked
#### executable
#### install.shared: Install the package. Must be run as root.
#### Installs the package just made, does not force
#### the package to be dynamically linked. This target
#### exists only for convenience.
####
compile: tedlibs \
Ted/Ted \
Ted/Ted.static
:
: Executable Ted/Ted ready
: You can now run 'make package' AS ROOT
compile.shared: tedlibs \
Ted/Ted
:
: Executable Ted/Ted ready
: You can now run 'make package.shared' AS ROOT
####
#### Make library directory.
####
lib:
mkdir lib
####
#### Build ted libraries
####
tedlibs: lib \
lib/bitmap.a \
lib/ind.a \
lib/reg.a \
lib/appUtil.a \
lib/appFrame.a
####
#### Compile the bitmap manipulation library
####
lib/bitmap.a: bitmap/makefile
cd bitmap && make
bitmap/makefile: bitmap/makefile.in
cd bitmap && ./configure
####
#### Compile the spell checker library
####
lib/ind.a: ind/makefile
cd ind && make
ind/makefile: ind/makefile.in
cd ind && ./configure
####
#### Compile the regular expression library
####
lib/reg.a: libreg/makefile
cd libreg && make
libreg/makefile: libreg/makefile.in
cd libreg && ./configure
####
#### Compile the application utility library
####
lib/appUtil.a: appUtil/makefile
cd appUtil && make
appUtil/makefile: appUtil/makefile.in
cd appUtil && ./configure
####
#### Compile the application framework library
####
lib/appFrame.a: appFrame/makefile
cd appFrame && make
appFrame/makefile: appFrame/makefile.in
cd appFrame && ./configure
####
#### Compile and link Ted
####
Ted/Ted.static: tedlibs Ted/makefile
cd Ted && make Ted.static
Ted/Ted: tedlibs Ted/makefile
cd Ted && make
Ted/makefile: Ted/makefile.in
cd Ted && ./configure
####
#### Make a ready to install package
#### Must be run as root
####
package: tedPackage/makefile compile
cd tedPackage && make
:
: Package ready.
: To install Ted, you can now run 'make install' AS ROOT
package.shared: tedPackage/makefile compile.shared
cd tedPackage && make package.shared
:
: Dynamically linked package ready.
: To install Ted, you can now run 'make install' AS ROOT
tedPackage/makefile: tedPackage/makefile.in
cd tedPackage && ./configure
####
#### Install Ted from the package just built
####
install: package
sh ./tedPackage/installTed.sh
install.shared: package.shared
sh ./tedPackage/installTed.sh
####
#### Cleanup
####
clean:
rm -rf lib
rm -f */config.h */config.cache */config.log */config.status
rm -f */makefile
rm -f */*.o
rm -rf tedPackage/scratch
rm -f tedPackage/*.gz
rm -f tedPackage/*.lsm
rm -f tedPackage/installTed.sh
rm -f tedPackage/README
rm -f tedPackage/package
rm -f tedPackage/package.shared
|