may have fixed annoying make clean bugs
[feisty_meow.git] / scripts / clam / cpp / variables.def
index a9a4d4b8bbfc98cdc8875410498957e1e5f6103d..222a9d6d225d8c2d4c32bc54ba724217c09396bf 100644 (file)
@@ -11,7 +11,7 @@ ifneq "$(BUILD_PARAMETER_FILE)" ""
 endif
 ifeq "$(PARAMETER_FILE)" ""
   # last ditch attempt to get one that will work.
-  export PARAMETER_FILE = $(REPOSITORY_DIR)/build.ini
+  export PARAMETER_FILE = $(PRODUCTION_DIR)/feisty_meow_config.ini
 endif
 
 ###############################################################################
@@ -22,16 +22,16 @@ include variables.def
 ###############################################################################
 
 #no # set the repository directory if it's still set to the base version.
-#ifeq "$(REPOSITORY_DIR)" ""
+#ifeq "$(FEISTY_MEOW_APEX)" ""
 #  ifeq "$(OP_SYSTEM)" "UNIX"
-#    export REPOSITORY_DIR = $(HOME)/hoople
+#    export FEISTY_MEOW_APEX = $(HOME)/hoople
 #  endif
 #  ifeq "$(OP_SYSTEM)" "WIN32"
-#    export REPOSITORY_DIR = l:
+#    export FEISTY_MEOW_APEX = l:
 #  endif
 #endif
 
-#export CLAM_BIN = $(CLAM_DIR)/../bin
+#export CLAM_BINARY_DIR = $(CLAM_DIR)/../bin
 
 ###############################################################################
 
@@ -60,7 +60,7 @@ endif
 # code.  It is mainly used within CLAM itself for determining the proper
 # compiler flags.
 export COMPILER
-#COMPILER := GNU_LINUX | GNU_ARM_LINUX | GNU_DARWIN | GNU_WIN32 | VISUAL_CPP
+#COMPILER := GNU_LINUX | GNU_ARM_LINUX | GNU_DARWIN | GNU_WINDOWS | VISUAL_CPP
 
 # choose a default compiler if none was specified.
 ifeq "$(COMPILER)" ""
@@ -72,7 +72,7 @@ ifeq "$(COMPILER)" ""
     endif
   endif
   ifeq "$(OP_SYSTEM)" "WIN32"
-#    COMPILER := GNU_WIN32
+#    COMPILER := GNU_WINDOWS
     COMPILER := VISUAL_CPP
   endif
   ifeq "$(COMPILER)" ""
@@ -209,7 +209,7 @@ export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR)
 
 # special case when doing arm-linux builds
 ifeq "$(COMPILER)" "GNU_ARM_LINUX"
-  export TARGETS_DIR = $(REPOSITORY_DIR)/$(CPU_BUILD_DIR)
+  export TARGETS_DIR = $(FEISTY_MEOW_APEX)/$(CPU_BUILD_DIR)
   # special output directory for firmware doesn't include CPU name because
   #  the repository already include the CPU name
   BASE_OUTPUT_PATH = $(OUTPUT_ROOT)
@@ -226,7 +226,6 @@ export OBJECT_DIR = $(OUTPUT_PATH)
 export EXECUTABLE_DIR = $(TARGETS_DIR)
 export DYNAMIC_LIBRARY_DIR = $(TARGETS_DIR)
 export STATIC_LIBRARY_DIR = $(TARGETS_DIR)
-#export TESTS_DIR = $(TARGETS_DIR)/tests
 
 # "HEADER_SEARCH_PATH" is where the class interface files are to be found.
 #HEADER_SEARCH_PATH =
@@ -235,11 +234,12 @@ export STATIC_LIBRARY_DIR = $(TARGETS_DIR)
 ifeq "$(HOOPLE_HEADERS)" ""
 #seems like some of this is redundant with earlier 3rdparty exploring.
   LOCUS_LIBRARY_HEADERS = $(shell bash -c '\
-    if [ -d "$(REPOSITORY_DIR)/core" ]; then \
-      echo "$(REPOSITORY_DIR)/core" "$(REPOSITORY_DIR)/octopi" "$(REPOSITORY_DIR)/graphiq" ; \
+    if [ -d "$(FEISTY_MEOW_APEX)/nucleus" ]; then \
+      echo "$(FEISTY_MEOW_APEX)/nucleus" "$(FEISTY_MEOW_APEX)/octopi" "$(FEISTY_MEOW_APEX)/graphiq" ; \
     else \
       echo ""; \
-    fi | sed -e "s/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/" ')
+    fi | tr "\\\\" / | sed -e "s/\([a-zA-Z]\):\/\([^ ]*\)/\/cygdrive\/\1\/\2/g" ')
+    # above assumes cygwin support for windows!  was assuming msys support.
   HOOPLE_HEADERS := $(shell $(FIND) $(LOCUS_LIBRARY_HEADERS) -mindepth 1 -maxdepth 1 -type d )
 endif
 
