bash ~/feisty_meow/scripts/generator/bootstrap_build.sh
- All the applications can be found in ~/feisty_meow/production/binaries
+ All the applications can be found in $BINDIR
after the build is complete.
Cleaning the Codebase:
but this will trap errors it sees and play the build error
CLAM_ERROR_SOUND.<br>
</big>
- <h4><big>CLAM_BIN</big></h4>
+ <h4><big>CLAM_BINARY_DIR</big></h4>
<big> This is a folder where the helper
- binaries for are located. The default for this is usually
- CLAM_DIR/../bin.<br>
+ binaries for the CLAM makefile system are located. <br>
</big>
<h4><big>CLAM_DIR</big></h4>
<big> This variable points at the location
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
-HTML_OUTPUT = $(PRODUCTION_DIR)/code_guide
+HTML_OUTPUT = $(RUNTIME_DIR)/code_guide
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
#ifdef __WIN32__
astring stub_filename("unpacker_stub.exe");
#endif
- astring repo_dir = "$PRODUCTION_DIR";
+ astring repo_dir = "$RUNTIME_DIR";
astring stub_file = parser_bits::substitute_env_vars
(repo_dir + "/binaries/" + stub_filename, false);
if (!filename(stub_file).exists()) {
int test_runs = 10000;
time_stamp start; // start of test.
- astring bins = environment::get("FEISTY_MEOW_DIR") + "/production/binaries";
+ astring bins = environment::get("$BINDIR");
astring app = bins + "/example_application";
// save real stdout.
int real_stdout = dup(1);
ifeq "$(FEISTY_MEOW_DIR)" ""
export FEISTY_MEOW_DIR := $(CURRENT_DIR)
endif
-ifeq "$(PRODUCTION_DIR)" ""
- export PRODUCTION_DIR = $(FEISTY_MEOW_DIR)/production
-endif
+#ifeq "$(PRODUCTION_DIR)" ""
+# export PRODUCTION_DIR = $(FEISTY_MEOW_DIR)/production
+#endif
ifeq "$(CLAM_DIR)" ""
export CLAM_DIR = $(FEISTY_MEOW_SCRIPTS)/clam
endif
include $(CLAM_DIR)/cpp/rules.def
-do_make: start_make $(PRODUCTION_DIR)/binaries/manifest.txt end_make
+do_make: start_make $(RUNTIME_DIR)/binaries/manifest.txt end_make
start_make: show_date.start
end_make: show_date.end
-$(PRODUCTION_DIR)/binaries/manifest.txt: $(PARAMETER_FILE)
+$(RUNTIME_DIR)/binaries/manifest.txt: $(PARAMETER_FILE)
$(HIDESH) -c '\
if [ ! -d "$(EXECUTABLE_DIR)" ]; then mkdir -p "$(EXECUTABLE_DIR)"; fi; \
if [ $$? -ne 0 ]; then \
echo build failure while copying paths initialization file.; \
exit 1; \
fi; \
-bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BINARY_DIR)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
if [ $$? -ne 0 ]; then \
echo build failure during value tagging.; \
exit 1; \
fi; \
-bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/write_build_config$(EXE_END); \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BINARY_DIR)/write_build_config$(EXE_END); \
if [ $$? -ne 0 ]; then \
echo build failure while writing config.; \
exit 1; \
#!/bin/bash
-DA_DIR="$PRODUCTION_DIR/binaries"
+DA_DIR="$RUNTIME_DIR/binaries"
rm -f $DA_DIR/AxInterop.*.dll \
$DA_DIR/DevAge*dll \
[manifest]
-output=$BUILD_TOP/production/binaries/manifest.txt
+output=$BINDIR/manifest.txt
[searches]
DEFINE_OUTCOME=1
#!/bin/bash
-if [ ! -d $PRODUCTION_DIR/install ]; then mkdir $PRODUCTION_DIR/install; fi
+if [ ! -d $RUNTIME_DIR/install ]; then mkdir $RUNTIME_DIR/install; fi
echo exe ending is $EXE_END
-rm -f $PRODUCTION_DIR/install/example_bundle$EXE_END
+rm -f $RUNTIME_DIR/install/example_bundle$EXE_END
-$EXECUTABLE_DIR/bundle_creator -o $PRODUCTION_DIR/install/example_bundle$EXE_END -m ./example_manifest.txt
+$EXECUTABLE_DIR/bundle_creator -o $RUNTIME_DIR/install/example_bundle$EXE_END -m ./example_manifest.txt
; operating systems and is blank for others (so far).
[using_vars]
-source=$CLAM_BIN/value_tagger$EXE_END
+source=$CLAM_BINARY_DIR/value_tagger$EXE_END
target=$TMP/using_varsilator$EXE_END
; variables in the source get resolved at packing time.
; variables in the target get resolved during unbundling time.
version=$1
-INSTDIR=$PRODUCTION_DIR/install
+INSTDIR=$RUNTIME_DIR/install
if [ ! -d "$INSTDIR" ]; then mkdir "$INSTDIR"; fi
# the new packages are named after the build version.
echo
echo Creating source package in `basename $source_pack`
-$PRODUCTION_DIR/binaries/bundle_creator -o $source_pack -m ./whole_build_manifest.txt --keyword sources
+$RUNTIME_DIR/binaries/bundle_creator -o $source_pack -m ./whole_build_manifest.txt --keyword sources
echo
echo Creating full build package in `basename $total_build`
-$PRODUCTION_DIR/binaries/bundle_creator -o $total_build -m ./whole_build_manifest.txt
+$RUNTIME_DIR/binaries/bundle_creator -o $total_build -m ./whole_build_manifest.txt
PROJECT = Whole_Build_Pack
FIRST_TARGETS = create_package
-CLEANUPS = $(PRODUCTION_DIR)/install/whole_build*
+CLEANUPS = $(RUNTIME_DIR)/install/whole_build*
TYPE = hierarchy
export TARGET=/tmp/zz_wholebuild_$(USER)
create_package:
ifeq "$(NO_BUILD_PACK)" ""
- $(HIDE)-mkdir -p $(TARGET)/waste
+#will it fail? $(HIDE)-mkdir -p $(TARGET)/waste
$(HIDESH)create_whole_build_pack.sh "$(major).$(minor).$(revision).$(build)"
endif
; variables used during installation.
[set_temp]
-variable=TEMP=$TARGET/waste
+variable=TEMP=$TARGET/waste-buildpack
keyword=sources
[set_tmp]
-variable=TMP=$TARGET/waste
+variable=TMP=$TARGET/waste-buildpack
keyword=sources
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
recurse=1
[binaries]
-source=$PRODUCTION_DIR/binaries
-target=$TARGET/production/binaries
+source=$RUNTIME_DIR/binaries
+target=$TARGET/runtime/binaries
recurse=1
[clam_bin]
-source=$PRODUCTION_DIR/clam_bin
-target=$TARGET/production/clam_bin
+source=$RUNTIME_DIR/clam_bin
+target=$TARGET/runtime/clam_bin
recurse=1
[packages]
-source=$PRODUCTION_DIR/packages
-target=$TARGET/production/packages
+source=$RUNTIME_DIR/packages
+target=$TARGET/runtime/packages
recurse=1
[win32_helper]
if [ -f $genlinx_js ]; then rm $genlinx_js; fi
if [ -f $genlinx_moz ]; then rm $genlinx_moz; fi
-$PRODUCTION_DIR/binaries/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx
+$RUNTIME_DIR/binaries/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx
if [ $? != 0 ]; then
echo error during sorting of the bookmarks.
exit 1
fi
-$PRODUCTION_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx -s human
+$RUNTIME_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx -s human
if [ $? != 0 ]; then
echo error during creation of the normal web page of bookmarks.
exit 1
fi
-$PRODUCTION_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx_moz -s mozilla
+$RUNTIME_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx_moz -s mozilla
if [ $? != 0 ]; then
echo error during creation of the mozilla format page of bookmarks.
exit 1
fi
-$PRODUCTION_DIR/binaries/js_marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js
+$RUNTIME_DIR/binaries/js_marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js
if [ $? != 0 ]; then
echo error during creation of the javascript bookmark page.
exit 1
cp fortunes.dat \
/usr/lib/cgi-bin
-cp ~fred/feisty_meow/production/binaries/*nechung* /usr/lib/cgi-bin
+cp $BINDIR/*nechung* /usr/lib/cgi-bin
chmod a+x /usr/lib/cgi-bin/*
# set versions on any extras that were specified in the makefile.
if [ ! -z "$EXTRA_VERSIONS" ]; then
for i in $EXTRA_VERSIONS; do
- $CLAM_BIN/version_stamper$EXE_END $i $PARAMETER_FILE
+ $CLAM_BINARY_DIR/version_stamper$EXE_END $i $PARAMETER_FILE
done
fi
ifneq "$(VERSION_RC_ROOT)" ""
# only redo the version resource if it or version.ini is out of date.
%_version.rc: version.ini $(PARAMETER_FILE)
- $(CATCHER)$(CLAM_BIN)/version_stamper$(EXE_END) . $(PARAMETER_FILE)
+ $(CATCHER)$(CLAM_BINARY_DIR)/version_stamper$(EXE_END) . $(PARAMETER_FILE)
endif
endif
-$(HIDESH)$(CLAM_DIR)/cpp/preconditions.sh
@touch $@
# @echo dep adds: $(DEPENDENCY_ADDITIONS)
- @$(CLAM_BIN)/makedep$(EXE_END) $(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)
-# $(CATCHER)$(CLAM_BIN)/makedep$(EXE_END) $(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)
+ @$(CLAM_BINARY_DIR)/makedep$(EXE_END) $(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)
+# $(CATCHER)$(CLAM_BINARY_DIR)/makedep$(EXE_END) $(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)
@echo $@ >$(SUBMAKE_FLAG)
endif # non-compile.
endif # no-deps.
endif
ifeq "$(PARAMETER_FILE)" ""
# last ditch attempt to get one that will work.
- export PARAMETER_FILE = $(PRODUCTION_DIR)/build.ini
+ export PARAMETER_FILE = $(PRODUCTION_DIR)/feisty_meow_config.ini
endif
###############################################################################
# endif
#endif
-#export CLAM_BIN = $(CLAM_DIR)/../bin
+#export CLAM_BINARY_DIR = $(CLAM_DIR)/../bin
###############################################################################
--- /dev/null
+#!/bin/bash\r
+declare -a flipped=()\r
+for i in $*; do\r
+ flip=$(echo $i | sed -e 's/\/\([a-zA-Z]\)\//\1:\//' | tr '/' '\\')\r
+ flipped+=($flip)\r
+done\r
+${FRAMEWORK_DIR}/csc ${flipped[*]}\r
+\r
--- /dev/null
+#!/bin/bash
+# copies the final products of the current project into the repository.
+
+# check whether a failure should prevent promotion from occurring.
+if [ -f $FAILURE_FILE ]; then
+ echo Postconditions will not promote due to a failure:
+ cat $FAILURE_FILE
+ . $CLAM_DIR/exit_make.sh
+fi
+
+# make sure that we actually did something during the make.
+if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then
+ # nothing was built, seemingly, so we do no promotion.
+ exit
+fi
+
+# toss the flag files so we don't see them again.
+rm -f "$DIRTY_FILE" "$SUBMAKE_FLAG"
+
+# clean up generated resource files after the build.
+for i in *.resources; do rm -f "$i"; done
+
+# these variables define the locations for final products. all of them
+# descend from the root of the repository.
+ROOT=$TARGETS_DIR
+LIB_DIR=$ROOT/lib
+DLL_DIR=$ROOT/dll
+EXE_DIR=$ROOT/exe
+TEST_ROOT=$ROOT/tests
+TEST_DIR=$TEST_ROOT/$PROJECT
+
+# causes the shell to quit.
+DIE=". $CLAM_DIR/exit_make.sh"
+
+if [ "$TYPE" = "library" ]; then
+
+ # make sure the required directories exist.
+ if [ ! -d $ROOT ]; then mkdir $ROOT; fi
+ if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi
+ if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi
+
+ if [ -z "$NO_COMPILE" ]; then
+ # we ensure that none of the normal products are copied for a non-compiling
+ # style of project.
+
+ # copy the import libraries for any DLLs.
+ if [ ! -z "`$FIND "$DYNAMIC_LIBRARY_DIR" -iname "*.lib"`" ]; then
+ echo Moving import libraries to $LIB_DIR.
+ mv "$DYNAMIC_LIBRARY_DIR"/*.lib $LIB_DIR
+ fi
+
+ fi
+
+elif [ "$TYPE" = "application" ]; then
+
+ # sets up the directory for executable programs and copies any found in the
+ # this project's final directory.
+
+ # first make sure the executable directory is around.
+ if [ ! -d $EXE_DIR ]; then mkdir $EXE_DIR; fi
+
+ if [ -z "$NO_COMPILE" ]; then
+ # we ensure that none of the normal products are copied for a non-compiling
+ # style of project.
+
+ # copy anything extra over.
+ if [ ! -z "$EXTRA_COPIES" ]; then
+ echo Copying extra files to $EXE_DIR.
+ echo [$EXTRA_COPIES]
+ cp -f $EXTRA_COPIES $EXE_DIR || $DIE
+ fi
+
+ fi
+
+elif [ "$TYPE" = "test" ]; then
+
+ # sets up a directory for test programs based on the project name and copies
+ # the generated programs into there.
+
+ # first make sure the test program root directory is around.
+ if [ ! -d $TEST_ROOT ]; then mkdir $TEST_ROOT; fi
+
+ # create the target directory if it doesn't exist.
+ if [ ! -d $TEST_DIR ]; then mkdir $TEST_DIR; fi
+
+ if [ -z "$NO_COMPILE" ]; then
+ # we ensure that none of the normal products are copied for a non-compiling
+ # style of project.
+
+ # make the files writable. this is required for some tests' data files,
+ # which come in from the build and could be read-only.
+ chmod 777 $TEST_DIR/* $TEST_DIR/*/* $TEST_DIR/*/*/* >/dev/null 2>&1
+
+ # copy anything extra over.
+ if [ ! -z "$EXTRA_COPIES" ]; then
+ echo Copying extra files to $TEST_DIR.
+ echo [$EXTRA_COPIES]
+ cp -f $EXTRA_COPIES $TEST_DIR || $DIE
+ fi
+
+ fi
+
+else
+ echo "Unknown type for project [$TYPE]; cancelling postconditions!"
+ . $CLAM_DIR/exit_make.sh
+fi
+
--- /dev/null
+#!/bin/bash
+# prepares the project for compilation by creating the appropriate directories.
+
+# make sure the top-level repository exists.
+if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir $FEISTY_MEOW_DIR; fi
+# make sure our temp directory is there.
+if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi
+# make sure the generated files have a home.
+if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi
+# create the generated files storage area.
+if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi
+# create the top level object directory if it doesn't exist.
+if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi
+# create the project level object directory if it is non-existent.
+if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi
+# create a directory to hold any debugging files, if necessary.
+if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi
+#
+if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi
+#
+if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi
+#
+if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi
+#
+if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi
+
+# set versions on any extras that were specified in the makefile.
+if [ ! -z "$EXTRA_VERSIONS" ]; then
+ for i in $EXTRA_VERSIONS; do $CLAM_BINARY_DIR/version_stamper$EXE_END $i $PARAMETER_FILE; done
+fi
+
+# create all the directories that objects will go into.
+###for i in $OUTPUT_DIRECTORY_LIST; do
+### if [ ! -d "$OUTPUT_PATH/$i" ]; then mkdir "$OUTPUT_PATH/$i"; fi
+###done
+
+# for firmware compilations set the compiler to the correct processor platform
+if [ "$COMPILER" = "DIAB" ]; then
+ $COMPILER_CONTROL $COMPILER_CONTROL_FLAGS
+fi
+
--- /dev/null
+
+
+this is out of date!
+
+it used to compile c# assets on windows pretty well.
+now it probably does nothing.
+
+we intend to refurbish it for use with mono.
+
--- /dev/null
+###############################################################################
+
+# CLAM System default rules and targets for C++ compilation.
+
+# This file composite macros and rules for creating compilation objects
+# (such as library archives, object files, executable programs, and others).
+
+# This file should be included in the user's Makefile after the variables
+# have been initialized appropriately for the particular project being
+# compiled. The user's own targets should be placed after the include
+# directive that specifies this file.
+
+###############################################################################
+
+# This section manipulates variable values to prepare them for their use
+# in the standard CLAM support.
+
+# Modify the output directory for executable files if we're building a
+# test project.
+ifeq "$(TYPE)" "test"
+ EXECUTABLE_DIR = $(TARGETS_DIR)/tests/$(PROJECT)
+ ifneq "$(CONSOLE_MODE)" ""
+ COMPILER_FLAGS += -target:exe
+ else
+ COMPILER_FLAGS += -target:winexe
+ endif
+endif
+ifeq "$(TYPE)" "application"
+ ifneq "$(CONSOLE_MODE)" ""
+ COMPILER_FLAGS += -target:exe
+ else
+ COMPILER_FLAGS += -target:winexe
+ endif
+endif
+ifeq "$(TYPE)" "library"
+ COMPILER_FLAGS += -target:library
+endif
+
+# prep the actual source variable so that certain file names are translated.
+ACTUAL_RESX = $(RESX:%.resx=%.resources)
+
+ifeq "$(OP_SYSTEM)" "WIN32"
+ ifneq "$(OMIT_VERSIONS)" ""
+ # remove version rc files if we're not dealing with versions.
+ ACTUAL_RESOURCE = $(RESOURCE:%.rc=)
+ else
+ ACTUAL_RESOURCE = $(RESOURCE:%.rc=%.res)
+ endif
+else
+ # replace this when supporting resource files on unix.
+ ACTUAL_RESOURCE = $(RESOURCE:%.rc=)
+endif
+
+# patch the sources so that subdirs work.
+ACTUAL_SOURCE = $(SOURCE:%.cs=$(CURRENT_DIR)/%.cs)
+
+# visual studio settings.
+ifeq "$(COMPILER)" "VISUAL_CPP"
+ # processes the def file for linkage, if one has been specified.
+ ifneq "$(DEF_FILE)" ""
+ LOAD_FLAG_PREFIX += -def:$(DEF_FILE)
+ endif
+
+ # these are loaded after any special debugging libs.
+ ifneq "$(VCPP_USE_BASE)" ""
+ # the first set will be included in almost any old program. we include
+ # winmm for multimedia in the base support since we make heavy use of the
+ # more accurate uptime function.
+# LOAD_FLAG_PREFIX += advapi32.lib kernel32.lib version.lib winmm.lib
+ endif
+#is advapi32 really part of the base required stuff? will it work on
+#win98? how about win95?
+
+ ifneq "$(VCPP_USE_GUI)" ""
+ LOAD_FLAG_PREFIX += comdlg32.lib gdi32.lib user32.lib winspool.lib
+ endif
+
+ ifneq "$(VCPP_USE_OLE)" ""
+ LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib
+ VCPP_USE_RPC = t
+ endif
+ ifneq "$(VCPP_USE_RPC)" ""
+ LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib
+ VCPP_USE_SOCK = t
+ endif
+ ifneq "$(VCPP_USE_SOCK)" ""
+ LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib
+ endif
+endif
+
+# Updates the search path for the compiler and local libraries.
+BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS)
+HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR)
+
+LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \
+ $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS)
+
+# Adds some directories that must be searched onto the search path for
+# header files, such as the compiler's own special header file directory.
+COMPILER_FLAGS += $(DEFINITIONS:%=-D:%) $(UNDEFINITIONS:%=-U%)
+#$(HEADER_SEARCH_PATH:%=-I%)
+
+# The load flags are updated by looking for code libraries in the directories
+# to search and by adding all of the code libraries that are used.
+LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%)
+LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%)
+
+# prepare for mfc style DLLs. currently we plan on all dlls we create being
+# based on MFC. this is an unfortunate requirement for using the mfc debug
+# support for allocations; if regular new and DEBUG_NEW get mixed together,
+# crashes used to result. supposedly these are gone now at least.
+ifneq "$(USE_MFC)" ""
+ # set the flag that says we are doing mfc extension dlls.
+ DEFINITIONS += _AFXDLL
+
+ # add in the mfc directories.
+ COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include
+ COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib
+endif
+
+ifeq "$(OMIT_VERSIONS)" ""
+ ifneq "$(VERSION_RC_ROOT)" ""
+ VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc
+ endif
+endif
+
+# Make sure that the directory for objects exists.
+ACTUAL_FIRST_TARGETS = check_requirements $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation
+
+# Adds the primary targets to the list of products to create.
+ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe)
+ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary)
+ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%.so)
+ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%.library)
+ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf)
+
+# Adds the last few targets for CLAM to do.
+ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS)
+
+############################################################################
+
+# This section defines the rules used to generate various objects from their
+# source files.
+
+############################################################################
+
+# resource compiler for c#.
+
+%.resources: %.resx
+ @echo Creating resource file [$@].
+ $(RC) $< $@
+# $(CATCHER)$(RC) $< $@
+
+############################################################################
+
+# resource compiler for standard resource files.
+
+ifeq "$(OP_SYSTEM)" "WIN32"
+%.res: %.rc
+ @echo Creating resource file [$@].
+ifeq "$(NO_COMPILE)" ""
+ $(CATCHER)$(STANDARD_RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $<
+endif
+endif
+
+############################################################################
+
+# creates dynamic libraries.
+
+# we whack any existing LIB file, since we want to use changes in that file
+# as a clue for when we should rescan the dependencies. we'd be fine if
+# visual c++ didn't keep an existing LIB if it doesn't change (even when the
+# DLL does).
+
+$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE)
+ $(HIDER)echo Creating dynamic library [$@].
+ @echo $@ >$(DIRTY_FILE)
+ $(HIDER)rm -f $(@:%.dll=%.lib)
+ $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%)
+ifneq "$(VCPP_VISTA_ICON)" ""
+ $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
+endif
+ $(HIDER)mv $@ $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
+ifneq "$(CREATE_TLB)" ""
+ $(CATCHER)$(TLBEXPORT) $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -out:$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*.tlb
+endif
+ $(HIDER)echo nil >$@
+
+#$(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX)
+
+############################################################################
+
+# creates "exe" executables using all of the appropriate objects.
+$(EXECUTABLE_DIR)/%.exe: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE)
+ $(HIDER)echo Building program [$@].
+ @echo $@ >$(DIRTY_FILE)
+ $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%)
+ifneq "$(VCPP_VISTA_ICON)" ""
+ $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
+endif
+
+############################################################################
+
+# handles creating version resource files if this project has a version.ini.
+
+ifeq "$(OMIT_VERSIONS)" ""
+ ifneq "$(VERSION_RC_ROOT)" ""
+# only redo the version resource if it or version.ini is out of date.
+%_version.rc: version.ini $(PARAMETER_FILE)
+ $(CATCHER)$(CLAM_BINARY_DIR)/version_stamper$(EXE_END) . $(PARAMETER_FILE)
+ endif
+endif
+
+############################################################################
+
+# Now the active part of the make process...
+
+# Adds the main CLAM system in to get some work done. This should be placed
+# after the module's rules are defined and before the module's targets are
+# defined.
+include rules.def
+
+# preserves intermediate files from being deleted.
+##.PRECIOUS: %.resources
+
+# zaps things when they could not be created correctly.
+.DELETE_ON_ERROR:
+
+############################################################################
+
+# examines the required variables and complains if they're missing.
+check_requirements:
+ $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi'
+ $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi'
+
+############################################################################
+
+# calls the script for preparing output directories and such.
+pre_compilation:
+ $(HIDESH)$(CLAM_DIR)/csharp/preconditions.sh
+
+############################################################################
+
+# calls the script for copying the final products to the library directory.
+# we don't bother reporting errors from touch since there will sometimes
+# not be any objects in the final directory.
+post_compilation:
+ $(HIDESH)$(CLAM_DIR)/csharp/postconditions.sh
+
+############################################################################
+
+# if REBUILD is defined, then we cause all objects to be recompiled.
+.PHONY: force_rebuild
+force_rebuild:
+
+ifneq "$(REBUILD)" ""
+ # the target below needs the blank rule that it has for this to work.
+ $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(LAST_TARGETS): force_rebuild
+endif
+
+############################################################################
+
--- /dev/null
+###############################################################################
+
+# CLAM System default variable definitions for C# compilation.
+
+###############################################################################
+
+# Pull in the base support for CLAM.
+include variables.def
+
+###############################################################################
+
+#CLAM_BINARY_DIR = $(CLAM_DIR)/../bin
+
+###############################################################################
+
+ifneq "$(BUILD_PARAMETER_FILE)" ""
+ # define our version of the build parameter file. this should be set
+ # beforehand so we override the default parameter file for clam.
+ export PARAMETER_FILE = $(BUILD_PARAMETER_FILE)
+###no: $(FEISTY_MEOW_DIR)/build/identity.ini
+endif
+ifeq "$(PARAMETER_FILE)" ""
+ # last ditch attempt to get one that will work.
+ export PARAMETER_FILE = $(FEISTY_MEOW_DIR)/build.ini
+endif
+
+###############################################################################
+
+# BASE_CPU is a flag that distinguishes the type of processor, if necessary.
+export BASE_CPU
+#BASE_CPU = m68k
+ # motorola 68000 series.
+#BASE_CPU = m68340
+ # motorola 68340.
+#BASE_CPU = x86
+ # intel x86.
+#BASE_CPU = ppc860
+ # power pc 860.
+
+# set the CPU default if we do not have one.
+ifeq "$(BASE_CPU)" ""
+ BASE_CPU = x86
+endif
+
+# COMPILER is a flag that specifies the operating system or the compiler for
+# use in conditional compilation (#ifdef ... #endif) of the compiler dependent
+# interfaces or implementations.
+export COMPILER
+#COMPILER = VISUAL_CPP
+
+# choose a default compiler if none was specified.
+ifeq "$(COMPILER)" ""
+ COMPILER = VISUAL_CPP
+endif
+
+# COMPILER_VERSION specifies the version of a particular compiler, if this is
+# needed to distinguish how the code is built.
+export COMPILER_VERSION
+
+###############################################################################
+
+# "TYPE" is the kind of product being generated by this project. this is
+# used to decide where to put the final products of compilation. this is a
+# variable in the user's makefile.
+# Valid Types:
+# TYPE = library (outputs are static or dynamic libraries)
+# TYPE = application (outputs are main-line executables)
+# TYPE = test (outputs are test programs)
+export TYPE
+
+###############################################################################
+
+# pseudo-boolean variable section. if these have any value at all, then they
+# are treated as being true. note that these are flags that should generally
+# be passed on the command line to a make. if they are intended to be used
+# from inside a makefile, then they must appear before this file is included.
+
+# "REBUILD" causes a rebuild of all source files if it's true.
+export REBUILD
+
+# "DEBUG" is used to specify a debugging build. the default is for this to
+# be false, which causes a release build.
+export DEBUG
+
+# "OPTIMIZE" creates optimized code.
+export OPTIMIZE
+
+# "NO_COMPILE" just runs through the targets without compiling. it still
+# promotes headers however.
+export NO_COMPILE
+
+# "BUILD_LIST_FILE" is the set of files that need to be recompiled for
+# visual c++.
+export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT)
+
+# "BUILD_WHACK_FILE" is the set of object files that should be removed if
+# a build failure occurs.
+export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT)
+
+# we're adding the build list to the flag files so we know it gets cleaned up.
+FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE)
+
+###############################################################################
+
+# This section implements the HOOPLE directory scheme. If your scheme differs,
+# then you'll want to modify these appropriately.
+
+# "THIRD_PARTY_DIR" is the root of our support libraries.
+ifeq "$(OP_SYSTEM)" "UNIX"
+ export THIRD_PARTY_DIR
+endif
+ifeq "$(OP_SYSTEM)" "WIN32"
+ export THIRD_PARTY_DIR = $(FEISTY_MEOW_DIR)/3rdparty
+endif
+
+# "OUTPUT_ROOT" is the root of all output directories for objects and other
+# products being built.
+export OUTPUT_ROOT = $(TARGETS_DIR)/obj
+
+# "PLATFORM_ADD_IN" is an option discriminator for the intended execution
+# platform. it should end in an underscore if it is provided.
+#PLATFORM_ADD_IN = linux_
+#PLATFORM_ADD_IN = w32_
+PLATFORM_ADD_IN =
+
+# "CPU_BUILD_DIR" distinguishes object directories by including the cpu
+# name and the type of build.
+ifneq "$(DEBUG)" ""
+ CPU_BUILD_DIR = $(BASE_CPU)_dbg
+else
+ CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel
+endif
+
+# "BASE_OUTPUT_PATH" is the parent directory of objects for this type of
+# cpu and this type of build.
+export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR)
+
+# "OUTPUT_PATH" is the directory to generate all compiled products into.
+export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT)
+
+# "OBJECT_DIR" is where object files will be stored during compilation for the
+# target type being produced.
+export OBJECT_DIR = $(OUTPUT_PATH)
+
+# These specify where files are to be created or located for our local build.
+export EXECUTABLE_DIR = $(TARGETS_DIR)/exe
+export DYNAMIC_LIBRARY_DIR = $(TARGETS_DIR)/dll
+export STATIC_LIBRARY_DIR = $(TARGETS_DIR)/lib
+export TESTS_DIR = $(TARGETS_DIR)/tests
+
+# "HEADER_SEARCH_PATH" is where the class interface files are to be found.
+#HEADER_SEARCH_PATH =
+
+# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found.
+HOOPLE_HEADERS := $(shell $(FIND) $(FEISTY_MEOW_DIR)/source/lib_src $(FEISTY_MEOW_DIR)/libraries -mindepth 1 -maxdepth 1 -type d)
+
+# "LOCAL_HEADERS" are overrides that go first in the header search path.
+#LOCAL_HEADERS =
+
+# "CODEBASE_HEADERS" is a list that can be changed for a particular codebase.
+# it is guaranteed that clam will not interfere with this list, whereas
+# the LOCAL_HEADERS can be modified by clam.
+#CODEBASE_HEADERS =
+
+# "LOCAL_LIBRARIES" are overrides that go first in the library search path.
+#LOCAL_LIBRARIES =
+
+# "LIBRARY_SEARCH_PATH" is where the library files are to be found.
+#LIBRARY_SEARCH_PATH =
+
+# "HOOPLE_LIBRARIES" is where our local libraries are located.
+HOOPLE_LIBRARIES =
+
+# "EXTRA_COPIES" is a list of files that are copied to a project's output
+# directory.
+export EXTRA_COPIES
+
+# "EXTRA_VERSIONS" is a list of version files to synchronize with the main
+# library version for this build. if a file called "version.ini" exists in
+# the project directory, then it will automatically be upgraded, so the
+# extra version files are mainly useful when you have a project with multiple
+# programs in it and you want them to have independent version files (as you
+# should perhaps want).
+export EXTRA_VERSIONS
+
+# "OMIT_VERSIONS" is another exclusion flag. this one turns off the creation
+# of version resource files and eliminates any references that would include
+# such files. this is needed when rebuilding version_stamper.
+#OMIT_VERSIONS = t
+
+# Add the obligatory junk to be cleaned up. Individual compiler sections
+# should customize this by adding their object output directories.
+CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH)
+#hmmm: import libs for dynamic libraries on ms-win32 don't currently get
+# cleaned up nicely.
+
+###############################################################################
+
+# "SEARCH_DIRS" is a list of directories that should be searched for both C++
+# header files and for C++ code libraries. The items placed in SEARCH_DIRS
+# are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH.
+#SEARCH_DIRS =
+
+# "DEFINITIONS" is a list of compiler flags that define the value of c macros.
+# These usually have the format of -D<flag>, but in this variable, only the
+# <flag> itself should be listed because the compiler option -D is added
+# automatically.
+DEFINITIONS = CLAM_BUILT
+
+ifneq "$(BOOT_STRAPPING)" ""
+ # the software is being built from the ground up, including the binaries
+ # we use for building (like value_tagger and others).
+ DEFINITIONS += BOOT_STRAPPING
+endif
+
+# "UNDEFINITIONS" is a list of macros to undefine.
+#UNDEFINITIONS =
+
+#hmmm: these kinds of defines (with a value) do not work for csharp.
+# GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base
+# with some branding. It is provided as a macro definition to all source
+# files. The initial value for the macro should come from the build init
+# file, but if it doesn't, we pick a default.
+##ifeq "$(product_name)" ""
+## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"HOOPLE\\\"
+##else
+## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"$(product_name)\\\"
+##endif
+
+# *_PRODUCT_VERSION records parts of our version numbers for the code to see.
+###DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor)
+
+# "DEBUG_FLAGS" these flags are used for generating specialized versions of
+# object files, such as ones that include debugging code or that add code for
+# profiling.
+# Possible values are -g for adding GDB debugging code and -pg for adding
+# gprof profiling code.
+#DEBUG_FLAGS = -g
+#DEBUG_FLAGS = -pg
+#DEBUG_FLAGS =
+
+# "COMPILER_FLAGS" are the flags for the pre-processor and compiler.
+#COMPILER_FLAGS =
+
+# "STRICT_WARNINGS" turns on all warnings and forces them to be considered
+# as errors when encountered.
+#STRICT_WARNINGS =
+
+# "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool
+# that creates static code libraries.
+#LIBRARIAN_FLAGS =
+
+# "SOURCE" is the list of files that are turned into objects.
+#SOURCE =
+
+# "LIBS_USED" are system or compiler code libraries that the targets to be
+# created depend upon.
+#LIBS_USED =
+
+# "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries
+# actually cause executables and object files to be recompiled when the
+# libraries specified have changed. To accomplish this, these libraries MUST
+# be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place
+# on the LIBRARY_SEARCH_PATH.
+#LOCAL_LIBS_USED =
+
+# Load flags tell the linker and loader how to deal with the files and where
+# to locate library components. The prefix goes before object files are
+# listed, and the suffix after. The prefix should have things like the
+# directories to be searched for code libraries (although they should be added
+# to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic).
+# In the suffix, actual library loading statements (like -lmath) can be
+# included (although they should be listed in a different form in LIBS_USED).
+# Remember that the unix loader looks for functions in libraries in a bizarre
+# way: ld searches for a function only when it has already been asked for it.
+# This means that it doesn't remember what functions it has already been
+# provided with in the libraries and object files, and it will fail if those
+# functions are only asked for after they have already been encountered.
+#LOAD_FLAG_PREFIX =
+#LOAD_FLAG_SUFFIX =
+
+# The prefix used on library names, mostly for unix.
+LIB_PREFIX =
+# The standard suffix for static or import libraries on this operating system.
+LIB_ENDING =
+
+# Flag for specifying the library name to create.
+#CREATE_LIBRARY_FLAG =
+
+# Flag for specifying a library to include in linking.
+LIBRARY_NAME_FLAG = -l
+
+# Flag for specifying a directory to add to the search path for libs.
+#LIBRARY_PATH_FLAG = -L
+
+# Flag for specifying the name of an output from the linker.
+#LINKER_OUTPUT_FLAG =
+
+# Flag for separating linker options from compilation options for a combined
+# compiler / linker.
+#LINKER_OPTION_SEPARATOR =
+
+# Flag that passes special options when building executable programs. It is
+# passed just before the LOAD_FLAG_PREFIX.
+#EXE_FLAGS =
+
+# The name of the compiler tool.
+#CC =
+
+# The name of the library creator tool.
+#LIBRARY_TOOL =
+
+# the root name of the version file. This is currently irrelevant on
+# non-win32 platforms.
+VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_DIR)/cpp/rc_name.sh)
+ # we import the rc_name from our close ally, the c++ compiler definitions.
+
+###############################################################################
+
+# Compiler Dependent Flags
+#
+# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location.
+# "COMPILER_HEADER_DIR" is where the compiler's headers are.
+export COMPILER_HEADER_DIR
+# "COMPILER_LIBRARY_DIR" is where archived libraries are.
+# "CC" is the name of the C++ compiler to be used.
+
+ifeq "$(COMPILER)" "VISUAL_CPP"
+ # microsoft visual studio 7.
+
+ LIB_ENDING = .dll
+ PLATFORM_ADD_IN = w32_
+
+ # these define special characteristics for a program being built.
+ # BASE is almost always defined and pulls in fundamental w32 support.
+ # RPC supplies the remote procedure call libraries.
+ # OLE pulls in object linking and embedding support.
+ # SECURITY links with the w32 security APIs.
+ # CLR sets options that are appropriate for managed code.
+ VCPP_USE_BASE=true
+ VCPP_USE_RPC=
+ VCPP_USE_OLE=
+ VCPP_USE_SECURITY=
+ VCPP_USE_CLR=
+ VCPP_VISTA_ICON=
+
+ # the framework dir points at the .net framework to be used for compilation.
+ ifeq "$(FRAMEWORK_VERSION)" ""
+
+ # older .net 1.1.
+# SHORT_FRAMEWORK_VERSION = 1.1
+# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322
+
+ # old .net 2.0.
+# SHORT_FRAMEWORK_VERSION = 2.0
+# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727
+
+ # current .net 3.5.
+ SHORT_FRAMEWORK_VERSION = 3.5
+ FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION)
+
+ endif
+ export FRAMEWORK_DIR
+ ifeq "$(FRAMEWORK_DIR)" ""
+ FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION)
+ endif
+
+ # pick a default compiler version for what we tend to use the most at the
+ # current time.
+ ifeq "$(COMPILER_VERSION)" ""
+ COMPILER_VERSION = 7
+ endif
+## DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION)
+ # add a macro so programs can check what version is appropriate.
+
+ # C# needs an entry point for exes. a different one can be specified also.
+ ENTRY_POINT = main
+
+ # C# treats resources differently than simple code files. the list in this
+ # variable will be embedded in the target.
+ #RESX =
+
+ # TLBEXPORT is a tool to create TLB files from DLL files.
+ TLBEXPORT = $(COMPILER_ROOT_DIR)/../SDK/v$(SHORT_FRAMEWORK_VERSION)/bin/tlbexp$(EXE_END)
+
+ # calculate the visual studio root directory.
+ export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh $(CLAM_BINARY_DIR) )
+ ifneq "$(VIS_STU_ROOT)" ""
+ COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc#
+ endif
+ ifeq "$(COMPILER_ROOT_DIR)" ""
+ HOSEUP = $(shell echo The compiler directory is not set. Please define the environment )
+ HOSEUP = $(shell echo variable VSxCOMNTOOLS to point at the folder where visual C++ is installed. )
+ HOSEUP =
+ endif
+
+ export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_DIR)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) )
+
+ # set a variable for the resource compiler for old-style resources.
+ STANDARD_RC = $(VIS_STU_ROOT)/vc/bin/rc
+
+ # set up a directory for debugging files to be stored. these are not
+ # moved with the postconditions--they are generated in place.
+ export PDB_DIR=$(TARGETS_DIR)/pdb
+
+ # set these way up here so we can override them later.
+ CC = bash $(CLAM_DIR)/csharp/csharper.sh
+##$(FRAMEWORK_DIR)/csc
+
+# LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link
+
+ # vary the locations for compiler files based on the version.
+ COMPILER_HEADER_DIR = $(VIS_STU_ROOT)/vc/include $(VIS_STU_ROOT)/vc/atlmfc/include $(VIS_STU_ROOT)/vc/platformsdk/include
+ COMPILER_LIBRARY_DIR =
+###$(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib
+ RC = $(COMPILER_ROOT_DIR)/../SDK/v2.0/bin/resgen$(EXE_END)
+
+ ifeq "$(COMPILER_HEADER_DIR)" ""
+ HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.)
+ endif
+
+ DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32_WINNT=0x403
+ DEF_FILE =
+ LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib
+ LOAD_FLAG_PREFIX = -nologo
+#-subsystem:windows -machine:IX86
+ LOAD_FLAG_SUFFIX =
+
+ MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-I% )
+ MIDL_DEFS = -no_robust
+
+ # set the flags used by visual c++.
+ CREATE_LIBRARY_FLAG = -out:
+ LIBRARY_NAME_FLAG = -reference:
+ LIBRARY_PATH_FLAG = -lib:
+ LINKER_OPTION_SEPARATOR = -link
+ LINKER_OUTPUT_FLAG = -out:
+
+ # Add the extra files created by visual c++.
+#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db
+
+ # put the common flags into the compiler flags.
+ COMPILER_FLAGS += -nologo
+#-Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -GX -W3 -Zi -EHsc -GS -Gd
+
+ ifneq "$(DEBUG)" ""
+ # disable function inlining and optimizations for debug.
+# COMPILER_FLAGS += -Ob0 -Od
+ else
+ # enable function inlining for release only.
+# COMPILER_FLAGS += -Ob1
+
+ ifneq "$(OPTIMIZE)" ""
+ # add in fast code optimization.
+#testing...
+# COMPILER_FLAGS += -O2
+#trying O2 again although it seems to combust too easily.
+ else
+ # no optimizations.
+ endif
+
+ endif
+
+ # check if profiling is to be enabled.
+ PROFILER_FLAG =
+ ifneq "$(PROFILE)" ""
+ PROFILER_FLAG = -profile
+ endif
+
+ # add the common linker flags. the debugging flag is added because we
+ # want to be able to debug into release code, but since the pdb files
+ # are separate, we're not exposing ourselves when we don't include them.
+ LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug
+#-warn:3
+
+ # "USE_MFC" dictates whether mfc should be allowed in the application.
+ # the default is not to use MFC extension style dlls. this can be turned
+ # on in the individual makefiles that require MFC.
+ #USE_MFC =
+
+ # the library creator gets a couple of flags.
+ LIBRARIAN_FLAGS += -nologo -machine:IX86
+
+ # now, vary the flag configuration based on the flags that have been set.
+
+ ifneq "$(CONSOLE_MODE)" ""
+ # console type of applications are built using the static flag so that
+ # they are more redistributable.
+ DEFINITIONS += _CONSOLE
+### LOAD_FLAG_SUFFIX += -subsystem:console
+ STATIC = true
+ endif
+
+ # dynamically linked library or application flags.
+ ifneq "$(DEBUG)" ""
+ # debug.
+ DEFINITIONS += _DEBUG
+# COMPILER_FLAGS += -MDd
+ else
+ # release.
+ DEFINITIONS += NDEBUG
+# COMPILER_FLAGS += -MD
+ endif
+
+ ifneq "$(STRICT_WARNINGS)" ""
+# COMPILER_FLAGS += -W3 -WX
+ # we have not turned on W4 because it is not really warnings for the
+ # microsoft compiler. instead, it is a bunch of blather about what the
+ # compiler intends to do rather than problems in the code.
+ endif
+
+endif
+
+
+++ /dev/null
-#!/bin/bash\r
-declare -a flipped=()\r
-for i in $*; do\r
- flip=$(echo $i | sed -e 's/\/\([a-zA-Z]\)\//\1:\//' | tr '/' '\\')\r
- flipped+=($flip)\r
-done\r
-${FRAMEWORK_DIR}/csc ${flipped[*]}\r
-\r
+++ /dev/null
-#!/bin/bash
-# copies the final products of the current project into the repository.
-
-# check whether a failure should prevent promotion from occurring.
-if [ -f $FAILURE_FILE ]; then
- echo Postconditions will not promote due to a failure:
- cat $FAILURE_FILE
- . $CLAM_DIR/exit_make.sh
-fi
-
-# make sure that we actually did something during the make.
-if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then
- # nothing was built, seemingly, so we do no promotion.
- exit
-fi
-
-# toss the flag files so we don't see them again.
-rm -f "$DIRTY_FILE" "$SUBMAKE_FLAG"
-
-# clean up generated resource files after the build.
-for i in *.resources; do rm -f "$i"; done
-
-# these variables define the locations for final products. all of them
-# descend from the root of the repository.
-ROOT=$TARGETS_DIR
-LIB_DIR=$ROOT/lib
-DLL_DIR=$ROOT/dll
-EXE_DIR=$ROOT/exe
-TEST_ROOT=$ROOT/tests
-TEST_DIR=$TEST_ROOT/$PROJECT
-
-# causes the shell to quit.
-DIE=". $CLAM_DIR/exit_make.sh"
-
-if [ "$TYPE" = "library" ]; then
-
- # make sure the required directories exist.
- if [ ! -d $ROOT ]; then mkdir $ROOT; fi
- if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi
- if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi
-
- if [ -z "$NO_COMPILE" ]; then
- # we ensure that none of the normal products are copied for a non-compiling
- # style of project.
-
- # copy the import libraries for any DLLs.
- if [ ! -z "`$FIND "$DYNAMIC_LIBRARY_DIR" -iname "*.lib"`" ]; then
- echo Moving import libraries to $LIB_DIR.
- mv "$DYNAMIC_LIBRARY_DIR"/*.lib $LIB_DIR
- fi
-
- fi
-
-elif [ "$TYPE" = "application" ]; then
-
- # sets up the directory for executable programs and copies any found in the
- # this project's final directory.
-
- # first make sure the executable directory is around.
- if [ ! -d $EXE_DIR ]; then mkdir $EXE_DIR; fi
-
- if [ -z "$NO_COMPILE" ]; then
- # we ensure that none of the normal products are copied for a non-compiling
- # style of project.
-
- # copy anything extra over.
- if [ ! -z "$EXTRA_COPIES" ]; then
- echo Copying extra files to $EXE_DIR.
- echo [$EXTRA_COPIES]
- cp -f $EXTRA_COPIES $EXE_DIR || $DIE
- fi
-
- fi
-
-elif [ "$TYPE" = "test" ]; then
-
- # sets up a directory for test programs based on the project name and copies
- # the generated programs into there.
-
- # first make sure the test program root directory is around.
- if [ ! -d $TEST_ROOT ]; then mkdir $TEST_ROOT; fi
-
- # create the target directory if it doesn't exist.
- if [ ! -d $TEST_DIR ]; then mkdir $TEST_DIR; fi
-
- if [ -z "$NO_COMPILE" ]; then
- # we ensure that none of the normal products are copied for a non-compiling
- # style of project.
-
- # make the files writable. this is required for some tests' data files,
- # which come in from the build and could be read-only.
- chmod 777 $TEST_DIR/* $TEST_DIR/*/* $TEST_DIR/*/*/* >/dev/null 2>&1
-
- # copy anything extra over.
- if [ ! -z "$EXTRA_COPIES" ]; then
- echo Copying extra files to $TEST_DIR.
- echo [$EXTRA_COPIES]
- cp -f $EXTRA_COPIES $TEST_DIR || $DIE
- fi
-
- fi
-
-else
- echo "Unknown type for project [$TYPE]; cancelling postconditions!"
- . $CLAM_DIR/exit_make.sh
-fi
-
+++ /dev/null
-#!/bin/bash
-# prepares the project for compilation by creating the appropriate directories.
-
-# make sure the top-level repository exists.
-if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir $FEISTY_MEOW_DIR; fi
-# make sure our temp directory is there.
-if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi
-# make sure the generated files have a home.
-if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi
-# create the generated files storage area.
-if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi
-# create the top level object directory if it doesn't exist.
-if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi
-# create the project level object directory if it is non-existent.
-if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi
-# create a directory to hold any debugging files, if necessary.
-if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi
-#
-if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi
-#
-if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi
-#
-if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi
-#
-if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi
-
-# set versions on any extras that were specified in the makefile.
-if [ ! -z "$EXTRA_VERSIONS" ]; then
- for i in $EXTRA_VERSIONS; do $CLAM_BIN/version_stamper$EXE_END $i $PARAMETER_FILE; done
-fi
-
-# create all the directories that objects will go into.
-###for i in $OUTPUT_DIRECTORY_LIST; do
-### if [ ! -d "$OUTPUT_PATH/$i" ]; then mkdir "$OUTPUT_PATH/$i"; fi
-###done
-
-# for firmware compilations set the compiler to the correct processor platform
-if [ "$COMPILER" = "DIAB" ]; then
- $COMPILER_CONTROL $COMPILER_CONTROL_FLAGS
-fi
-
+++ /dev/null
-
-
-this is out of date!
-
-it used to compile c# assets on windows pretty well.
-now it probably does nothing.
-
-we intend to refurbish it for use with mono.
-
+++ /dev/null
-###############################################################################
-
-# CLAM System default rules and targets for C++ compilation.
-
-# This file composite macros and rules for creating compilation objects
-# (such as library archives, object files, executable programs, and others).
-
-# This file should be included in the user's Makefile after the variables
-# have been initialized appropriately for the particular project being
-# compiled. The user's own targets should be placed after the include
-# directive that specifies this file.
-
-###############################################################################
-
-# This section manipulates variable values to prepare them for their use
-# in the standard CLAM support.
-
-# Modify the output directory for executable files if we're building a
-# test project.
-ifeq "$(TYPE)" "test"
- EXECUTABLE_DIR = $(TARGETS_DIR)/tests/$(PROJECT)
- ifneq "$(CONSOLE_MODE)" ""
- COMPILER_FLAGS += -target:exe
- else
- COMPILER_FLAGS += -target:winexe
- endif
-endif
-ifeq "$(TYPE)" "application"
- ifneq "$(CONSOLE_MODE)" ""
- COMPILER_FLAGS += -target:exe
- else
- COMPILER_FLAGS += -target:winexe
- endif
-endif
-ifeq "$(TYPE)" "library"
- COMPILER_FLAGS += -target:library
-endif
-
-# prep the actual source variable so that certain file names are translated.
-ACTUAL_RESX = $(RESX:%.resx=%.resources)
-
-ifeq "$(OP_SYSTEM)" "WIN32"
- ifneq "$(OMIT_VERSIONS)" ""
- # remove version rc files if we're not dealing with versions.
- ACTUAL_RESOURCE = $(RESOURCE:%.rc=)
- else
- ACTUAL_RESOURCE = $(RESOURCE:%.rc=%.res)
- endif
-else
- # replace this when supporting resource files on unix.
- ACTUAL_RESOURCE = $(RESOURCE:%.rc=)
-endif
-
-# patch the sources so that subdirs work.
-ACTUAL_SOURCE = $(SOURCE:%.cs=$(CURRENT_DIR)/%.cs)
-
-# visual studio settings.
-ifeq "$(COMPILER)" "VISUAL_CPP"
- # processes the def file for linkage, if one has been specified.
- ifneq "$(DEF_FILE)" ""
- LOAD_FLAG_PREFIX += -def:$(DEF_FILE)
- endif
-
- # these are loaded after any special debugging libs.
- ifneq "$(VCPP_USE_BASE)" ""
- # the first set will be included in almost any old program. we include
- # winmm for multimedia in the base support since we make heavy use of the
- # more accurate uptime function.
-# LOAD_FLAG_PREFIX += advapi32.lib kernel32.lib version.lib winmm.lib
- endif
-#is advapi32 really part of the base required stuff? will it work on
-#win98? how about win95?
-
- ifneq "$(VCPP_USE_GUI)" ""
- LOAD_FLAG_PREFIX += comdlg32.lib gdi32.lib user32.lib winspool.lib
- endif
-
- ifneq "$(VCPP_USE_OLE)" ""
- LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib
- VCPP_USE_RPC = t
- endif
- ifneq "$(VCPP_USE_RPC)" ""
- LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib
- VCPP_USE_SOCK = t
- endif
- ifneq "$(VCPP_USE_SOCK)" ""
- LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib
- endif
-endif
-
-# Updates the search path for the compiler and local libraries.
-BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS)
-HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR)
-
-LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \
- $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS)
-
-# Adds some directories that must be searched onto the search path for
-# header files, such as the compiler's own special header file directory.
-COMPILER_FLAGS += $(DEFINITIONS:%=-D:%) $(UNDEFINITIONS:%=-U%)
-#$(HEADER_SEARCH_PATH:%=-I%)
-
-# The load flags are updated by looking for code libraries in the directories
-# to search and by adding all of the code libraries that are used.
-LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%)
-LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%)
-
-# prepare for mfc style DLLs. currently we plan on all dlls we create being
-# based on MFC. this is an unfortunate requirement for using the mfc debug
-# support for allocations; if regular new and DEBUG_NEW get mixed together,
-# crashes used to result. supposedly these are gone now at least.
-ifneq "$(USE_MFC)" ""
- # set the flag that says we are doing mfc extension dlls.
- DEFINITIONS += _AFXDLL
-
- # add in the mfc directories.
- COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include
- COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib
-endif
-
-ifeq "$(OMIT_VERSIONS)" ""
- ifneq "$(VERSION_RC_ROOT)" ""
- VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc
- endif
-endif
-
-# Make sure that the directory for objects exists.
-ACTUAL_FIRST_TARGETS = check_requirements $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation
-
-# Adds the primary targets to the list of products to create.
-ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe)
-ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary)
-ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%.so)
-ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%.library)
-ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf)
-
-# Adds the last few targets for CLAM to do.
-ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS)
-
-############################################################################
-
-# This section defines the rules used to generate various objects from their
-# source files.
-
-############################################################################
-
-# resource compiler for c#.
-
-%.resources: %.resx
- @echo Creating resource file [$@].
- $(RC) $< $@
-# $(CATCHER)$(RC) $< $@
-
-############################################################################
-
-# resource compiler for standard resource files.
-
-ifeq "$(OP_SYSTEM)" "WIN32"
-%.res: %.rc
- @echo Creating resource file [$@].
-ifeq "$(NO_COMPILE)" ""
- $(CATCHER)$(STANDARD_RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $<
-endif
-endif
-
-############################################################################
-
-# creates dynamic libraries.
-
-# we whack any existing LIB file, since we want to use changes in that file
-# as a clue for when we should rescan the dependencies. we'd be fine if
-# visual c++ didn't keep an existing LIB if it doesn't change (even when the
-# DLL does).
-
-$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE)
- $(HIDER)echo Creating dynamic library [$@].
- @echo $@ >$(DIRTY_FILE)
- $(HIDER)rm -f $(@:%.dll=%.lib)
- $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%)
-ifneq "$(VCPP_VISTA_ICON)" ""
- $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
-endif
- $(HIDER)mv $@ $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING)
-ifneq "$(CREATE_TLB)" ""
- $(CATCHER)$(TLBEXPORT) $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -out:$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*.tlb
-endif
- $(HIDER)echo nil >$@
-
-#$(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX)
-
-############################################################################
-
-# creates "exe" executables using all of the appropriate objects.
-$(EXECUTABLE_DIR)/%.exe: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE)
- $(HIDER)echo Building program [$@].
- @echo $@ >$(DIRTY_FILE)
- $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%)
-ifneq "$(VCPP_VISTA_ICON)" ""
- $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
-endif
-
-############################################################################
-
-# handles creating version resource files if this project has a version.ini.
-
-ifeq "$(OMIT_VERSIONS)" ""
- ifneq "$(VERSION_RC_ROOT)" ""
-# only redo the version resource if it or version.ini is out of date.
-%_version.rc: version.ini $(PARAMETER_FILE)
- $(CATCHER)$(CLAM_BIN)/version_stamper$(EXE_END) . $(PARAMETER_FILE)
- endif
-endif
-
-############################################################################
-
-# Now the active part of the make process...
-
-# Adds the main CLAM system in to get some work done. This should be placed
-# after the module's rules are defined and before the module's targets are
-# defined.
-include rules.def
-
-# preserves intermediate files from being deleted.
-##.PRECIOUS: %.resources
-
-# zaps things when they could not be created correctly.
-.DELETE_ON_ERROR:
-
-############################################################################
-
-# examines the required variables and complains if they're missing.
-check_requirements:
- $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi'
- $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi'
-
-############################################################################
-
-# calls the script for preparing output directories and such.
-pre_compilation:
- $(HIDESH)$(CLAM_DIR)/csharp/preconditions.sh
-
-############################################################################
-
-# calls the script for copying the final products to the library directory.
-# we don't bother reporting errors from touch since there will sometimes
-# not be any objects in the final directory.
-post_compilation:
- $(HIDESH)$(CLAM_DIR)/csharp/postconditions.sh
-
-############################################################################
-
-# if REBUILD is defined, then we cause all objects to be recompiled.
-.PHONY: force_rebuild
-force_rebuild:
-
-ifneq "$(REBUILD)" ""
- # the target below needs the blank rule that it has for this to work.
- $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(LAST_TARGETS): force_rebuild
-endif
-
-############################################################################
-
+++ /dev/null
-###############################################################################
-
-# CLAM System default variable definitions for C# compilation.
-
-###############################################################################
-
-# Pull in the base support for CLAM.
-include variables.def
-
-###############################################################################
-
-CLAM_BIN = $(CLAM_DIR)/../bin
-
-###############################################################################
-
-ifneq "$(BUILD_PARAMETER_FILE)" ""
- # define our version of the build parameter file. this should be set
- # beforehand so we override the default parameter file for clam.
- export PARAMETER_FILE = $(BUILD_PARAMETER_FILE)
-###no: $(FEISTY_MEOW_DIR)/build/identity.ini
-endif
-ifeq "$(PARAMETER_FILE)" ""
- # last ditch attempt to get one that will work.
- export PARAMETER_FILE = $(FEISTY_MEOW_DIR)/build.ini
-endif
-
-###############################################################################
-
-# BASE_CPU is a flag that distinguishes the type of processor, if necessary.
-export BASE_CPU
-#BASE_CPU = m68k
- # motorola 68000 series.
-#BASE_CPU = m68340
- # motorola 68340.
-#BASE_CPU = x86
- # intel x86.
-#BASE_CPU = ppc860
- # power pc 860.
-
-# set the CPU default if we do not have one.
-ifeq "$(BASE_CPU)" ""
- BASE_CPU = x86
-endif
-
-# COMPILER is a flag that specifies the operating system or the compiler for
-# use in conditional compilation (#ifdef ... #endif) of the compiler dependent
-# interfaces or implementations.
-export COMPILER
-#COMPILER = VISUAL_CPP
-
-# choose a default compiler if none was specified.
-ifeq "$(COMPILER)" ""
- COMPILER = VISUAL_CPP
-endif
-
-# COMPILER_VERSION specifies the version of a particular compiler, if this is
-# needed to distinguish how the code is built.
-export COMPILER_VERSION
-
-###############################################################################
-
-# "TYPE" is the kind of product being generated by this project. this is
-# used to decide where to put the final products of compilation. this is a
-# variable in the user's makefile.
-# Valid Types:
-# TYPE = library (outputs are static or dynamic libraries)
-# TYPE = application (outputs are main-line executables)
-# TYPE = test (outputs are test programs)
-export TYPE
-
-###############################################################################
-
-# pseudo-boolean variable section. if these have any value at all, then they
-# are treated as being true. note that these are flags that should generally
-# be passed on the command line to a make. if they are intended to be used
-# from inside a makefile, then they must appear before this file is included.
-
-# "REBUILD" causes a rebuild of all source files if it's true.
-export REBUILD
-
-# "DEBUG" is used to specify a debugging build. the default is for this to
-# be false, which causes a release build.
-export DEBUG
-
-# "OPTIMIZE" creates optimized code.
-export OPTIMIZE
-
-# "NO_COMPILE" just runs through the targets without compiling. it still
-# promotes headers however.
-export NO_COMPILE
-
-# "BUILD_LIST_FILE" is the set of files that need to be recompiled for
-# visual c++.
-export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT)
-
-# "BUILD_WHACK_FILE" is the set of object files that should be removed if
-# a build failure occurs.
-export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT)
-
-# we're adding the build list to the flag files so we know it gets cleaned up.
-FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE)
-
-###############################################################################
-
-# This section implements the HOOPLE directory scheme. If your scheme differs,
-# then you'll want to modify these appropriately.
-
-# "THIRD_PARTY_DIR" is the root of our support libraries.
-ifeq "$(OP_SYSTEM)" "UNIX"
- export THIRD_PARTY_DIR
-endif
-ifeq "$(OP_SYSTEM)" "WIN32"
- export THIRD_PARTY_DIR = $(FEISTY_MEOW_DIR)/3rdparty
-endif
-
-# "OUTPUT_ROOT" is the root of all output directories for objects and other
-# products being built.
-export OUTPUT_ROOT = $(TARGETS_DIR)/obj
-
-# "PLATFORM_ADD_IN" is an option discriminator for the intended execution
-# platform. it should end in an underscore if it is provided.
-#PLATFORM_ADD_IN = linux_
-#PLATFORM_ADD_IN = w32_
-PLATFORM_ADD_IN =
-
-# "CPU_BUILD_DIR" distinguishes object directories by including the cpu
-# name and the type of build.
-ifneq "$(DEBUG)" ""
- CPU_BUILD_DIR = $(BASE_CPU)_dbg
-else
- CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel
-endif
-
-# "BASE_OUTPUT_PATH" is the parent directory of objects for this type of
-# cpu and this type of build.
-export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR)
-
-# "OUTPUT_PATH" is the directory to generate all compiled products into.
-export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT)
-
-# "OBJECT_DIR" is where object files will be stored during compilation for the
-# target type being produced.
-export OBJECT_DIR = $(OUTPUT_PATH)
-
-# These specify where files are to be created or located for our local build.
-export EXECUTABLE_DIR = $(TARGETS_DIR)/exe
-export DYNAMIC_LIBRARY_DIR = $(TARGETS_DIR)/dll
-export STATIC_LIBRARY_DIR = $(TARGETS_DIR)/lib
-export TESTS_DIR = $(TARGETS_DIR)/tests
-
-# "HEADER_SEARCH_PATH" is where the class interface files are to be found.
-#HEADER_SEARCH_PATH =
-
-# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found.
-HOOPLE_HEADERS := $(shell $(FIND) $(FEISTY_MEOW_DIR)/source/lib_src $(FEISTY_MEOW_DIR)/libraries -mindepth 1 -maxdepth 1 -type d)
-
-# "LOCAL_HEADERS" are overrides that go first in the header search path.
-#LOCAL_HEADERS =
-
-# "CODEBASE_HEADERS" is a list that can be changed for a particular codebase.
-# it is guaranteed that clam will not interfere with this list, whereas
-# the LOCAL_HEADERS can be modified by clam.
-#CODEBASE_HEADERS =
-
-# "LOCAL_LIBRARIES" are overrides that go first in the library search path.
-#LOCAL_LIBRARIES =
-
-# "LIBRARY_SEARCH_PATH" is where the library files are to be found.
-#LIBRARY_SEARCH_PATH =
-
-# "HOOPLE_LIBRARIES" is where our local libraries are located.
-HOOPLE_LIBRARIES =
-
-# "EXTRA_COPIES" is a list of files that are copied to a project's output
-# directory.
-export EXTRA_COPIES
-
-# "EXTRA_VERSIONS" is a list of version files to synchronize with the main
-# library version for this build. if a file called "version.ini" exists in
-# the project directory, then it will automatically be upgraded, so the
-# extra version files are mainly useful when you have a project with multiple
-# programs in it and you want them to have independent version files (as you
-# should perhaps want).
-export EXTRA_VERSIONS
-
-# "OMIT_VERSIONS" is another exclusion flag. this one turns off the creation
-# of version resource files and eliminates any references that would include
-# such files. this is needed when rebuilding version_stamper.
-#OMIT_VERSIONS = t
-
-# Add the obligatory junk to be cleaned up. Individual compiler sections
-# should customize this by adding their object output directories.
-CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH)
-#hmmm: import libs for dynamic libraries on ms-win32 don't currently get
-# cleaned up nicely.
-
-###############################################################################
-
-# "SEARCH_DIRS" is a list of directories that should be searched for both C++
-# header files and for C++ code libraries. The items placed in SEARCH_DIRS
-# are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH.
-#SEARCH_DIRS =
-
-# "DEFINITIONS" is a list of compiler flags that define the value of c macros.
-# These usually have the format of -D<flag>, but in this variable, only the
-# <flag> itself should be listed because the compiler option -D is added
-# automatically.
-DEFINITIONS = CLAM_BUILT
-
-ifneq "$(BOOT_STRAPPING)" ""
- # the software is being built from the ground up, including the binaries
- # we use for building (like value_tagger and others).
- DEFINITIONS += BOOT_STRAPPING
-endif
-
-# "UNDEFINITIONS" is a list of macros to undefine.
-#UNDEFINITIONS =
-
-#hmmm: these kinds of defines (with a value) do not work for csharp.
-# GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base
-# with some branding. It is provided as a macro definition to all source
-# files. The initial value for the macro should come from the build init
-# file, but if it doesn't, we pick a default.
-##ifeq "$(product_name)" ""
-## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"HOOPLE\\\"
-##else
-## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"$(product_name)\\\"
-##endif
-
-# *_PRODUCT_VERSION records parts of our version numbers for the code to see.
-###DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor)
-
-# "DEBUG_FLAGS" these flags are used for generating specialized versions of
-# object files, such as ones that include debugging code or that add code for
-# profiling.
-# Possible values are -g for adding GDB debugging code and -pg for adding
-# gprof profiling code.
-#DEBUG_FLAGS = -g
-#DEBUG_FLAGS = -pg
-#DEBUG_FLAGS =
-
-# "COMPILER_FLAGS" are the flags for the pre-processor and compiler.
-#COMPILER_FLAGS =
-
-# "STRICT_WARNINGS" turns on all warnings and forces them to be considered
-# as errors when encountered.
-#STRICT_WARNINGS =
-
-# "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool
-# that creates static code libraries.
-#LIBRARIAN_FLAGS =
-
-# "SOURCE" is the list of files that are turned into objects.
-#SOURCE =
-
-# "LIBS_USED" are system or compiler code libraries that the targets to be
-# created depend upon.
-#LIBS_USED =
-
-# "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries
-# actually cause executables and object files to be recompiled when the
-# libraries specified have changed. To accomplish this, these libraries MUST
-# be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place
-# on the LIBRARY_SEARCH_PATH.
-#LOCAL_LIBS_USED =
-
-# Load flags tell the linker and loader how to deal with the files and where
-# to locate library components. The prefix goes before object files are
-# listed, and the suffix after. The prefix should have things like the
-# directories to be searched for code libraries (although they should be added
-# to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic).
-# In the suffix, actual library loading statements (like -lmath) can be
-# included (although they should be listed in a different form in LIBS_USED).
-# Remember that the unix loader looks for functions in libraries in a bizarre
-# way: ld searches for a function only when it has already been asked for it.
-# This means that it doesn't remember what functions it has already been
-# provided with in the libraries and object files, and it will fail if those
-# functions are only asked for after they have already been encountered.
-#LOAD_FLAG_PREFIX =
-#LOAD_FLAG_SUFFIX =
-
-# The prefix used on library names, mostly for unix.
-LIB_PREFIX =
-# The standard suffix for static or import libraries on this operating system.
-LIB_ENDING =
-
-# Flag for specifying the library name to create.
-#CREATE_LIBRARY_FLAG =
-
-# Flag for specifying a library to include in linking.
-LIBRARY_NAME_FLAG = -l
-
-# Flag for specifying a directory to add to the search path for libs.
-#LIBRARY_PATH_FLAG = -L
-
-# Flag for specifying the name of an output from the linker.
-#LINKER_OUTPUT_FLAG =
-
-# Flag for separating linker options from compilation options for a combined
-# compiler / linker.
-#LINKER_OPTION_SEPARATOR =
-
-# Flag that passes special options when building executable programs. It is
-# passed just before the LOAD_FLAG_PREFIX.
-#EXE_FLAGS =
-
-# The name of the compiler tool.
-#CC =
-
-# The name of the library creator tool.
-#LIBRARY_TOOL =
-
-# the root name of the version file. This is currently irrelevant on
-# non-win32 platforms.
-VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_DIR)/cpp/rc_name.sh)
- # we import the rc_name from our close ally, the c++ compiler definitions.
-
-###############################################################################
-
-# Compiler Dependent Flags
-#
-# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location.
-# "COMPILER_HEADER_DIR" is where the compiler's headers are.
-export COMPILER_HEADER_DIR
-# "COMPILER_LIBRARY_DIR" is where archived libraries are.
-# "CC" is the name of the C++ compiler to be used.
-
-ifeq "$(COMPILER)" "VISUAL_CPP"
- # microsoft visual studio 7.
-
- LIB_ENDING = .dll
- PLATFORM_ADD_IN = w32_
-
- # these define special characteristics for a program being built.
- # BASE is almost always defined and pulls in fundamental w32 support.
- # RPC supplies the remote procedure call libraries.
- # OLE pulls in object linking and embedding support.
- # SECURITY links with the w32 security APIs.
- # CLR sets options that are appropriate for managed code.
- VCPP_USE_BASE=true
- VCPP_USE_RPC=
- VCPP_USE_OLE=
- VCPP_USE_SECURITY=
- VCPP_USE_CLR=
- VCPP_VISTA_ICON=
-
- # the framework dir points at the .net framework to be used for compilation.
- ifeq "$(FRAMEWORK_VERSION)" ""
-
- # older .net 1.1.
-# SHORT_FRAMEWORK_VERSION = 1.1
-# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322
-
- # old .net 2.0.
-# SHORT_FRAMEWORK_VERSION = 2.0
-# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727
-
- # current .net 3.5.
- SHORT_FRAMEWORK_VERSION = 3.5
- FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION)
-
- endif
- export FRAMEWORK_DIR
- ifeq "$(FRAMEWORK_DIR)" ""
- FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION)
- endif
-
- # pick a default compiler version for what we tend to use the most at the
- # current time.
- ifeq "$(COMPILER_VERSION)" ""
- COMPILER_VERSION = 7
- endif
-## DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION)
- # add a macro so programs can check what version is appropriate.
-
- # C# needs an entry point for exes. a different one can be specified also.
- ENTRY_POINT = main
-
- # C# treats resources differently than simple code files. the list in this
- # variable will be embedded in the target.
- #RESX =
-
- # TLBEXPORT is a tool to create TLB files from DLL files.
- TLBEXPORT = $(COMPILER_ROOT_DIR)/../SDK/v$(SHORT_FRAMEWORK_VERSION)/bin/tlbexp$(EXE_END)
-
- # calculate the visual studio root directory.
- export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh $(CLAM_BIN) )
- ifneq "$(VIS_STU_ROOT)" ""
- COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc#
- endif
- ifeq "$(COMPILER_ROOT_DIR)" ""
- HOSEUP = $(shell echo The compiler directory is not set. Please define the environment )
- HOSEUP = $(shell echo variable VSxCOMNTOOLS to point at the folder where visual C++ is installed. )
- HOSEUP =
- endif
-
- export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_DIR)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) )
-
- # set a variable for the resource compiler for old-style resources.
- STANDARD_RC = $(VIS_STU_ROOT)/vc/bin/rc
-
- # set up a directory for debugging files to be stored. these are not
- # moved with the postconditions--they are generated in place.
- export PDB_DIR=$(TARGETS_DIR)/pdb
-
- # set these way up here so we can override them later.
- CC = bash $(CLAM_DIR)/csharp/csharper.sh
-##$(FRAMEWORK_DIR)/csc
-
-# LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link
-
- # vary the locations for compiler files based on the version.
- COMPILER_HEADER_DIR = $(VIS_STU_ROOT)/vc/include $(VIS_STU_ROOT)/vc/atlmfc/include $(VIS_STU_ROOT)/vc/platformsdk/include
- COMPILER_LIBRARY_DIR =
-###$(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib
- RC = $(COMPILER_ROOT_DIR)/../SDK/v2.0/bin/resgen$(EXE_END)
-
- ifeq "$(COMPILER_HEADER_DIR)" ""
- HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.)
- endif
-
- DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32_WINNT=0x403
- DEF_FILE =
- LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib
- LOAD_FLAG_PREFIX = -nologo
-#-subsystem:windows -machine:IX86
- LOAD_FLAG_SUFFIX =
-
- MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-I% )
- MIDL_DEFS = -no_robust
-
- # set the flags used by visual c++.
- CREATE_LIBRARY_FLAG = -out:
- LIBRARY_NAME_FLAG = -reference:
- LIBRARY_PATH_FLAG = -lib:
- LINKER_OPTION_SEPARATOR = -link
- LINKER_OUTPUT_FLAG = -out:
-
- # Add the extra files created by visual c++.
-#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db
-
- # put the common flags into the compiler flags.
- COMPILER_FLAGS += -nologo
-#-Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -GX -W3 -Zi -EHsc -GS -Gd
-
- ifneq "$(DEBUG)" ""
- # disable function inlining and optimizations for debug.
-# COMPILER_FLAGS += -Ob0 -Od
- else
- # enable function inlining for release only.
-# COMPILER_FLAGS += -Ob1
-
- ifneq "$(OPTIMIZE)" ""
- # add in fast code optimization.
-#testing...
-# COMPILER_FLAGS += -O2
-#trying O2 again although it seems to combust too easily.
- else
- # no optimizations.
- endif
-
- endif
-
- # check if profiling is to be enabled.
- PROFILER_FLAG =
- ifneq "$(PROFILE)" ""
- PROFILER_FLAG = -profile
- endif
-
- # add the common linker flags. the debugging flag is added because we
- # want to be able to debug into release code, but since the pdb files
- # are separate, we're not exposing ourselves when we don't include them.
- LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug
-#-warn:3
-
- # "USE_MFC" dictates whether mfc should be allowed in the application.
- # the default is not to use MFC extension style dlls. this can be turned
- # on in the individual makefiles that require MFC.
- #USE_MFC =
-
- # the library creator gets a couple of flags.
- LIBRARIAN_FLAGS += -nologo -machine:IX86
-
- # now, vary the flag configuration based on the flags that have been set.
-
- ifneq "$(CONSOLE_MODE)" ""
- # console type of applications are built using the static flag so that
- # they are more redistributable.
- DEFINITIONS += _CONSOLE
-### LOAD_FLAG_SUFFIX += -subsystem:console
- STATIC = true
- endif
-
- # dynamically linked library or application flags.
- ifneq "$(DEBUG)" ""
- # debug.
- DEFINITIONS += _DEBUG
-# COMPILER_FLAGS += -MDd
- else
- # release.
- DEFINITIONS += NDEBUG
-# COMPILER_FLAGS += -MD
- endif
-
- ifneq "$(STRICT_WARNINGS)" ""
-# COMPILER_FLAGS += -W3 -WX
- # we have not turned on W4 because it is not really warnings for the
- # microsoft compiler. instead, it is a bunch of blather about what the
- # compiler intends to do rather than problems in the code.
- endif
-
-endif
-
-
export FEISTY_MEOW_SCRIPTS := $(FEISTY_MEOW_DIR)/scripts
endif
-# "PRODUCTION_DIR" is where the built products will be stored, plus any
-# temporary files that are generated during the build.
+# "PRODUCTION_DIR" is where components required for building the code or
+# installers can be found.
+#hmmm: is this redundant?
export PRODUCTION_DIR
ifeq "$(PRODUCTION_DIR)" ""
PRODUCTION_DIR=$(FEISTY_MEOW_DIR)/production
TARGETS_DIR = $(FEISTY_MEOW_DIR)
endif
-# "CLAM_BIN" points at the location for helper binaries and shell scripts.
-export CLAM_BIN = $(PRODUCTION_DIR)/clam_bin
-
# "CURRENT_DIR" is the directory where this make was started.
export CURRENT_DIR := $(shell pwd)
# sets the temporary directory.
export CLAM_TMP
ifeq "$(CLAM_TMP)" ""
- CLAM_TMP := $(WASTE_DIR)
+ CLAM_TMP := $(GENERATED_DIR)/clam_tmp
endif
-ifeq "$(OP_SYSTEM)" "WIN32"
- # set these so that compilers and such will use them.
- export TMP := $(CLAM_TMP)
- export TEMP := $(CLAM_TMP)
-endif
+#turned off for the moment, since this seems like a bad idea; we define clam tmp in terms of tmp sometimes, don't we???
+#ifeq "$(OP_SYSTEM)" "WIN32"
+# # set these so that compilers and such will use them.
+# export TMP := $(CLAM_TMP)
+# export TEMP := $(CLAM_TMP)
+#endif
# "FAILURE_FILE" is a file that is used as a flag to track failures. if the
# file exists, then it is assumed that a failure happened during the current
if [ ! -z "$SHELL_DEBUG" ]; then echo creating temporary directory...; fi
-source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
-
if [ -z "$TMP" ]; then
# main declaration of the transients area.
export TMP=$HOME/.tmp
fi
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
LOG_FILE=$TMP/zz_transients.log
# log file for this script.
fi
# now augment the environment if we found our build variables.
if [ $found_build_vars == 1 ]; then
- # the binary directory contains handy programs we use a lot. we set
- # up the path to it here based on the operating system.
- define_yeti_variable BINDIR=$FEISTY_MEOW_DIR/production/binaries
+ # the binary directory contains our collection of handy programs.
+ define_yeti_variable BINDIR=$TARGETS_DIR
# add binaries created within build to the path.
define_yeti_variable PATH="$(dos_to_unix_path $BINDIR):$PATH"
# Shared libraries are located via this variable.
function prepare_binaries_dir()
{
# we'll store binaries here from the bootstrap process.
- if [ ! -d "$BINARY_DIR" ]; then
- echo "creating binary dir now in $BINARY_DIR"
- mkdir "$BINARY_DIR"
+ if [ ! -d "$CLAM_BINARY_DIR" ]; then
+ echo "creating binary dir now in $CLAM_BINARY_DIR"
+ mkdir "$CLAM_BINARY_DIR"
fi
- if [ ! -f "$BINARY_DIR/paths.ini" ]; then
+ if [ ! -f "$CLAM_BINARY_DIR/paths.ini" ]; then
echo "copied paths.ini to binary dir."
- cp "$PRODUCTION_DIR/paths.ini" "$BINARY_DIR"
+ cp "$PRODUCTION_DIR/paths.ini" "$CLAM_BINARY_DIR"
fi
}
echo "Failed to build the application $1--quitting now."
exit 1892
fi
- cp "$INTERMEDIATE_EXE_DIR/$1" "$BINARY_DIR/$1"
- strip "$BINARY_DIR/$1"
- chmod 755 "$BINARY_DIR/$1"
+ cp "$INTERMEDIATE_EXE_DIR/$1" "$CLAM_BINARY_DIR/$1"
+ strip "$CLAM_BINARY_DIR/$1"
+ chmod 755 "$CLAM_BINARY_DIR/$1"
}
elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then
function promote {
echo "Failed to build the application $1.exe--quitting now."
exit 1892
fi
- cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$BINARY_DIR"
- chmod 755 "$BINARY_DIR/$1.exe"
+ cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$CLAM_BINARY_DIR"
+ chmod 755 "$CLAM_BINARY_DIR/$1.exe"
}
else
echo "The OPERATING_SYSTEM variable is unset or unknown. Bailing out."
# start the actual build process now...
-# recreate our useful waste directories and other things...
+# load in the feisty meow building environment.
source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
# clean out any current contents.
if [ -z "$SAVE_BINARIES" ]; then
for i in ${toolset_names[*]}; do
- whack_name="$BINARY_DIR/$i$EXE_ENDING"
+ whack_name="$CLAM_BINARY_DIR/$i$EXE_ENDING"
#echo removing "$whack_name"
rm -f "$whack_name"
done
# rebuild the dependency tool. needed by everything, pretty much, but
# since it's from the xfree project, it doesn't need any of our libraries.
-if [ ! -f "$BINARY_DIR/makedep$EXE_ENDING" ]; then
+if [ ! -f "$CLAM_BINARY_DIR/makedep$EXE_ENDING" ]; then
pushd "$TOOL_SOURCES/dependency_tool" &>/dev/null
make_code pre_compilation NO_DEPS=t OMIT_VERSIONS=t
make_code NO_DEPS=t OMIT_VERSIONS=t
fi
# rebuild the version tools and other support apps.
-if [ ! -f "$BINARY_DIR/value_tagger$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/version_stamper$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/vsts_version_fixer$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/write_build_config$EXE_ENDING" ]; then
+if [ ! -f "$CLAM_BINARY_DIR/value_tagger$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/version_stamper$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/vsts_version_fixer$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/write_build_config$EXE_ENDING" ]; then
pushd "$TOOL_SOURCES/clam_tools" &>/dev/null
make_code pre_compilation OMIT_VERSIONS=t
make_code OMIT_VERSIONS=t
fi
# build a few other utilities.
-if [ ! -f "$BINARY_DIR/short_path$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/sleep_ms$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/create_guid$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/zap_process$EXE_ENDING" \
- -o ! -f "$BINARY_DIR/playsound$EXE_ENDING" ]; then
+if [ ! -f "$CLAM_BINARY_DIR/short_path$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/sleep_ms$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/create_guid$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/zap_process$EXE_ENDING" \
+ -o ! -f "$CLAM_BINARY_DIR/playsound$EXE_ENDING" ]; then
pushd "$TOOL_SOURCES/simple_utilities" &>/dev/null
make_code pre_compilation OMIT_VERSIONS=t
make_code OMIT_VERSIONS=t
bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
# recreate our useful junk directories...
- mkdir -p "$WASTE_DIR"
+ mkdir -p "$GENERATED_DIR"
mkdir -p "$TEMPORARIES_DIR"
mkdir -p "$LOGS_DIR"
# in the building hierarchy.
export BUILD_TOP="$FEISTY_MEOW_DIR"
-# this variable points at a folder where we store most of the generated products
-# of the build. these tend to be the things that will be used for packaging into
-# different types of products.
+# the production directory is the location for all the scripts and setup
+# code needed to produce the executables for feisty meow.
export PRODUCTION_DIR="$BUILD_TOP/production"
+# set up the top-level for all build creations and logs and such.
+export GENERATED_DIR="$TMP/generated-feisty_meow"
+if [ ! -d "$GENERATED_DIR" ]; then
+ mkdir -p "$GENERATED_DIR"
+fi
+# set up our effluent outsourcing valves.
+export TEMPORARIES_DIR="$GENERATED_DIR/temporaries"
+if [ ! -d "$TEMPORARIES_DIR" ]; then
+ mkdir -p "$TEMPORARIES_DIR"
+fi
+
+# this variable points at a folder where we store the generated products of
+# the build, such as the binaries and installer packages.
+export RUNTIME_DIR="$GENERATED_DIR/runtime"
+if [ ! -d "$RUNTIME_DIR" ]; then
+ mkdir -p "$RUNTIME_DIR"
+fi
+
# we define a log file storage area that can be relied on by the build.
-export LOGS_DIR="$PRODUCTION_DIR/logs"
+export LOGS_DIR="$GENERATED_DIR/logs"
if [ ! -d "$LOGS_DIR" ]; then
mkdir -p "$LOGS_DIR"
fi
if [ -z "$got_bad" ]; then
# where we store the binaries used for building the rest of the code base.
- export BINARY_DIR="$PRODUCTION_DIR/clam_bin"
+ export CLAM_BINARY_DIR="$RUNTIME_DIR/clam_bin"
# the final destination for the new binaries which provide the hoople
# build with all the apps it needs to get going.
- export TARGETS_DIR="$PRODUCTION_DIR/binaries"
+ export TARGETS_DIR="$RUNTIME_DIR/binaries"
# targets directory is meaningful to clam, which will use it for output.
export INTERMEDIATE_EXE_DIR="$TARGETS_DIR"
# where we are building the apps before they get promoted.
- export WASTE_DIR="$PRODUCTION_DIR/waste"
- if [ ! -d "$WASTE_DIR" ]; then
- mkdir -p "$WASTE_DIR"
- fi
- export TEMPORARIES_DIR="$WASTE_DIR/temporaries"
- if [ ! -d "$TEMPORARIES_DIR" ]; then
- mkdir -p "$TEMPORARIES_DIR"
- fi
-
+#hmmm: could allow override on this if already set.
# calculate which build ini file to use.
export BUILD_PARAMETER_FILE="$PRODUCTION_DIR/feisty_meow_config.ini"
if [ ! -f "$BUILD_PARAMETER_FILE" ]; then
# we should have established our internal variables now, so let's try
# using them.
- export PATH=$(dos_to_unix_path $BINARY_DIR):$PATH
+ export PATH=$(dos_to_unix_path $CLAM_BINARY_DIR):$PATH
# load up the helper variables for visual studio on winders.
if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
# the redirection of stderr to null is to get around an obnoxious cygwin
# warning that seems to be erroneously complaining about backslashes.
- # convert all other relevant paths back to dos form, or visual studio barfs.
- #export BUILD_SCRIPTS_DIR=$(unix_to_dos_path $BUILD_SCRIPTS_DIR)
- #export BUILDING_HIERARCHY=$(unix_to_dos_path $BUILDING_HIERARCHY)
- #export BUILDER_DIR=$(unix_to_dos_path $BUILDER_DIR)
- #export BUILD_TOP=$(unix_to_dos_path $BUILD_TOP)
- #export PRODUCTION_DIR=$(unix_to_dos_path $PRODUCTION_DIR)
- #export LOGS_DIR=$(unix_to_dos_path $LOGS_DIR)
- #export TOOL_SOURCES=$(unix_to_dos_path $TOOL_SOURCES)
- #export BINARY_DIR=$(unix_to_dos_path $BINARY_DIR)
- #export TARGETS_DIR=$(unix_to_dos_path $TARGETS_DIR)
- #export INTERMEDIATE_EXE_DIR=$(unix_to_dos_path $INTERMEDIATE_EXE_DIR)
- #export WASTE_DIR=$(unix_to_dos_path $WASTE_DIR)
-
##############
echo "calculated variables for dos/windoze builds:"
exit 3
fi
- export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")"
+#old export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")"
+ export NEW_TMP="$(mktemp -d "$TMP/temps-build-whacking.XXXXXX")"
export CRUDFILE="$(mktemp "$NEW_TMP/whack_build.XXXXXX")"
echo "" &>"$CRUDFILE"
# avoid accidentally removing way too much important stuff if our variables have not
# been previously established.
- local WASTE_DIR="$CLEANING_TOP/waste"
+ local GENERATED_DIR="$CLEANING_TOP/generated-feisty_meow"
+#*** hmmm: above is wrong place now!
local TEMPORARIES_DIR="$CLEANING_TOP/temporaries"
# kerzap.
"$CLEANING_TOP/logs" \
"$CLEANING_TOP/objects" \
"$TEMPORARIES_DIR" \
- "$WASTE_DIR" \
+ "$GENERATED_DIR" \
"$CLEANING_TOP/__build_"*.h \
"$CLEANING_TOP/manifest.txt"