# This section manipulates variable values to prepare them for their use
# in the standard CLAM support.
-# special actions for projects that are tests.
-ifneq "$(findstring test, $(TYPE))" ""
- # add the clean task at the end, so that we will always rebuild the tests
- # and run them again.
-#hmmm: this is a kludge to make sure we always run the tests. there has got
-# to be a better way.
- LAST_TARGETS += clean
-endif
-
# see if they have got the clean flag set. if so, we will not build anything.
ifneq "$(CLEAN)" ""
NO_COMPILE = t
# implement special bits for gnu on unix.
ifeq "$(COMPILER)" "GNU_LINUX"
ifneq "$(USE_XWIN)" ""
- ifneq "$(OP_SYSTEM)" "WIN32"
- DEFINITIONS += __XWINDOWS__ __X__
- LIBS_USED += Xm Xt X11 Xft Xp
+ DEFINITIONS += __XWINDOWS__ __X__
+ LIBS_USED += Xm Xt X11 Xft Xp
#need to separate out with a USE_MOTIF kind of thing.
LIBS_USED += Xmu
- HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++
- LIBRARY_SEARCH_PATH += /usr/X11R6/lib
+ HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++
+ LIBRARY_SEARCH_PATH += /usr/X11R6/lib
+ endif
+
+ ifneq "$(USE_SSL)" ""
+ LIBS_USED += ssl crypto
+ endif
+
+ ifneq "$(USE_WXWIDGETS)" ""
+ DEFINITIONS += __WXWIDGETS__
+ use_unicode =
+ ifneq "$(findstring UNICODE, $(DEFINITIONS))" ""
+ use_unicode = true
+ endif
+
+ # decide whether to turn on the unicode flag or not.
+ ifneq "$(use_unicode)" ""
+ DEFINITIONS += wxUSE_UNICODE
+ UNICODE_FLAG_ADD = --unicode=yes
+ else
+ UNICODE_FLAG_ADD = --unicode=no
endif
+ # could add for debugging: --debug=yes
+ COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) )
+
+ LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) )
endif
+ ifneq "$(USE_CURL)" ""
+ COMPILER_FLAGS += `curl-config --cflags`
+ LOAD_FLAG_SUFFIX += `curl-config --libs`
+ endif
+endif
+
+# some special code for gnu compiler on windows.
+ifeq "$(COMPILER)" "GNU_WINDOWS"
+
ifneq "$(USE_SSL)" ""
LIBS_USED += ssl crypto
endif
DEFINITIONS += __WXWIDGETS__
use_unicode =
ifneq "$(findstring UNICODE, $(DEFINITIONS))" ""
-# ifeq "$(OP_SYSTEM)" "WIN32"
- use_unicode = true
-# endif
+ use_unicode = true
endif
# decide whether to turn on the unicode flag or not.
ifneq "$(USE_CURL)" ""
COMPILER_FLAGS += `curl-config --cflags`
- LOAD_FLAG_SUFFIX += `curl-config --static-libs`
+ LOAD_FLAG_SUFFIX += `curl-config --libs`
endif
endif
DEFINITIONS += __WXWIDGETS__
use_unicode =
ifneq "$(findstring UNICODE, $(DEFINITIONS))" ""
-# ifeq "$(OP_SYSTEM)" "WIN32"
use_unicode = true
-# endif
endif
# decide whether to turn on the unicode flag or not.
# win32 compiler additions.
ifeq "$(OP_SYSTEM)" "WIN32"
+#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
ifneq "$(USE_CURL)" ""
+ # curl wants this win32 flag?
DEFINITIONS += _WIN32
LOCAL_HEADERS += $(THIRD_PARTY_DIR)/curl/include
LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/curl/lib
-# ifeq "$(findstring libcurl, $(LIBS_USED))" ""
- LIBS_USED += libcurl.dll.a
-# endif
+ LIBS_USED += libcurl.dll.a
endif
ifneq "$(VCPP_USE_GUI)" ""
# Adds the primary targets to the list of products to create.
ifeq "$(NO_COMPILE)" ""
- ifeq "$(OP_SYSTEM)" "UNIX"
+ ifneq "$(COMPILER)" "VISUAL_CPP"
ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%)
else
ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe)
endif
- ifeq "$(OP_SYSTEM)" "UNIX"
+ ifneq "$(COMPILER)" "VISUAL_CPP"
ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=%.so)
ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%$(TRIPART_VERSION).so)
else
$(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.cpp
ifeq "$(NO_COMPILE)" ""
ifneq "$(COMPILER)" "VISUAL_CPP"
- @echo Compiling [$(shell basename $@)]
+ @echo Building [$(shell basename $@)]
$(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi'
$(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@
else
$(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.c
ifeq "$(NO_COMPILE)" ""
ifneq "$(COMPILER)" "VISUAL_CPP"
- @echo Compiling [$@]
+ @echo Building [$@]
$(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi'
$(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@
else
$(HIDESH)-c 'if [ -f $(BUILD_LIST_FILE) ]; then $(SHELL) $(CLAM_DIR)/cpp/rebuild_oldies.sh $(MULTI_BUILD_CMD); fi'
endif
$(HIDER)rm -f $(@:%.dll=%.lib)
+ echo about to run link tool.
$(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_RESX_FLAGS) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX)
+ echo ran link tool.
ifeq "$(COMPILER_VERSION)" "8"
$(HIDESH)$(CLAM_DIR)/cpp/ms_manifest.sh "$@" "2"
endif
# creates "exe" executables using all of the appropriate objects.
-ifeq "$(OP_SYSTEM)" "WIN32"
+ifeq "$(COMPILER)" "VISUAL_CPP"
ifneq "$(NO_COMPILE)" ""
$(EXECUTABLE_DIR)/%.exe:
endif
$(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)"
endif
endif #no_compile
-endif #win32
+endif #visual studio
-ifeq "$(OP_SYSTEM)" "UNIX"
+ifneq "$(COMPILER)" "VISUAL_CPP"
ifneq "$(NO_COMPILE)" ""
$(EXECUTABLE_DIR)/%:
endif
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.