diff --git a/src/conio/GNUmakefile b/src/conio/GNUmakefile
index ce3279e439177100fdf32fe6ed030ab984bac6da..5958f519458b96179b0f070b8bdf2536ea151d7a 100644
--- a/src/conio/GNUmakefile
+++ b/src/conio/GNUmakefile
@@ -15,25 +15,12 @@ endif
 
 ifdef WITH_SDL
  OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
- OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
 endif
 
 ifeq ($(os),netbsd)
  CFLAGS	+=	-DN_CURSES_LIB
 endif
 
-ifeq ($(os),darwin)
- ifdef WITH_SDL
-  OBJS	+=	$(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE)
- endif
-endif
-
-ifeq ($(os),darwin)
-$(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE): SDLMain.m
-	@echo $(COMPILE_MSG) $<
-	$(QUIET)$(CC) $(CFLAGS) $(CCFLAGS) -o $@ -c $<
-endif
-
 $(MTOBJODIR)$(DIRSEP)console$(OFILE).static:
 	$(QUIET)$(DELETE) $(MTOBJODIR)$(DIRSEP)console$(OFILE)*
 	$(QUIET)touch $(MTOBJODIR)$(DIRSEP)console$(OFILE).static
diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile
index 3f8f829ad12e5e22fdfd4e06b5dcf45b25c11bef..8329b17ced073225b43afecd95572261c584b01d 100644
--- a/src/xpdev/GNUmakefile
+++ b/src/xpdev/GNUmakefile
@@ -12,6 +12,22 @@ ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES)
 endif
 MT_CFLAGS	+=	$(XPDEV-MT_CFLAGS)
 
+ifdef WITH_SDL
+ MTOBJS	+=	$(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
+endif
+
+ifeq ($(os),darwin)
+ ifdef WITH_SDL
+  MTOBJS	+=	$(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE)
+ endif
+endif
+
+ifeq ($(os),darwin)
+$(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE): SDLMain.m
+	@echo $(COMPILE_MSG) $<
+	$(QUIET)$(CC) $(CFLAGS) $(CCFLAGS) -o $@ -c $<
+endif
+
 # Executable Build Rule
 $(WRAPTEST): $(MTOBJODIR)/wraptest.o $(DEPS)
 	@echo Linking $@