#
# 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 = cxx
LD = cxx
AR = ar -rus

# Command for creating dependencies
DEP = cxx -M

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

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

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

# Debug double mode
CFLAGS_DBG_DOUBLE = -g -DUSEDOUBLE -DDEBUG

# Debug float mode
CFLAGS_DBG_FLOAT = -g -DDEBUG

# Optimized double mode
CFLAGS_OPT_DOUBLE = -arch host -O5 -DUSEDOUBLE

# Optimized float mode
CFLAGS_OPT_FLOAT = -arch host -O5

#
#
# 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))
