-SDL_CFLAGS = -I/c/mingw/include/SDL -Dmain=SDL_main
-SDL_CONFIG = /mingw/bin/sdl-config
-SDL_LIBS = -L/c/mingw/lib -lmingw32 -lSDLmain -lSDL -mwindows
+CFLAGS = -MMD -Wall -Wno-switch -Wno-uninitialized -Wno-unused -O2 -D$(SYSTYPE) -fomit-frame-pointer `sdl-config --cflags`
+CPPFLAGS = -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -Wno-uninitialized -Wno-unused -O2 -D$(SYSTYPE) \
+ -fomit-frame-pointer `sdl-config --cflags` \
+ -g
+# -DLOG_UNMAPPED_MEMORY_ACCESSES
+
+LDFLAGS =
+
+# Ugh, let's get rid of the ref to -lcurses
+LIBS = -L/usr/local/lib `sdl-config $(SDLLIBTYPE)` -lstdc++ -lz $(GLLIB) -lcurses
+
+INCS = -I. -Isrc -I/usr/local/include
+
+OBJS = \
+ obj/dis6808.o \
+ obj/dis6809.o \
+ obj/gui.o \
+ obj/log.o \
+ obj/resource.o \
+ obj/screen.o \
+ obj/v6808.o \
+ obj/v6809.o \
+ obj/thunder.o \
+ $(ICON)
+
+all: checkenv message obj $(TARGET)$(EXESUFFIX)
+ @echo
+ @echo -e "\033[01;33m***\033[00;32m Looks like it compiled OK... Give it a whirl!\033[00m"