Subversion Repositories gelsvn

Rev

Rev 12 | Rev 114 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 39
Line 101... Line 101...
101
                 makefiles directory
101
                 makefiles directory
102
 
102
 
103
Make'ing in subdirectories
103
Make'ing in subdirectories
104
--------------------------
104
--------------------------
105
 
105
 
106
Go to a subdirectory of Libsrc, say Libsrc/somedir. 
106
Go to a subdirectory of src, say src/somedir. 
107
Here you have the following options:
107
Here you have the following options:
108
 
108
 
109
make lib
109
make lib
110
make clean
110
make clean
111
 
111
 
112
The former will rebuild all sourcefiles and put them in a library 
112
The former will rebuild all sourcefiles and put them in a library 
113
directory. The latter will remove all object and dependency files 
113
directory. The latter will remove all object and dependency files 
114
(but only for the current platform (e.g. Linux_i686_g++_debug) 
114
(but only for the current platform (e.g. Linux_i686_g++_debug) 
115
The default target is lib.
115
The default target is lib.
116
 
116
 
117
Go to a subdirectory of Appsrc, say Appsrc/somedir. 
117
Go to a subdirectory of apps, say apps/somedir. 
118
Here you have the following options:
118
Here you have the following options:
119
 
119
 
120
make app
120
make app
121
 
121
 
122
will recompile the source files in the current directory and build the 
122
will recompile the source files in the current directory and build the 
Line 132... Line 132...
132
 
132
 
133
make clean
133
make clean
134
 
134
 
135
works like above. 
135
works like above. 
136
 
136
 
137
Makefiles in subdirectories under Appsrc should generally be edited.
137
Makefiles in subdirectories under apps should generally be edited.
138
When create by `make makefiles' the Makefile in Appsrc/somedir looks
138
When create by `make makefiles' the Makefile in apps/somedir looks
139
like this 
139
like this 
140
 
140
 
141
PROGRAMS 	= prog1 prog2
141
PROGRAMS 	= prog1 prog2
142
OWN_LIBS 	= Lib1 Lib2
142
OWN_LIBS 	= Lib1 Lib2
143
LIBS			= ${GLLIBS} ${XLIBS} -lm -lz -lexpat
143
LIBS			= ${GLLIBS} ${XLIBS} -lm -lz -lexpat
Line 156... Line 156...
156
prog2.cpp
156
prog2.cpp
157
 
157
 
158
must exist (and contain a main function)
158
must exist (and contain a main function)
159
 
159
 
160
Lib1 and Lib2 are libraries that must also be in the directory structure,
160
Lib1 and Lib2 are libraries that must also be in the directory structure,
161
i.e. under Libsrc there are subdirectories 
161
i.e. under src there are subdirectories 
162
 
162
 
163
Libsrc/Lib1
163
src/Lib1
164
Libsrc/Lib2
164
src/Lib2
165
 
165
 
166
the files in these subdirectories will be compiled and put in library 
166
the files in these subdirectories will be compiled and put in library 
167
files named libLib1.a under lib. More precisely it will be put here:
167
files named libLib1.a under lib. More precisely it will be put here:
168
 
168
 
169
lib/PLATFORM_TARGET/
169
lib/PLATFORM_TARGET/
Line 183... Line 183...
183
----------------------------------------------------------------------
183
----------------------------------------------------------------------
184
 
184
 
185
When you add a new project to this framework, you should go through
185
When you add a new project to this framework, you should go through
186
the following steps:
186
the following steps:
187
 
187
 
188
Add directories for libraries under Libsrc. E.g. add 
188
Add directories for libraries under src. E.g. add 
189
 
189
 
190
mkdir Libsrc/somelib
190
mkdir src/somelib
191
 
191
 
192
Then add directories for applications:
192
Then add directories for applications:
193
 
193
 
194
mkdir Appsrc/someapp
194
mkdir apps/someapp
195
 
195
 
196
Copy appropriate source files to these directories and then edit
196
Copy appropriate source files to these directories and then edit
197
 
197
 
198
makefiles/config.mk
198
makefiles/config.mk
199
 
199