fixing generated deps interference with clean
[feisty_meow.git] / scripts / clam / cpp / rules.def
index b9db8446457aef654d0f524dcc87b84c35c4ad03..722cb7a03a7ec03acdf1b6d57e2c9695a6f84ec1 100644 (file)
@@ -92,6 +92,8 @@ ifeq "$(COMPILER)" "GNU_WINDOWS"
     LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) )
   endif
 
+LOAD_FLAG_PREFIX += -lwsock32 -lmswsock -shared
+
   ifneq "$(USE_CURL)" ""
     COMPILER_FLAGS += `curl-config --cflags`
     LOAD_FLAG_SUFFIX += `curl-config --libs`
@@ -208,7 +210,7 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
 
   ifneq "$(USE_CURL)" ""
 #    # curl wants this win32 flag?
-#    DEFINITIONS += _WIN32
+    DEFINITIONS += WIN32
     LOCAL_HEADERS += $(THIRD_PARTY_DIR)/curl/include
     LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/curl/lib
 #    LIBS_USED += libcurl.dll.a
@@ -348,9 +350,11 @@ ifeq "$(OMIT_VERSIONS)" ""
   endif
 endif
 
-ifneq "$(GENDEPS)" ""
-  EXTRA_FIRST_TARGETS += gendeps
-endif
+# if we are cleaning up, then do not generate dependency file.
+ifeq "$(CLEAN)" ""
+  ifneq "$(GENDEPS)" ""
+    EXTRA_FIRST_TARGETS += gendeps
+  endif
 
 # only do the deps generation for makefiles that are properly marked.
 ifneq "$(findstring __BUILD_STATIC_APPLICATION__, $(DEFINITIONS))" ""
@@ -358,6 +362,8 @@ ifneq "$(findstring __BUILD_STATIC_APPLICATION__, $(DEFINITIONS))" ""
   GENERATED_DEPS_LIST = $(TARGETS:%.exe=%.gendeps)
 endif
 
+endif
+
 # Make sure that the directory for objects exists.
 ACTUAL_FIRST_TARGETS = check_requirements $(EXTRA_FIRST_TARGETS) $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation
 
@@ -671,8 +677,10 @@ endif
 
 # includes the auto-dependency information.  the dependency file is checked
 # for being up-to-date.  if not, it gets rebuilt and the make is restarted.
-ifeq "$(NO_DEPS)" ""
-  include $(DEPS_FILE)
+ifeq "$(CLEAN)" ""
+  ifeq "$(NO_DEPS)" ""
+    include $(DEPS_FILE)
+  endif
 endif
 
 # preserves intermediate files from being deleted.