Use -W, not -Werror, for gcc older than 3.4
[ghc-hetmet.git] / rts / ghc.mk
index e0ff690..5efcfd3 100644 (file)
@@ -131,7 +131,12 @@ $(foreach way,$(rts_WAYS),$(eval $(call build-rts-way,$(way))))
 # Flags for compiling every file
 
 # We like plenty of warnings.
-WARNING_OPTS += -Wall -Wextra
+WARNING_OPTS += -Wall
+ifeq "$(GccLT34)" "YES"
+WARNING_OPTS += -W
+else
+WARNING_OPTS += -Wextra
+endif
 WARNING_OPTS += -Wstrict-prototypes 
 WARNING_OPTS += -Wmissing-prototypes 
 WARNING_OPTS += -Wmissing-declarations
@@ -372,9 +377,9 @@ install : install_rts
 
 .PHONY: install_rts
 install_rts:
-       $(INSTALL_DIR) $(DESTDIR)$(libdir)
-       $(INSTALL_DIR) $(DESTDIR)$(libdir)/include
-       "$(CP)" $(ALL_RTS_LIBS) $(DESTDIR)$(libdir)
+       $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)
+       $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)/include
+       "$(CP)" $(ALL_RTS_LIBS) $(DESTDIR)$(ghclibdir)
 
 # -----------------------------------------------------------------------------
 # cleaning