had to bring back curl 3rdparty for windows too, since cygwin wasn't
[feisty_meow.git] / scripts / clam / cpp / rules.def
index 7876b49f111201fe0122b0aa77f48354ab87b119..65b9c38991053b6584a8b1fbaab7b5e542bfe603 100644 (file)
 # 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
@@ -74,7 +65,7 @@ LIBS_USED += Xmu
 
   ifneq "$(USE_CURL)" ""
     COMPILER_FLAGS += `curl-config --cflags`
-    LOAD_FLAG_SUFFIX += `curl-config --static-libs`
+    LOAD_FLAG_SUFFIX += `curl-config --libs`
   endif
 
 endif
@@ -188,12 +179,11 @@ ifeq "$(OP_SYSTEM)" "WIN32"
   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)" ""
@@ -284,10 +274,10 @@ COMPILER_FLAGS += $(HEADER_SEARCH_PATH:%=-I%) $(DEFINITIONS:%=-D%) $(UNDEFINITIO
 # to search and by adding all of the code libraries that are used.
 LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%)
 ifeq "$(OP_SYSTEM)" "UNIX"
-#  ifneq "$(COMPILER)" "GNU_DARWIN"
+  ifneq "$(COMPILER)" "GNU_DARWIN"
     LOAD_FLAG_PREFIX += -Xlinker --start-group
     LOAD_FLAG_SUFFIX += -Xlinker --end-group
-#  endif
+  endif
 endif
 # had to switch from prefix to suffix recently.  oddity.
 #LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%)
@@ -407,7 +397,7 @@ endif
 $(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
@@ -424,7 +414,7 @@ endif
 $(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
@@ -509,7 +499,9 @@ $(DYNAMIC_LIBRARY_DIR)/%.dll: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL
        $(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
@@ -609,7 +601,7 @@ 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)
+       $(CATCHER)$(CLAM_BINARY_DIR)/version_stamper$(EXE_END) . $(PARAMETER_FILE)
   endif
 endif
 
@@ -695,8 +687,8 @@ else
        -$(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.