@@ -287,7 +287,7 @@ export DEPS_FILE = $(OUTPUT_PATH)/$(PROJECT).deps
 
 # 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)
+CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH) $(DEPS_FILE)
 
 # "GENDEPS" is a flag that causes dependencies to be generated into
 # statically built applications.
@@ -421,8 +421,13 @@ ifeq "$(OP_SYSTEM)" "UNIX"
   DYNLIB_ENDING = .so
 endif
 ifeq "$(OP_SYSTEM)" "WIN32"
-  LIB_ENDING = .lib
-  DYNLIB_ENDING = .dll
+  ifeq "$(COMPILER)" "VISUAL_CPP"
+    LIB_ENDING = .lib
+    DYNLIB_ENDING = .dll
+  else
+    LIB_ENDING = .a
+    DYNLIB_ENDING = .so
+  endif
 endif
 
 ###############################################################################
@@ -438,7 +443,7 @@ export COMPILER_HEADER_DIR
 
 # These flags may be useful across multiple compilers.
 #
-# SSL brings in the openSSL libraries.
+# SSL brings in the OpenSSL libraries.
 USE_SSL=
 
 # CURL provides access to the curl library.
@@ -451,6 +456,10 @@ ifneq "$(OMIT_VERSIONS)" ""
   DEFINITIONS += NO_VERSION
 endif
 
+############################################################################
+# compiler specific section below.
+############################################################################
+
 ifeq "$(COMPILER)" "GNU_LINUX"
   # Unix GNU compiler...
   CC = g++
@@ -463,10 +472,7 @@ ifeq "$(COMPILER)" "GNU_LINUX"
   DEFINITIONS += _FILE_OFFSET_BITS=64 
 
   DEPENDENCY_DEFINITIONS += NO_VERSION
-  DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(COMPILER_VERSION)/include
-
-#protect other additions to make them only for debian?
-#  COMPILER_HEADER_DIR := /usr/include /usr/local/include 
+  DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu
 
   # "USE_XWIN" specifies that this project needs X window system support.
   #USE_XWIN =
@@ -536,6 +542,8 @@ ifeq "$(COMPILER)" "GNU_LINUX"
 
 endif
 
+############################################################################
+
 ifeq "$(COMPILER)" "GNU_ARM_LINUX"
   # ARM-linux GNU compiler...
   COMPILER_ROOT_DIR = /usr/local/arm-linux
@@ -580,11 +588,13 @@ ifeq "$(COMPILER)" "GNU_ARM_LINUX"
 
 endif
 
-ifeq "$(COMPILER)" "GNU_WIN32"
+############################################################################
+
+ifeq "$(COMPILER)" "GNU_WINDOWS"
   # GNU compiler for MS Windoze...
   CC = g++
   ifeq "$(COMPILER_ROOT_DIR)" ""
-    COMPILER_ROOT_DIR = c:/system/mingw
+    COMPILER_ROOT_DIR = $(CYGROOT)
   endif
 
   export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_DIR)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) )
@@ -592,14 +602,19 @@ ifeq "$(COMPILER)" "GNU_WIN32"
   RC := $(COMPILER_ROOT_DIR)/bin/windres
   PLATFORM_ADD_IN = w32_
 
