[project @ 2001-02-19 16:07:48 by rrt]
[ghc-hetmet.git] / ghc / driver / PackageSrc.hs
index 762b86f..81b963b 100644 (file)
@@ -46,7 +46,11 @@ package_details installing =
                             then [ clibdir ]
                             else [ ghc_src_dir cGHC_RUNTIME_DIR ],
         hs_libraries      = [ "HSrts" ],
+#ifndef mingw32_TARGET_OS
        extra_libraries   = [],
+#else
+        extra_libraries   = [ "winmm" ], -- for the threadDelay timer
+#endif
         include_dirs   = if installing
                             then [ clibdir ++ "/includes" ]
                             else [ ghc_src_dir cGHC_INCLUDE_DIR ],
@@ -67,7 +71,6 @@ package_details installing =
          , "PrelBase_Czh_static_info"
          , "PrelFloat_Fzh_static_info"
          , "PrelFloat_Dzh_static_info"
-         , "PrelAddr_Azh_static_info"
          , "PrelPtr_Ptr_static_info"
          , "PrelWord_Wzh_static_info"
          , "PrelInt_I8zh_static_info"
@@ -83,11 +86,7 @@ package_details installing =
          , "PrelBase_Czh_con_info"
          , "PrelFloat_Fzh_con_info"
          , "PrelFloat_Dzh_con_info"
-         , "PrelAddr_Azh_con_info"
          , "PrelPtr_Ptr_con_info"
-         , "PrelAddr_Wzh_con_info"
-         , "PrelAddr_I64zh_con_info"
-         , "PrelAddr_W64zh_con_info"
          , "PrelStable_StablePtr_con_info"
          , "PrelBase_False_closure"
          , "PrelBase_True_closure"
@@ -112,7 +111,13 @@ package_details installing =
                             else [ ghc_src_dir cGHC_LIB_DIR ++ "/std"
                                  , ghc_src_dir cGHC_LIB_DIR ++ "/std/cbits" ],
         hs_libraries      = [ "HSstd" ],
-       extra_libraries   = [ "HSstd_cbits" ],
+       extra_libraries   = [ "HSstd_cbits" ] ++
+#                           ifdef mingw32_TARGET_OS
+                            ["wsock32"]
+#                           else
+                            ["m"]   -- libm, that is
+#                           endif
+                            ,
         include_dirs   = if installing
                             then []
                             else [ ghc_src_dir cGHC_LIB_DIR ++ "/std/cbits" ],
@@ -120,13 +125,7 @@ package_details installing =
         package_deps   = [ "rts" ],
         extra_ghc_opts = [],
         extra_cc_opts  = [],
-        extra_ld_opts  = [
-#ifdef mingw32_TARGET_OS
-                           "-lwsock32"
-#else
-                           "-lm"
-#endif
-                        ]
+        extra_ld_opts  = []
         },
 
          Package { 
@@ -148,7 +147,13 @@ package_details installing =
          package_deps   = [],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
-         extra_ld_opts  = []
+         extra_ld_opts  = [
+#ifndef LEADING_UNDERSCORE
+                         "-u Addr_Azh_static_info"
+#else
+                         "-u _Addr_Azh_static_info"
+#endif
+                       ]
         },
 
          Package {
@@ -189,7 +194,7 @@ package_details installing =
                              then []
                              else [ cFPTOOLS_TOP_ABS ++ "/hslibs/data/cbits" ],
          c_includes     = [],
-         package_deps   = [ "lang" ],
+         package_deps   = [ "lang", "util" ],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
          extra_ld_opts  = []
@@ -205,17 +210,19 @@ package_details installing =
                              else [ cFPTOOLS_TOP_ABS ++ "/hslibs/net"
                                   , cFPTOOLS_TOP_ABS ++ "/hslibs/net/cbits" ],
          hs_libraries      = [ "HSnet" ],
-        extra_libraries   = [ "HSnet_cbits" ],
+        extra_libraries   = [ "HSnet_cbits" ] 
+                             ++ if suffixMatch "solaris2" cTARGETPLATFORM
+                                then [ "nsl",  "socket" ]
+                                else []
+                             ,
          include_dirs   = if installing
                              then []
                              else [ cFPTOOLS_TOP_ABS ++ "/hslibs/net/cbits" ],
          c_includes     = [ "HsNet.h" ],
-         package_deps   = [ "lang", "text" ],
+         package_deps   = [ "lang", "text", "concurrent" ],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
-         extra_ld_opts  = if suffixMatch "solaris2" cTARGETPLATFORM
-                             then [ "-lnsl",  "-lsocket" ]
-                             else []
+         extra_ld_opts  = []
         },
 
          Package {
@@ -257,7 +264,7 @@ package_details installing =
                              then []
                              else [ cFPTOOLS_TOP_ABS ++ "/hslibs/text/cbits" ],
          c_includes     = [ "HsText.h" ],
-         package_deps   = [ "lang", "data" ],
+         package_deps   = [ "lang" ],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
          extra_ld_opts  = []
@@ -336,13 +343,13 @@ package_details installing =
                              then [ clibdir ]
                              else [ cFPTOOLS_TOP_ABS ++ "/hslibs/win32" ],
          hs_libraries      = [ "HSwin32" ],
-        extra_libraries   = [],
+        extra_libraries   = [ "user32",  "gdi32", "winmm" ],
          include_dirs   = [],
          c_includes     = [],           -- ???
          package_deps   = [ "lang", "greencard" ],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
-         extra_ld_opts  = [ "-luser32",  "-lgdi32", "-lwinmm" ]
+         extra_ld_opts  = []
         },
 
          Package {
@@ -354,13 +361,13 @@ package_details installing =
                              then [ clibdir ]
                              else [ cFPTOOLS_TOP_ABS ++ "/hdirect/lib" ],
          hs_libraries      = [ "HScom" ],
-        extra_libraries   = [],
+        extra_libraries   = [ "user32",  "ole32",  "oleaut32", "advapi32" ],
          include_dirs   = [],
          c_includes     = [],           -- ???
          package_deps   = [ "lang" ],
          extra_ghc_opts = [],
          extra_cc_opts  = [],
-         extra_ld_opts  = [ "-luser32",  "-lole32",  "-loleaut32", "-ladvapi32" ]
+         extra_ld_opts  = []
         }
    ]