1 ###############################################################################
3 # CLAM System default rules and targets for C++ compilation.
5 # This file composite macros and rules for creating compilation objects
6 # (such as library archives, object files, executable programs, and others).
8 # This file should be included in the user Makefile after the variables
9 # have been initialized appropriately for the particular project being
10 # compiled. The user targets should be placed after the include
11 # directive that specifies this file.
13 ###############################################################################
15 # This section manipulates variable values to prepare them for their use
16 # in the standard CLAM support.
18 # see if they have got the clean flag set. if so, we will not build anything.
22 # also omit version compilation and some logging when not compiling.
23 ifneq "$(NO_COMPILE)" ""
27 # add-ins for packages we use.
29 # secure socket and crypto libraries.
31 LIBS_USED += ssl crypto
34 # pull in the curl configuration using their tool.
35 ifneq "$(USE_CURL)" ""
36 COMPILER_FLAGS += `curl-config --cflags`
37 LOAD_FLAG_SUFFIX += `curl-config --libs`
41 ifneq "$(USE_XWIN)" ""
42 DEFINITIONS += __XWINDOWS__ __X__
45 #need to separate out with a USE_MOTIF kind of thing.
47 HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include
49 LIBRARY_SEARCH_PATH += /usr/X11R6/lib
52 # generalized wxwidgets toolkit configuration.
53 ifneq "$(USE_WXWIDGETS)" ""
54 DEFINITIONS += __WXWIDGETS__
56 ifneq "$(findstring UNICODE, $(DEFINITIONS))" ""
60 # decide whether to turn on the unicode flag or not.
61 ### ifneq "$(findstring UNICODE, $(DEFINITIONS))" ""
62 ifneq "$(use_unicode)" ""
63 UNICODE_FLAG_ADD = --unicode=yes
64 DEFINITIONS += wxUSE_UNICODE
66 UNICODE_FLAG_ADD = --unicode=no
69 COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) )
70 LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) )
73 # add special bits for gnu on unix.
74 ifeq "$(CLAM_COMPILER)" "GNU_LINUX"
78 # some special code for gnu compiler on windows.
79 ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS"
81 #hmmm: LOAD_FLAG_PREFIX += -lwsock32 -lmswsock -shared
84 ###############################################################################
86 ifeq "$(CLAM_COMPILER)" "GNU_DARWIN"
87 # finds the crypto code on macos.
88 # HEADER_SEARCH_PATH += /usr/local/opt/openssl/include
89 # LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/
92 ###############################################################################
94 # Create the real list of local libraries needed.
95 TEMP_LOC1 = $(LOCAL_LIBS_USED:%=%$(TRIPART_VERSION))
96 ACTUAL_LOCAL_LIBS = $(TEMP_LOC1)
98 # Create the list of objects from the list of source files.
99 TEMP_OBJ1 = $(SOURCE:%.cpp=%.obj)
100 TEMP_OBJ2 = $(TEMP_OBJ1:%.c=%.obj)
102 # replace this when supporting resource files on unix.
103 TEMP_OBJ3 = $(TEMP_OBJ2:%.rc=)
105 TEMP_OBJ4 = $(TEMP_OBJ3:%.h=%.bad)
106 OBJECTS = $(TEMP_OBJ4)
108 # special case for multi-build and res files that need to be rebuilt.
109 #RES_OBJECTS_0 = $(SOURCE:%.cpp=)
110 #RES_OBJECTS_1 = $(RES_OBJECTS_0:%.c=)
111 #RES_OBJECTS = $(RES_OBJECTS_1:%.rc=$(OBJECT_DIR)/%.res)
113 # not much conversion anymore...
114 ACTUAL_OBJECTS = $(OBJECTS) $(EXTRA_OBJECTS)
116 # Updates the search path for the compiler and local libraries.
117 BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(strip $(FEISTY_MEOW_CPP_HEADERS)) $(SEARCH_DIRS)
118 HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR)
120 LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \
121 $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS)
123 # Adds some directories that must be searched onto the search path for
124 # header files, such as the header file directory for the compiler.
125 COMPILER_FLAGS += $(HEADER_SEARCH_PATH:%=-I%) $(DEFINITIONS:%=-D%) $(UNDEFINITIONS:%=-U%) -DGLOBAL_PRODUCT_NAME="$(GLOBAL_PRODUCT_NAME)"
127 # The load flags are updated by looking for code libraries in the directories
128 # to search and by adding all of the code libraries that are used.
129 LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%)
130 ifeq "$(OPERATING_SYSTEM)" "UNIX"
131 ifneq "$(CLAM_COMPILER)" "GNU_DARWIN"
132 LOAD_FLAG_PREFIX += -Xlinker --start-group
133 LOAD_FLAG_SUFFIX += -Xlinker --end-group
136 # had to switch from prefix to suffix recently. oddity.
137 #LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%)
138 LOAD_FLAG_SUFFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%)
140 # we steal the exe targets and represent their dependency from the hidden
142 EXE_TEMP_0 = $(TARGETS:%.dll=)
143 EXE_TEMP_1 = $(EXE_TEMP_0:%.so=)
144 EXE_TEMP_2 = $(EXE_TEMP_1:%.lib=)
145 EXE_TEMP_3 = $(EXE_TEMP_2:%.elf=%.cpp)
146 EXE_CPPS = $(EXE_TEMP_3:%.exe=%.cpp)
148 # used for compiling multiple source files at the same time with visual cpp.
149 MULTI_BUILD_CMD = $(CC) $(COMPILER_FLAGS) -c `cat $(BUILD_LIST_FILE)` $(OBJECT_NAME_FLAG)$(OBJECT_DIR)/
151 ifeq "$(OMIT_VERSIONS)" ""
152 ifneq "$(CLAM_VERSION_RC_ROOT)" ""
153 VERSION_TARGET = $(CLAM_VERSION_RC_ROOT)_version.rc
157 # if we are cleaning up, then do not generate dependency file.
159 ifneq "$(GENDEPS)" ""
160 EXTRA_FIRST_TARGETS += gendeps
163 # only do the deps generation for makefiles that are properly marked.
164 ifneq "$(findstring __BUILD_STATIC_APPLICATION__, $(DEFINITIONS))" ""
165 # generate static build dependencies for all targets in the makefile.
166 GENERATED_DEPS_LIST = $(TARGETS:%.exe=%.gendeps)
168 GENERATED_DEPS_LIST =
173 # Make sure that the directory for objects exists.
174 ACTUAL_FIRST_TARGETS = check_requirements $(EXTRA_FIRST_TARGETS) $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation
176 # Adds the primary targets to the list of products to create.
177 ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%)
178 ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=%.so)
179 ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%$(TRIPART_VERSION).so)
180 ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%$(TRIPART_VERSION).library)
181 ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf)
183 # Adds the last few targets that CLAM works on.
184 ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS)
186 ############################################################################
188 # This section defines the rules used to generate various objects from their
191 ############################################################################
193 # The first section provides simplistic pseudo-targets for testing compilation
194 # rather than generating built products.
196 # the blank target is used to (somewhat) safely remove items from the SOURCE
197 # list. it is an empty file that should be able to go in a library archive
198 # without hosing it up.
200 ifeq "$(NO_COMPILE)" ""
201 $(CATCHER)$(CC) -c $(CLAM_SCRIPTS)/cpp/blank_target.c -o $@
205 @echo There is a problem with the makefile in the SOURCE variable.
206 @echo The offending item is: $@
207 $(HIDESH)$(CLAM_SCRIPTS)/exit_make.sh
209 ## faked debug object.
211 #ifeq "$(NO_COMPILE)" ""
213 # $(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$(TEMP)/$@
217 # recreate dependencies for static applications.
219 @echo "Generating Static Deps: $*.cpp"
220 $(CATCHER)$(CLAM_SCRIPTS)/cpp/buildor_gen_deps.sh "$*.cpp"
223 ############################################################################
225 # trying to delay loading this as long as possible so the built in rule system for CLEANUPS can run with the right values.
226 # so far not working right!
229 # Adds the main CLAM system in to get some work done. This should be placed
230 # after the module rules are defined and before the module targets are
234 ############################################################################
236 # this adds in a customization for the cleanup variables, since the base
237 # clam code has no idea about a dynamic library directory.
239 cpp_add_to_cleanups_variable:
240 # echo here is actual targets before hand $(ACTUAL_TARGETS)
241 $(eval CLEANUPS = $(ACTUAL_TARGETS:%.exe=%) $(ACTUAL_TARGETS:$(STATIC_LIBRARY_DIR)/%.library=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%.a) $(CLEANUPS) )
242 # echo "IN CPP, new CLEANUPS variable: $(CLEANUPS)"
243 #fodder for anything missing a cleanup.
244 # $(eval CLEANUPS = $(ACTUAL_TARGETS) $(ACTUAL_TARGETS:%.dll=%.so) $(ACTUAL_TARGETS:%.so=%.dll) $(CLEANUPS) )
246 #dynamic is taken care of in clam base still?
248 #hmmm: still should change there in the base and do it
251 ############################################################################
253 # C++ source to object file translation.
254 # if there is a special set of flags for this source file, we use them
255 # instead of the default compiler flags.
257 $(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.cpp
258 ifeq "$(NO_COMPILE)" ""
259 @echo Compiling Object [$(notdir $@)]
260 $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi'
261 $(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@
264 ############################################################################
266 # C source to object file translation.
268 $(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.c
269 ifeq "$(NO_COMPILE)" ""
270 @echo Compiling Object [$(notdir $@)]
271 $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi'
272 $(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@
275 ############################################################################
277 # resource compiler for windoze.
279 # we currently do not use rc files.
280 $(OBJECT_DIR)/%.res: %.rc
281 ifeq "$(NO_COMPILE)" ""
282 @echo Bogus resource [$@]
286 ############################################################################
288 # creates static libraries.
289 ifneq "$(NO_COMPILE)" ""
290 $(STATIC_LIBRARY_DIR)/%.library:
293 ifeq "$(NO_COMPILE)" ""
294 $(STATIC_LIBRARY_DIR)/%.library: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE)
295 $(HIDER)echo Building Static Library [$(notdir $@)]
296 @echo $@ >$(DIRTY_FILE)
297 $(CATCHER)$(LIBRARY_TOOL) $(LIBRARIAN_FLAGS) $(CREATE_LIBRARY_FLAG)$@ $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%)
298 ifneq "$(OPERATING_SYSTEM)" "UNIX"
300 $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
301 $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
303 #copied from unix above, not right yet, was not right before either though.
305 $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
306 $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
310 ############################################################################
312 # creates dynamic libraries.
314 # we whack any existing LIB file, since we want to use changes in that file
315 # as a clue for when we should rescan the dependencies. we'd be fine if
316 # visual c++ didn't keep an existing LIB if it does not change (even when the
319 ifneq "$(NO_COMPILE)" ""
320 $(DYNAMIC_LIBRARY_DIR)/%.dll:
323 ifeq "$(NO_COMPILE)" ""
324 $(DYNAMIC_LIBRARY_DIR)/%.dll: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(PARAMETER_FILE)
325 $(HIDER)echo Building Dynamic Library [$(notdir $@)]
326 @echo $@ >$(DIRTY_FILE)
327 $(HIDER)rm -f $(@:%.dll=%.lib)
328 echo about to run link tool.
329 $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_RESX_FLAGS) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX)
331 ifeq "$(CLAM_COMPILER_VERSION)" "8"
332 $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2"
334 ifeq "$(CLAM_COMPILER_VERSION)" "10"
335 $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2"
337 ifneq "$(VCPP_VISTA_ICON)" ""
338 $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
342 ifneq "$(NO_COMPILE)" ""
343 $(DYNAMIC_LIBRARY_DIR)/%.so:
346 ifeq "$(NO_COMPILE)" ""
347 $(DYNAMIC_LIBRARY_DIR)/%.so: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE)
348 ifeq "$(CLAM_COMPILER:%_LINUX=LINUX)" "LINUX"
349 $(HIDER)echo Shared [$@]
350 @echo $@ >$(DIRTY_FILE)
351 $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ $(LOAD_FLAG_PREFIX) -shared -Wl,-soname,$*.so $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX)
352 $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
353 $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
357 ############################################################################
359 # creates "exe" executables using all of the appropriate objects.
361 ifneq "$(NO_COMPILE)" ""
365 ifeq "$(NO_COMPILE)" ""
366 $(EXECUTABLE_DIR)/%: $(OBJECT_DIR)/%.obj $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE)
367 $(HIDER)echo Building Application [$(notdir $@)]
368 @echo $@ >$(DIRTY_FILE)
369 $(CATCHER)$(LINK_TOOL) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $< $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@
370 #hmmm: experimental item below.
374 ############################################################################
376 # creates firmware "elf" executables with the proper objects.
378 ifneq "$(NO_COMPILE)" ""
379 $(EXECUTABLE_DIR)/%.elf:
382 ifeq "$(NO_COMPILE)" ""
383 $(EXECUTABLE_DIR)/%.elf: $(OBJECT_DIR)/%.obj $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE)
384 $(HIDER)echo Building Application [$(notdir $@)]
385 @echo $@ >$(DIRTY_FILE)
386 $(CATCHER)$(LINK_TOOL) $(MAP) $(LOAD_FLAG_PREFIX) $< $(LINKER_COMMAND_FILE) $(STARTUP_OBJECT_FILE) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@
388 @echo Hex [$(EXECUTABLE_DIR)/$*.out]
389 $(CATCHER)$(DDUMP_TOOL) $(DDUMP_OPTIONS) $@ -o$(EXECUTABLE_DIR)/$*.out
390 @echo Binary [$(EXECUTABLE_DIR)/$*.bin]
391 $(CATCHER)$(DDUMP_TOOL) $(DDUMP_BIN_OPTIONS) $@ -o$(EXECUTABLE_DIR)/$*.bin
394 ############################################################################
396 # handles creating version resource files if this project has a version.ini.
398 ifeq "$(OMIT_VERSIONS)" ""
399 ifneq "$(CLAM_VERSION_RC_ROOT)" ""
400 # only redo the version resource if it or version.ini is out of date.
401 %_version.rc: version.ini $(PARAMETER_FILE)
402 $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_ENDING) . $(FEISTY_MEOW_GENERATED_STORE)/versions $(PARAMETER_FILE)
406 ############################################################################
408 # Now the active part of the make process...
410 # make sure we really want to include the dependencies file.
411 ifeq "$(TYPE)" "hierarchy"
412 # no dependencies for a simple hierarchy builder.
418 ifneq "$(NO_COMPILE)" ""
419 # non compiling projects do not need dependencies.
422 ifneq "$(REBUILD)" ""
424 # if we are rebuilding everything, we zap the deps file.
425 $(shell rm -f $(DEPS_FILE))
428 # preserves intermediate files from being deleted.
430 .PRECIOUS: $(OBJECT_DIR)/%.obj $(OBJECT_DIR)/%.res $(OBJECT_DIR)/%.resources $(OBJECT_DIR)/%.deps
431 #hmmm: added above deps. maybe not right.
434 # zaps things when they could not be created correctly.
435 ####.DELETE_ON_ERROR:
437 ############################################################################
439 # autodependency file creator. See the make_dep man page for more info.
441 # we do the auto-dependencies unless the disabling flag is set.
442 ifneq "$(NO_DEPS)" ""
443 # makes the dependencies a no-op.
444 deps: $(PARAMETER_FILE)
446 $(DEPS_FILE): $(PARAMETER_FILE)
452 # this causes the dependency file to be regenerated if the sources or libs
453 # have changed. we have to touch the deps file in case it is missing;
454 # makedep does not deal well with that. also, we touch the dirty flag file
455 # to ensure that the fact we redid dependencies for some reason causes us
456 # to re-promote. we only bother with any of this if we know we are going
457 # to really do some compilation; if in non-compile mode, we'll skip it.
458 ifneq "$(NO_COMPILE)" ""
459 # no dependencies in non-compile mode.
463 ifeq "$(LAX_DEPENDENCIES)" ""
464 $(DEPS_FILE): $(SOURCE) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(wildcard *.h) $(EXE_CPPS)
465 else # lax dependencies means create if missing or if parm file changed.
466 $(DEPS_FILE): $(PARAMETER_FILE)
467 endif # !lax dependencies.
468 ifneq "$(CLAM_VERSION_RC_ROOT)" ""
469 ifeq "$(OMIT_VERSIONS)" ""
470 $(DEPS_FILE): $(CLAM_VERSION_RC_ROOT)_version.rc
473 @echo Dependencies [$(notdir $@)]
474 -$(HIDESH)$(CLAM_SCRIPTS)/cpp/preconditions.sh
476 # @echo dep adds: $(DEPENDENCY_ADDITIONS)
477 @$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS)
478 # $(CATCHER)$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS)
479 @echo $@ >$(SUBMAKE_FLAG)
482 # makes the dependencies a no-op for cleaning.
483 deps: $(PARAMETER_FILE)
485 $(DEPS_FILE): $(PARAMETER_FILE)
489 ############################################################################
491 # examines the required variables and complains if they are missing.
493 $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_SCRIPTS)/exit_make.sh; fi'
494 $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_SCRIPTS)/exit_make.sh; fi'
495 $(HIDESH) -c 'if [ ! -d $(FEISTY_MEOW_GENERATED_STORE)/versions ]; then mkdir $(FEISTY_MEOW_GENERATED_STORE)/versions; fi'
497 ############################################################################
499 # includes the auto-dependency information. the dependency file is checked
500 # for being up-to-date. if not, it gets rebuilt and the make is restarted.
504 # thank the buddha for this bit of code, or at least thank this page:
505 # http://stackoverflow.com/questions/5553352/how-do-i-check-if-file-exists-in-makefile
506 ifneq ("$(wildcard $(DEPS_FILE))","")
513 ############################################################################
515 # calls the script for preparing output directories and such.
517 $(HIDESH)$(CLAM_SCRIPTS)/cpp/preconditions.sh
519 ############################################################################
521 # calls the script for copying the final products to the library directory.
522 # we do not bother reporting errors from touch since there will sometimes
523 # not be any objects in the final directory.
525 $(HIDESH)$(CLAM_SCRIPTS)/cpp/postconditions.sh
527 ############################################################################
529 # if REBUILD is defined, then we cause all objects to be recompiled.
530 .PHONY: force_rebuild
533 ifneq "$(REBUILD)" ""
534 # the target below needs the blank rule that it has for this to work.
535 $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(EXE_CPPS:%.cpp=$(OBJECT_DIR)/%.obj) $(LAST_TARGETS): force_rebuild
538 ############################################################################
540 # generate dependencies for any static targets if requested.
541 gendeps: $(GENERATED_DEPS_LIST)
543 ############################################################################