diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 8fdb5f716..ed77900c4 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -29,6 +29,7 @@ ifeq ("@APPLIB@", "yes")
 endif
 
 ifeq ("@DMEVENTD@", "yes")
+	DEPLIBS += $(top_builddir)/daemons/dmeventd/libdevmapper-event.so
 	LVMLIBS += -ldevmapper-event
 endif
 
@@ -124,15 +125,22 @@ install_tmpfiles_configuration:
 	$(INSTALL_DIR) $(tmpfiles_dir)
 	$(INSTALL_DATA) lvm2_tmpfiles_red_hat.conf $(tmpfiles_dir)/lvm2.conf
 
-DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat \
-		     lvm2_monitoring_init_red_hat lvm2_lvmetad_init_red_hat \
-		     dm_event_systemd_red_hat.socket dm_event_systemd_red_hat.service \
-		     lvm2_monitoring_systemd_red_hat.service \
-		     lvm2_lvmetad_systemd_red_hat.socket lvm2_lvmetad_systemd_red_hat.service \
-		     lvm2_pvscan_systemd_red_hat@.service \
-		     lvm2_tmpfiles_red_hat.conf blk_availability_init_red_hat \
-		     blk_availability_systemd_red_hat.service \
-		     blkdeactivate.sh lvm2_clvmd_systemd_red_hat.service \
-		     lvm2_cmirrord_systemd_red_hat.service \
-		     lvm2_cluster_activation_systemd_red_hat.service \
-		     lvm2_cluster_activation_red_hat.sh
+CLEAN_TARGETS += \
+	blkdeactivate.sh \
+	blk_availability_init_red_hat \
+	blk_availability_systemd_red_hat.service \
+	clvmd_init_red_hat \
+	cmirrord_init_red_hat \
+	dm_event_systemd_red_hat.service \
+	dm_event_systemd_red_hat.socket \
+	lvm2_cluster_activation_red_hat.sh \
+	lvm2_cluster_activation_systemd_red_hat.service \
+	lvm2_clvmd_systemd_red_hat.service \
+	lvm2_cmirrord_systemd_red_hat.service \
+	lvm2_lvmetad_init_red_hat \
+	lvm2_lvmetad_systemd_red_hat.service \
+	lvm2_lvmetad_systemd_red_hat.socket \
+	lvm2_monitoring_init_red_hat \
+	lvm2_monitoring_systemd_red_hat.service \
+	lvm2_pvscan_systemd_red_hat@.service \
+	lvm2_tmpfiles_red_hat.conf