-# gui
-OBJS += frontend/main.o frontend/plugin.o
-OBJS += frontend/plugin_lib.o frontend/common/readpng.o
-OBJS += frontend/common/fonts.o frontend/linux/plat.o
-ifeq "$(USE_GTK)" "1"
+# frontend/gui
+ifeq "$(PLATFORM)" "generic"
+OBJS += frontend/libpicofe/in_sdl.o frontend/plat_sdl.o
+OBJS += frontend/libpicofe/plat_dummy.o
+OBJS += frontend/libpicofe/linux/in_evdev.o
+USE_PLUGIN_LIB = 1
+USE_FRONTEND = 1
+endif
+ifeq "$(PLATFORM)" "pandora"
+OBJS += frontend/libpicofe/pandora/plat.o
+OBJS += frontend/libpicofe/linux/fbdev.o frontend/libpicofe/linux/xenv.o
+OBJS += frontend/libpicofe/linux/in_evdev.o
+OBJS += frontend/plat_pandora.o frontend/plat_omap.o
+frontend/main.o frontend/menu.o: CFLAGS += -include pandora/ui_feat.h
+USE_PLUGIN_LIB = 1
+USE_FRONTEND = 1
+endif
+ifeq "$(PLATFORM)" "caanoo"
+OBJS += frontend/libpicofe/gp2x/in_gp2x.o frontend/warm/warm.o
+OBJS += frontend/libpicofe/gp2x/soc_pollux.o
+OBJS += frontend/libpicofe/linux/in_evdev.o
+OBJS += frontend/plat_pollux.o frontend/in_tsbutton.o frontend/blit320.o
+libpcsxcore/new_dynarec/pcsxmem.o: CFLAGS += -DCUSTOM_MEMMAPS
+frontend/main.o frontend/menu.o: CFLAGS += -include 320240/ui_gp2x.h
+USE_PLUGIN_LIB = 1
+USE_FRONTEND = 1
+endif
+ifeq "$(PLATFORM)" "maemo"