-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile.mk
More file actions
110 lines (94 loc) · 2.25 KB
/
Copy pathMakefile.mk
File metadata and controls
110 lines (94 loc) · 2.25 KB
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
109
# Copyright 2014-2016 by Charles Anthony
# Copyright 2016 by Michal Tomek
#
# All rights reserved.
#
# This software is made available under the terms of the
# ICU License -- ICU 1.8.1 and later.
# See the LICENSE file at the top-level directory of this distribution and
# at https://sourceforge.net/p/dps8m/code/ci/master/tree/LICENSE
ifneq ($(OS),Windows_NT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
OS = OSX
endif
endif
ifeq ($(OS), OSX)
msys_version = 0
else
msys_version := $(if $(findstring Msys, $(shell uname -o)),$(word 1, $(subst ., ,$(shell uname -r))),0)
endif
ifeq ($(msys_version),0)
else
CROSS=MINGW64
endif
ifeq ($(CROSS),MINGW64)
CC = x86_64-w64-mingw32-gcc
LD = x86_64-w64-mingw32-gcc
ifeq ($(msys_version),0)
AR = x86_64-w64-mingw32-ar
else
AR = ar
endif
EXE = .exe
else
#CC = gcc
#LD = gcc
CC = clang
LD = clang
endif
# for Linux (Ubuntu 12.10 64-bit) or Apple OS/X 10.8
#CFLAGS += -g -O0
CFLAGS += -g -O3
CFLAGS += $(X_FLAGS)
LDFLAGS += $(X_FLAGS)
# Our Cygwin users are using gcc.
ifeq ($(OS),Windows_NT)
CC = gcc
LD = gcc
ifeq ($(CROSS),MINGW64)
CFLAGS += -I../mingw_include
LDFLAGS += -L../mingw_lib
endif
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CFLAGS += -I /usr/local/include
LDFLAGS += -L/usr/local/lib
endif
ifeq ($(UNAME_S),FreeBSD)
CFLAGS += -I /usr/local/include -pthread
LDFLAGS += -L/usr/local/lib
endif
endif
ifneq ($(M32),)
CC = gcc
LD = gcc
endif
#CFLAGS = -m64
#CFLAGS += -I../decNumber -I../simhv40-beta -I ../include
CFLAGS += -I../decNumber -I../simh-master -I ../include
CFLAGS += -std=c99
CFLAGS += -U__STRICT_ANSI__
CFLAGS += -D_GNU_SOURCE
CFLAGS += -DUSE_READER_THREAD
CFLAGS += -DUSE_INT64
ifneq ($(CROSS),MINGW64)
CFLAGS += -DHAVE_DLOPEN=so
endif
ifneq ($(W),)
# Clang generates warning messages for code it generates itself...
CFLAGS += -Wno-array-bounds
endif
LDFLAGS += -g
MAKEFLAGS += --no-print-directory
%.o : %.c
@echo CC $<
@$(CC) -c $(CFLAGS) $(CPPFLAGS) $(X_FLAGS) $< -o $@
# This file is included as '../Makefile.mk', so it's local include needs the ../
ifneq (,$(wildcard ../Makefile.local))
$(warning ####)
$(warning #### Using ../Makefile.local)
$(warning ####)
include ../Makefile.local
endif