X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;ds=inline;f=scripts%2Fclam%2Fcpp%2Fvariables.def;h=baa42e1f7a0583b352362e9ab761cbcbf74c4740;hb=6356fdf6b5a4d7707975b6b2baa3cd075bec33dc;hp=a84161fc92b3c775e14e9b985149ced3159720c4;hpb=9d1052f9cae51864e8fb39d3f34048952b169cf4;p=feisty_meow.git diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index a84161fc..baa42e1f 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -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)" "" @@ -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++ @@ -533,6 +542,8 @@ ifeq "$(COMPILER)" "GNU_LINUX" endif +############################################################################ + ifeq "$(COMPILER)" "GNU_ARM_LINUX" # ARM-linux GNU compiler... COMPILER_ROOT_DIR = /usr/local/arm-linux @@ -577,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) ) @@ -589,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 @@ -607,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. @@ -858,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. @@ -885,6 +909,8 @@ ifeq "$(COMPILER)" "VISUAL_CPP" endif +############################################################################ + ifeq "$(COMPILER)" "GNU_DARWIN" # Darwin kernel GNU compiler... CC = g++