+PROGBASE = rocksndiamonds
+PROGNAME = ../$(PROGBASE)
+
+ifeq ($(PLATFORM),solaris)
+EXTRA_LDFLAGS = -lnsl -lsocket -R$(XLIB_PATH)
+PLATFORM = unix
+endif
+
+ifeq ($(PLATFORM),macosx)
+PLATFORM = unix
+TARGET=sdl
+endif
+
+ifeq ($(PLATFORM),unix)
+PROFILING_FLAGS = -pg
+endif
+
+ifeq ($(PLATFORM),cross-msdos)
+PROGBASE = rocks
+PROGNAME = ../$(PROGBASE).exe
+TARGET = allegro
+endif
+
+ifeq ($(PLATFORM),cross-win32)
+PROGNAME = ../$(PROGBASE).exe
+TARGET = sdl
+endif
+
+ifeq ($(TARGET),x11)
+SYS_CFLAGS = -DTARGET_X11 $(X11_INCL)
+SYS_LDFLAGS = $(X11_LIBS) -lX11
+endif
+
+ifeq ($(TARGET),sdl)
+SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags)
+SYS_LDFLAGS = -lSDL_image -lSDL_mixer $(shell sdl-config --libs)
+endif
+
+ifeq ($(TARGET),allegro)
+SYS_CFLAGS = -DTARGET_ALLEGRO -I$(CROSS_PATH_MSDOS)/include
+SYS_LDFLAGS = -lalleg
+endif
+
+endif # (PLATFORM != msdos)