-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.osi
108 lines (84 loc) · 2.17 KB
/
Makefile.osi
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Including Makefile shall have set ARCH to one of:
#
# INTEL, X86_64, PPC, IA64, MIPS, SPARC, ALPHA
#
ifeq ($(SYS_NAME),i386_linux24)
ARCH := INTEL
endif
ifeq ($(SYS_NAME),i386_linux26)
ARCH := INTEL
endif
ifeq ($(SYS_NAME),i386_fbsd_80)
ARCH := INTEL
endif
ifeq ($(SYS_NAME),i386_fbsd_81)
ARCH := INTEL
endif
ifeq ($(SYS_NAME),i386_fbsd_90)
ARCH := INTEL
endif
ifeq ($(SYS_NAME),amd64_linux24)
ARCH := X86_64
endif
ifeq ($(SYS_NAME),amd64_linux26)
ARCH := X86_64
endif
ifeq ($(SYS_NAME),sunx86_510)
ARCH := SOLARIS_X86_686
endif
#ifeq ($(SYS_NAME),sunx86_510)
#ARCH := SOLARIS_X86_AMD64
#endif
ifeq ($(SYS_NAME),sunx86_511)
ARCH := SOLARIS_X86_686
endif
#ifeq ($(SYS_NAME),sunx86_511)
#ARCH := SOLARIS_X86_AMD64
#endif
# TODO: more platforms, or find alternate mechanism. In particular,
# sparc handling will be inadequate
DEBUGGING :=
ifeq ($(ARCH),INTEL)
CC := gcc
MCAS_CFLAGS := -g -O0 -DINTEL -fomit-frame-pointer -march=i686
LDFLAGS := -lpthread
endif
ifeq ($(ARCH),X86_64)
CC := gcc
MCAS_CFLAGS := -g -O0 -DX86_64 -fomit-frame-pointer -march=athlon64
LDFLAGS := -lpthread
endif
ifeq ($(ARCH),SOLARIS_X86_686)
MCAS_CFLAGS := -KPIC -DSOLARIS_X86_686 -xarch=pentium_pro
endif
ifeq ($(ARCH),SOLARIS_X86_AMD64)
MCAS_CFLAGS := -KPIC -DSOLARIS_X86_AMD64 -xarch=amd64
endif
ifeq ($(ARCH),PPC)
CC := cc_r
MCAS_CFLAGS := -O3 -DPPC -q64 -w
LDFLAGS := -lpthread -q64
ASFLAGS := -a64
endif
ifeq ($(ARCH),IA64)
CC := gcc
MCAS_CFLAGS := -O3 -DIA64 -fomit-frame-pointer
LDFLAGS := -lpthread
endif
ifeq ($(ARCH),MIPS)
CC := gcc
MCAS_CFLAGS := -O3 -DMIPS -fomit-frame-pointer
LDFLAGS := -lpthread
endif
ifeq ($(ARCH),SPARC)
CC := /opt/SUNWspro/bin/cc
MCAS_CFLAGS := -xO3 -DSPARC sparc_mcas.il -xarch=v9b
LDFLAGS := -DSPARC sparc_mcas.il -xarch=v9b -lthread -lrt
endif
ifeq ($(ARCH),ALPHA)
CC := cc
MCAS_CFLAGS := -accept vaxc_keywords -O3 -DALPHA
MCAS_CFLAGS += -fomit-frame-pointer -DWEAK_MEM_ORDER
LDFLAGS := -lpthread
endif
MCAS_CFLAGS += $(DEBUGGING)