-  COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/include/c++/3.4.2 $(COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include 
+  COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/include/c++/3.4.2 
+#$(COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include 
 ###$(COMPILER_ROOT_DIR)/usr/include/mingw $(COMPILER_ROOT_DIR)/usr/include $(COMPILER_ROOT_DIR)/usr/include/w32api $(COMPILER_ROOT_DIR)/usr/include/extras
 
   COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib
-  DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 __cplusplus 
+  DEFINITIONS += __GNU_WINDOWS__ _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 __USE_W32_SOCKETS
+#__cplusplus 
 #__USE_GNU 
 
   LIBRARY_TOOL = ar
+  LIBRARY_PATH_FLAG = -L 
+  LIB_PREFIX = lib
+  LIB_ENDING = .a
 #  LOAD_FLAG_PREFIX += -lpthread
   LOAD_FLAG_PREFIX += -mwindows
   CREATE_LIBRARY_FLAG += -r 
@@ -610,8 +625,11 @@ ifeq "$(COMPILER)" "GNU_WIN32"
   MIDL_DEFS = -no_robust
   # some lovely definitions used by some of the mfc and other ms code.
   DEPENDENCY_DEFINITIONS += __cplusplus __MINGW32__ _WIN32 _CHAR_UNSIGNED M_I86 _M_I86 _M_IX86=500 _WIN32_WINNT=0x501 __RPC_WIN32__ __RPCNDR_H_VERSION__ __RPCPROXY_H_VERSION__ TARGET_IS_NT40_OR_LATER PGM_SETCHILD _MFC_VER=0x0600
+
 endif
 
+############################################################################
+
 ifeq "$(COMPILER)" "VISUAL_CPP"
   # microsoft visual c++ 4.x, 5.x or 6.x.
 
@@ -658,7 +676,7 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
     export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh )
   endif
   ifneq "$(VIS_STU_ROOT)" ""
-    export COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc
+    export 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 variable)
@@ -675,8 +693,9 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
   export PDB_DIR = $(TARGETS_DIR)
 
   # set these way up here so we can override them later.
-  CC = $(COMPILER_ROOT_DIR)/bin/cl
-  LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link
+  CC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl.exe
+  LINK_TOOL = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link.exe
+  LIBRARY_TOOL = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/lib
 
   # This is needed to protect against the use of 64-bit time_t structure
   # on windows.  We are casting to time_t from a 32-bit structure.
@@ -686,19 +705,19 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
   ifeq "$(COMPILER_VERSION)" "6"
     COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atl/include
     COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atl/lib
-    RC = $(COMPILER_ROOT_DIR)/../common/msdev98/bin/rc
+    RC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/../common/msdev98/bin/rc
   endif
   ifeq "$(COMPILER_VERSION)" "7"
     COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atlmfc/include $(COMPILER_ROOT_DIR)/platformsdk/include $(FRAMEWORK_DIR)
     COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib
-    RC = $(COMPILER_ROOT_DIR)/bin/rc
+    RC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/rc
     COMPILER_FLAGS += -Zc:forScope
       # turn on proper loop scoping.
   endif
   ifeq "$(COMPILER_VERSION)" "8"
     COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atlmfc/include $(COMPILER_ROOT_DIR)/platformsdk/include $(FRAMEWORK_DIR)
     COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib
-    RC = $(COMPILER_ROOT_DIR)/bin/rc
+    RC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/rc
     COMPILER_FLAGS += -Zc:forScope
       # turn on proper loop scoping.
     DEFINITIONS += _WIN32_WINNT=0x501 
@@ -714,7 +733,7 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
     COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(PLATYPUS)/lib
     DEFINITIONS += _WIN32_WINNT=0x501 
     DEPENDENCY_DEFINITIONS += _WIN32_WINNT=0x501 
-    RC = $(PLATYPUS)/bin/rc
+    RC = $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(PLATYPUS)/bin/rc
     COMPILER_FLAGS += -Zc:forScope
       # turn on proper loop scoping.
   endif
@@ -734,7 +753,6 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
 
   DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN 
   DEF_FILE =
-  LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib
   LOAD_FLAG_PREFIX = -subsystem:windows -machine:X86 -nologo
   LOAD_FLAG_SUFFIX =
 
@@ -861,6 +879,9 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
 
   # now, vary the flag configuration based on the flags that have been set.
 
+####override for windows since things are broken with WinMain
+###export CONSOLE_MODE = true
+
   ifneq "$(CONSOLE_MODE)" ""
     # console type of applications are built using the static flag so that
     # they are more redistributable.
@@ -888,6 +909,8 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
 
 endif
 
+############################################################################
+
 ifeq "$(COMPILER)" "GNU_DARWIN"
   # Darwin kernel GNU compiler...
   CC = g++