source: trunk/src/Makefile @ 2968

Revision 2968, 4.5 KB checked in by stefan, 14 years ago (diff)

added lib330 in libs make for unix, used by ms2tb

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#
2#       Top level makefile for Earthworm
3#             Lucky Vidmar Mon Feb 14 21:48:28 GMT 2000
4#
5#
6# This makefile contains all the directives necessary to compile
7# earthworm under Solaris and NT, as well as clean up the Earthworm
8# source and binary file tree.
9#
10# 1. To build (compile) the entire Earthworm distribution on a Sun:
11#        make solaris
12#
13# 1a. To compile the Earthworm distrib. on a Linux or other POSIX box:
14#        make unix
15#
16# 2. To build (compile) the entire Earthworm distribution on an NT PC:
17#        nmake nt
18#
19# 3. To clean up the source tree, i.e. remove all *.o, *.obj, *~, *%,
20#    and core files from all modules, on a Sun:
21#        make clean_solaris
22#
23# 3a. To clean up the source tree on a POSIX computer:
24#       make clean_unix
25#
26# 4. To clean up the source tree, i.e. remove all *.o, *.obj, *~, *%,
27#    and core files from all modules, on a PC running NT:
28#        nmake clean_nt
29#
30# 5. To clean up the bin directory, i.e. remove all Earthworm programs,
31#    on a Sun:
32#        make clean_bin_solaris
33#
34# 6. To clean up the bin directory, i.e. remove all Earthworm programs,
35#    on a PC running NT:
36#        nmake clean_bin_nt
37#
38#
39
40#
41# Starting with Earthworm version 5, the source directory is
42# divided into subfolders. Whenever a new module is added to Earthworm,
43# it should be added to the Makefile in the appropriate subfolder.
44#
45
46#
47# If a new subfolder is created, it should be added to the
48#  list of SUBFOLDERs
49#
50SUBFOLDERS = \
51        archiving \
52        data_exchange \
53        diagnostic_tools \
54        display \
55        grab_bag \
56        reporting \
57        seismic_processing \
58        system_control \
59        data_sources
60
61
62#
63#  Top level directives
64#
65solaris: sol_libs sol_modules
66unix: unix_libs unix_modules
67nt: nt_libs nt_modules
68
69
70#
71#  Solaris directives
72#
73sol_libs:: FRC
74        echo "Making libraries";
75        (cd libsrc; make -f makefile.sol);
76
77sol_modules:: FRC
78        @for x in $(SUBFOLDERS); \
79        do \
80                (echo ------; cd $$x; echo Making $@ in:; pwd; \
81                make solaris); \
82        done
83
84clean_solaris:
85        (cd ../lib; echo Cleaning in:; pwd; \
86                rm -f *.o *.obj core *% *~);
87        (cd libsrc/util; echo Cleaning in:; pwd; \
88                make -f makefile.sol clean);
89        (cd libsrc/solaris; echo Cleaning in:; pwd; \
90                make -f makefile.sol clean);
91        (cd libsrc/util/gd_lib; echo Cleaning in:; pwd; \
92                make -f makefile.sol clean);
93        (cd libsrc/winnt; echo Cleaning in:; pwd; \
94                rm -f *.o *.obj core *% *~);
95        @for x in $(SUBFOLDERS); \
96        do \
97                (cd $$x; echo Cleaning in:; pwd; \
98                make clean_solaris); \
99        done
100
101clean_bin_solaris:
102        @for x in $(SUBFOLDERS); \
103        do \
104                (cd $$x; echo Cleaning binaries in:; pwd; \
105                make clean_bin_solaris); \
106        done
107
108#
109#  Unix directives
110#
111unix_libs:: FRC
112        echo "Making OS-independent libraries";
113        (cd libsrc/util; make -f makefile.ux);
114        echo "Making unix specific libraries";
115        (cd libsrc/unix; make -f makefile.ux)
116        echo "Making lib330 libraries";
117        (cd libsrc/lib330; make);
118        echo "Making qlib2 libraries";
119        (cd libsrc/qlib2; make);
120        echo "Making gd libraries";
121        (cd libsrc/util/gd_lib; make -f makefile.ux);
122
123unix_modules:: FRC
124        @for x in $(SUBFOLDERS); \
125        do \
126                (echo ------; cd $$x; echo Making $@ in:; pwd; \
127                make unix); \
128        done
129
130clean_unix:
131        (cd ../lib; echo Cleaning in:; pwd; \
132                rm -f *.o *.obj core *% *~);
133        (cd libsrc/util; echo Cleaning in:; pwd; \
134                make -f makefile.ux clean);
135        (cd libsrc/unix; echo Cleaning in:; pwd; \
136                make -f makefile.ux clean);
137        (cd libsrc/util/gd_lib; echo Cleaning in:; pwd; \
138                make -f makefile.ux clean);
139        (cd libsrc/winnt; echo Cleaning in:; pwd; \
140                rm -f *.o *.obj core *% *~);
141        @for x in $(SUBFOLDERS); \
142        do \
143                (cd $$x; echo Cleaning in:; pwd; \
144                make clean_unix); \
145        done
146
147clean_bin_unix:
148        @for x in $(SUBFOLDERS); \
149        do \
150                (cd $$x; echo Cleaning binaries in:; pwd; \
151                make clean_bin_); \
152        done
153
154
155#
156#  NT directives
157#
158nt_libs:: FRC
159        @echo "Making  C libraries"
160        nt_comp libsrc
161#       @echo "Making  C++ libraries"
162#       nt_comp libsrc_cpp
163
164
165nt_modules:: FRC
166        @echo "Making Earthworm modules"
167        nt_make_tree $(SUBFOLDERS)
168
169clean_nt:: FRC
170        cd ..\lib
171        @echo Cleaning ..\lib
172        -del *.o *.obj core *% *~
173        cd ..\src\libsrc\util
174        @echo Cleaning libsrc\util
175        nmake -f makefile.nt clean
176        cd gd_lib
177        @echo Cleaning libsrc\util\gd_lib
178        nmake -f makefile.nt clean
179        cd ..\..\lib330
180        @echo Cleaning libsrc\lib330
181        nmake -f makefile.nt clean
182        cd ..\winnt
183        @echo Cleaning libsrc\winnt
184        nmake -f makefile.nt clean
185        cd ..\solaris
186        @echo Cleaning libsrc\solaris
187        -del *.o *.obj core *% *~
188        cd ..\..
189        @for %x in ($(SUBFOLDERS)) \
190        do \
191                @nt_folder %x clean_nt
192
193clean_bin_nt:: FRC
194        @for %x in ($(SUBFOLDERS)) \
195        do \
196                @nt_folder %x clean_bin_nt
197
198FRC:
Note: See TracBrowser for help on using the repository browser.