CC = gcc
CFLAGS = -Wall -Wno-unused-parameter -Werror
CFLAGS = -Wall -Wno-unused-parameter
INCLUDE = -Iinclude
BASENAME = carcass

ifdef DEBUGMODE
   CFLAGS = -W -Wall -O -g -DDEBUGMODE
endif

ifdef DONT_USE_EXTENSIONS
   CFLAGS += -DDONT_USE_CD
endif

ifdef PROFILEMODE
   CFLAGS += -pg
   LFLAGS += -pg
endif

ifndef PROFILEMODE 
   ifndef DEBUGMODE
      CFLAGS += -O2 -fomit-frame-pointer -funroll-loops -s
   endif
endif

ifdef CROSSCOMPILE
   MINGDIR = $(HOME)/cross-tools/bin
   ifndef XPREFIX
      XPREFIX = i386-mingw32msvc-
   endif
   CFLAGS += -DALLEGRO_WINDOWS
endif

#For Make to detect MingW automatically, the variable MINGDIR must be set
#Likewise, for DJGPP the variable DJGPP must be set
ifdef MINGDIR
   include makefile.mgw
elifdef DJGPP
   include makefile.dj
else
   include makefile.nix
endif

include makefile.lst

include makefile.all

include makefile.dep
