fixing generated deps interference with clean
[feisty_meow.git] / scripts / clam / cpp / rules.def
index 0b9c359933abf62421bb77ddc2ac83bf56384b1a..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`
@@ -163,8 +165,8 @@ ifneq "$(OP_SYSTEM)" "WIN32"
 endif
 
 # win32 compiler additions.
-ifeq "$(OP_SYSTEM)" "WIN32"
-#ifeq "$(COMPILER)" "VISUAL_CPP"
+#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)
@@ -207,8 +209,8 @@ ifeq "$(OP_SYSTEM)" "WIN32"
   endif
 
   ifneq "$(USE_CURL)" ""
-    # curl wants this win32 flag?
-#    DEFINITIONS += _WIN32
+#    # curl wants this win32 flag?
+    DEFINITIONS += WIN32
     LOCAL_HEADERS += $(THIRD_PARTY_DIR)/curl/include
     LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/curl/lib
 #    LIBS_USED += libcurl.dll.a
@@ -244,13 +246,13 @@ ifeq "$(OP_SYSTEM)" "WIN32"
     LOCAL_HEADERS += $(THIRD_PARTY_DIR)/openssl/include
     LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/openssl/lib
     LIBS_USED += libcrypto.lib libssl.lib
-#    LIBS_USED += libeay32.lib
     $(shell cp $(THIRD_PARTY_DIR)/openssl/lib/*dll $(EXECUTABLE_DIR) )
   endif
   
 endif
 
-ifeq "$(OP_SYSTEM)" "WIN32"
+#ifeq "$(OP_SYSTEM)" "WIN32"
+ifeq "$(COMPILER)" "VISUAL_CPP"
   # prep the actual source variable so that certain file names are translated.
   ACTUAL_RESX = $(RESX:%.resx=$(OBJECT_DIR)/%.resources)
   ACTUAL_RESX_FLAGS = $(ACTUAL_RESX:%=-ASSEMBLYLINKRESOURCE:%) 
@@ -266,7 +268,7 @@ ACTUAL_LOCAL_LIBS = $(TEMP_LOC1)
 # Create the list of objects from the list of source files.
 TEMP_OBJ1 = $(SOURCE:%.cpp=%.obj)
 TEMP_OBJ2 = $(TEMP_OBJ1:%.c=%.obj)
-ifeq "$(OP_SYSTEM)" "WIN32"
+ifeq "$(COMPILER)" "VISUAL_CPP"
   ifneq "$(OMIT_VERSIONS)" ""
     # remove version rc files if we're not dealing with versions.
     TEMP_OBJ3a = $(TEMP_OBJ2:%_version.rc=)
@@ -333,7 +335,8 @@ MULTI_BUILD_CMD = $(CC) $(COMPILER_FLAGS) -c `cat $(BUILD_LIST_FILE)` $(OBJECT_N
 # support for allocations; if regular new and DEBUG_NEW get mixed together,
 # crashes used to result.  supposedly these are gone now at least.
 ifneq "$(USE_MFC)" ""
-  ifeq "$(OP_SYSTEM)" "WIN32"
+#  ifeq "$(OP_SYSTEM)" "WIN32"
+  ifeq "$(COMPILER)" "VISUAL_CPP"
     # set the flag that says we are doing mfc extension dlls.
     DEFINITIONS += _AFXDLL
     DEPENDENCY_DEFINITIONS += _MT _DLL
@@ -347,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))" ""
@@ -357,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
 
@@ -462,7 +469,7 @@ endif
 
 # resource compiler for win32.
 
-ifeq "$(OP_SYSTEM)" "WIN32"
+ifeq "$(COMPILER)" "VISUAL_CPP"
 $(OBJECT_DIR)/%.res: %.rc $(PARAMETER_FILE)
   ifeq "$(NO_COMPILE)" ""
        @echo Resource [$@]
@@ -476,7 +483,7 @@ $(OBJECT_DIR)/%.resources: %.resx $(PARAMETER_FILE)
        $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi'
        $(VCS_ROOT)/../SDK/v1.1/bin/resgen $< $@
   endif
-else #non-win32
+else #non-visual studio
   # this platform probably does not use rc files.
 $(OBJECT_DIR)/%.res: %.rc
   ifeq "$(NO_COMPILE)" ""
@@ -670,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.