File: Makefile_options_CC

package info (click to toggle)
torch 2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,488 kB
  • ctags: 3,217
  • sloc: cpp: 14,272; makefile: 201
file content (65 lines) | stat: -rw-r--r-- 1,295 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# What you have to check...
#

# Packages you want to use
PACKAGES = 

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

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

# Command for creating dependencies
DEP = CC -xM1

# 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 -DUSEDOUBLE -DDEBUG

# Debug float mode
CFLAGS_DBG_FLOAT = -g -DDEBUG

# Optimized double mode
CFLAGS_OPT_DOUBLE = -fast -xO5 -xarch=native -DUSEDOUBLE

# Optimized float mode
CFLAGS_OPT_FLOAT = -fast -xO5 -xarch=native

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