diff --git a/clashilator.cabal b/clashilator.cabal
--- a/clashilator.cabal
+++ b/clashilator.cabal
@@ -1,11 +1,11 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.34.4.
+-- This file has been generated from package.yaml by hpack version 0.36.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           clashilator
-version:        0.1.2.1
+version:        0.1.3
 synopsis:       Automated Clash to Verilator bridge
 description:    Code generator and @Setup.hs@ hooks to generate a Verilator simulation and access it from Clash
 category:       Hardware, Development
@@ -39,11 +39,11 @@
       src
   ghc-options: -Wunused-imports
   build-depends:
-      Cabal >=3.2.1 && <3.5
-    , aeson >=1.5 && <1.6 || >=2.0 && <2.1
+      Cabal >=3.2.1 && <3.9
+    , aeson >=1.5 && <3.0
     , base >=4.14 && <5
-    , clash-ghc >=1.4.2 && <1.5 || >=1.6.1 && <1.7
-    , clash-lib >=1.4.2 && <1.5 || >=1.6.1 && <1.7
+    , clash-ghc >=1.4.2 && <2.0
+    , clash-lib >=1.4.2 && <2.0
     , containers
     , filepath
     , ghc
@@ -66,11 +66,11 @@
       src
   ghc-options: -Wunused-imports
   build-depends:
-      Cabal >=3.2.1 && <3.5
-    , aeson >=1.5 && <1.6 || >=2.0 && <2.1
+      Cabal >=3.2.1 && <3.9
+    , aeson >=1.5 && <3.0
     , base >=4.14 && <5
-    , clash-ghc >=1.4.2 && <1.5 || >=1.6.1 && <1.7
-    , clash-lib >=1.4.2 && <1.5 || >=1.6.1 && <1.7
+    , clash-ghc >=1.4.2 && <2.0
+    , clash-lib >=1.4.2 && <2.0
     , containers
     , filepath
     , ghc
diff --git a/src/Clash/Clashilator/Setup.hs b/src/Clash/Clashilator/Setup.hs
--- a/src/Clash/Clashilator/Setup.hs
+++ b/src/Clash/Clashilator/Setup.hs
@@ -28,16 +28,14 @@
 import Data.Maybe (fromMaybe)
 import System.FilePath
 import GHC (Ghc)
-#if MIN_VERSION_ghc(8,10,0)
 #if MIN_VERSION_ghc(9,0,0)
 import GHC (getSession, setSession)
-import GHC.Driver.Types (HscEnv(..))
+import GHC.Driver.Types (HscEnv (..))
 import GHC.Runtime.Linker
-#else
+#elif MIN_VERSION_ghc(8,10,0)
 import GHC (getSession, setSession)
 import HscTypes (HscEnv (..))
 import Linker
-#endif
 #endif
 
 lookupX :: String -> BuildInfo -> Maybe String
diff --git a/template/Makefile.mustache b/template/Makefile.mustache
--- a/template/Makefile.mustache
+++ b/template/Makefile.mustache
@@ -3,8 +3,7 @@
 HDL_DIR         = {{hdlDir}}
 OUT_DIR		= {{outputDir}}/obj
 VERILATOR_HDRS	= $(OUT_DIR)/VSim.h
-VERILATOR_LIB	= $(OUT_DIR)/VSim__ALL.a
-VERILATOR_OBJS  = $(OUT_DIR)/verilated.o
+VERILATOR_LIB	= $(OUT_DIR)/VSim__ALL.a $(OUT_DIR)/libverilated.a
 
 SRC_DIR         = {{outputDir}}/src
 SRCS	        = $(foreach file, Impl.cpp Impl.h Interface.h, $(SRC_DIR)/$(file))
@@ -38,7 +37,7 @@
 $(OUT_DIR)/VerilatorFFI.o: $(SRCS) $(VERILATOR_HDRS)
 	$(COMPILE.cc) $(OUTPUT_OPTION) $<
 
-$(OUT_DIR)/libVerilatorFFI.a: $(OUT_DIR)/VerilatorFFI.o $(VERILATOR_LIB) $(VERILATOR_OBJS)
+$(OUT_DIR)/libVerilatorFFI.a: $(OUT_DIR)/VerilatorFFI.o $(VERILATOR_LIB)
 	rm -f $@
 	mkdir -p $(OUT_DIR)
 	ar rcsT $@ $^
