Subversion Repositories gelsvn

Rev

Rev 54 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 54 Rev 137
Line 20... Line 20...
20
not_main_objects = $(filter-out $(addsuffix .o,${PROGRAMS}), ${objects})
20
not_main_objects = $(filter-out $(addsuffix .o,${PROGRAMS}), ${objects})
21
 
21
 
22
######################################################################
22
######################################################################
23
############ We are building #########################################
23
############ We are building #########################################
24
######################################################################
24
######################################################################
25
ifeq (${MAKECMDGOALS},clean)
-
 
26
 
-
 
27
clean:
25
clean:
28
	rm -fr ${BUILDDIR}
26
	rm -fr ${BUILDDIR}
29
 
27
 
30
else
-
 
31
 
-
 
32
# The force target is useful for recompiling libraries. Thus if the appliaction
28
# The force target is useful for recompiling libraries. Thus if the appliaction
33
# or any library it depends on have been changed, we only have to go
29
# or any library it depends on have been changed, we only have to go
34
# > make force 
30
# > make force 
35
# in the directory containing the application. Application is also compiled
31
# in the directory containing the application. Application is also compiled
36
# and linked.
32
# and linked.
Line 42... Line 38...
42
# app is default target. Compiles and links all applications.
38
# app is default target. Compiles and links all applications.
43
app: ${not_main_objects}
39
app: ${not_main_objects}
44
	${MAKE} ${PROGRAMS}
40
	${MAKE} ${PROGRAMS}
45
	$(foreach prg, ${PROGRAMS},	${INSTALL} ${BUILDDIR}/${prg} ${SOURCEROOT}/bin;)
41
	$(foreach prg, ${PROGRAMS},	${INSTALL} ${BUILDDIR}/${prg} ${SOURCEROOT}/bin;)
46
 
42
 
47
# Do not compile programs directly from source. Always compile object file
-
 
48
#%:%.cpp
-
 
49
 
43
 
50
# Link application. .FORCE ensures that we always link. I haven't found a 
44
# Link application. .FORCE ensures that we always link. I haven't found a 
51
# great way to make compilation depend on the timestamp of the libraries, but
45
# great way to make compilation depend on the timestamp of the libraries, but
52
# always linking solves the problem at moderate cost.
46
# always linking solves the problem at moderate cost.
53
%:%.o .FORCE
47
%:%.o .FORCE
Line 55... Line 49...
55
	${CXXFLAGS} ${LDFLAGS} $(addprefix ${BUILDDIR}/,${not_main_objects}) \
49
	${CXXFLAGS} ${LDFLAGS} $(addprefix ${BUILDDIR}/,${not_main_objects}) \
56
	${LOADLIBES}
50
	${LOADLIBES}
57
 
51
 
58
.FORCE:
52
.FORCE:
59
 
53
 
60
endif
-
 
61
 
54