#
# What you have to check...
#

# Packages you want to use
PACKAGES = 

# Magik key if you have several makefile
# for the same platform
MAGIK_KEY = 

# Compiler, linker and archiver
CC = purify g++
LD = purify g++
AR = ar -rus

# Command for creating dependencies
DEP = g++ -MM

# Your librairies
# (for example "-lm", but not needed on most systems...)
MYLIBS =

# optimize mode
#DEBUG = OPT
# debug mode
DEBUG = DBG

# double version
#FLOATING = DOUBLE
# floating version
FLOATING = FLOAT

# Debug double mode
CFLAGS_DBG_DOUBLE = -g -Wall -pedantic-errors -DUSEDOUBLE -DDEBUG

# Debug float mode
CFLAGS_DBG_FLOAT = -g -Wall -pedantic-errors -DDEBUG

# Optimized double mode
CFLAGS_OPT_DOUBLE = -Wall -pedantic-errors -O9 -ffast-math -mcpu=i686 -march=i686 -malign-double -DUSEDOUBLE

# Optimized float mode
CFLAGS_OPT_FLOAT = -Wall -pedantic-errors -O9 -ffast-math -mcpu=i686 -march=i686 -malign-double

#
#
# Variables that you may find useful inside your Makefile
# Do not touch.
#
#

MODE = $(DEBUG)_$(FLOATING)
VERSION_KEY = $(MAGIK_KEY)$(OS)_$(MODE)
LIBS_DIR = $(TORCHDIR)/lib/$(VERSION_KEY)
OBJS_DIR = $(TORCHDIR)/objs/$(VERSION_KEY)
LIBTORCH = $(LIBS_DIR)/libtorch.a
LIBTORCHXX = $(LIBS_DIR)/libtorch++.a
ifeq ($(PACKAGES),)
  LIBS = -L$(TORCHDIR)/lib/$(VERSION_KEY) -ltorch $(MYLIBS)
else
  LIBS = -L$(TORCHDIR)/lib/$(VERSION_KEY) -ltorch++ -ltorch $(MYLIBS)
endif
INCS := -I$(TORCHDIR)/kernel
INCS += $(foreach f,$(PACKAGES),-I$(TORCHDIR)/$(f))
