diff --git a/src/uifc/Common.gmake b/src/uifc/Common.gmake
index 027ff389409f9a56b8afcabf753737598335cd02..a69877a6d1c078e91af1f98706a444b893e3642a 100644
--- a/src/uifc/Common.gmake
+++ b/src/uifc/Common.gmake
@@ -58,5 +58,11 @@ ifdef UIFC_NEED_CURSES
  UIFC_LDFLAGS	+=	$(CURSES_LDFLAGS)
 endif
 
+ifdef NEED_UIFC
+ CFLAGS	+=	$(UIFC_CFLAGS)
+ LDFLAGS +=	$(UIFC_LDFLAGS)
+ OBJS +=	$(UIFC_OBJS)
+endif
+
 vpath %.c $(UIFC_SRC)
 vpath %.cpp $(UIFC_SRC)