# -*- makefile -*-
ifeq ($(findstring EMX, $(PATH)), EMX)
CC=gcc
AR=ar
RANLIB=ar s
PLATFORM=emx
SHELL=bash
EXEEXT=.exe
OBJEXT=.o
LIBEXT=.a
#CC=gcc -Zomf
#AR=emxomfar
#RANLIB=emxomfar s
#PLATFORM=emx
#SHELL=bash
#EXEEXT=.exe
#OBJEXT=.obj
#LIBEXT=.lib
CXX=$(CC)
else
ifneq ($(DJGPP),)
CXX=gpp
RANLIB=ranlib
PLATFORM=djg
ifeq ($(TERM),cygwin)
CC=gcc -mno-cygwin
CXX=g++ -mno-cygwin
WINDRES=windres
PLATFORM=cyg
CXX=g++
PLATFORM=lnx
EXEEXT=
endif
CFLAGS+=-g -funsigned-char $(INCS) -Wall -Wno-sign-compare -pedantic -O2# -fomit-frame-pointer
LNKFLAGS+=-g
CPPFLAGS+=$(CFLAGS) -fno-exceptions -fno-rtti
# comment following lines if you dislike ncurses
# NOTE: lnx is active for any *NIX system and only ncurses mode is portable
ifeq ($(PLATFORM),lnx)
CPPFLAGS+=-D__USE_NCURSES__
STDLIBS+=-lncurses
# force not to use coprocessor features in DOS, if you have one you may remove this
ifeq ($(PLATFORM),djg)
CFLAGS+=-m386
LNKFLAGS+=-lwmemu
BIN=bin
OBJPATH=obj
LIBPATH=lib
DEPPATH=dep