-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.common
123 lines (115 loc) · 2.49 KB
/
Makefile.common
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
110
111
112
113
114
115
116
117
118
119
120
121
122
# $Id: Makefile.common,v 1.12 2005/03/23 14:05:00 roca Exp $
#
# Makefile common declarations
# Edit as appropriate...
#
# WARNING: "ifeq" is a GNU gmake instruction!
# On solaris 2.X, using /usr/ccs/bin/make instead creates an error:
# "Unexpected end of line seen"
###### OS Dependant Variables ######
# edit as appropriate...
# Which OS ?
#
# automatic system detection...
# NB: command shell replaces back quotes of script shells
#
SYSTEM = $(shell uname -s)
ifeq (${SYSTEM},Linux)
OS = linux
endif
ifeq (${SYSTEM},SunOS)
OS = solaris
endif
ifeq (${SYSTEM},FreeBSD)
OS = freebsd
endif
ifeq (${SYSTEM},AIX)
OS = aix
endif
ifeq (${SYSTEM},HP-UX)
OS = hp-ux
endif
ifeq (${SYSTEM},IRIX64)
OS = irix
endif
#
# and the old way (e.g. if the above lines do not work!)
#
#OS = linux
#OS = solaris
#OS = freebsd
#OS = aix
#OS = hp-ux
#OS = irix
# OS specific variables and tools
#
ifeq (${OS},linux)
OSFLAGS = -DLINUX -fpermissive -Wwrite-strings
# Which compiler?
# NB: use -Wall for compilation warnings with gcc
#
CC = g++ -Wall
LD = g++ -Wall
# IA-64
#CC = ecc -Wall
#LD = ecc -Wall
# INSURE
#CC = /softs/stow/insure++-6.1.3/bin.linux2/insure
#LD = /softs/stow/insure++-6.1.3/bin.linux2/insure
#CC = /softs/stow/insure++-7.0/bin.linux2/insure
#LD = /softs/stow/insure++-7.0/bin.linux2/insure
# ARM
#CC = /usr/local/arm/bin/arm-linux-g++
#LD = /usr/local/arm/bin/arm-linux-g++
endif
ifeq (${OS},solaris)
# NB: __EXTENSIONS__ needed by Solaris 2.5.1
# OSFLAGS = -DSOLARIS -D__EXTENSIONS__
OSFLAGS = -DSOLARIS
# Which compiler?
# Prefer SUN's compiler (gcc created problems with readdir
# because of confusions with the UCB readdir version)
#
CC = /opt/SUNWspro/bin/CC
LD = /opt/SUNWspro/bin/CC
#CC = g++
#LD = g++
endif
ifeq (${OS},freebsd)
OSFLAGS = -DFREEBSD -I/usr/include/g++ -I/usr/include/c++/3.3
# Which compiler?
# NB: use -Wall for compilation warnings with gcc
#
CC = g++ -Wall
LD = g++ -Wall
endif
ifeq (${OS},AIX)
OSFLAGS = -DAIX
# Which compiler?
# NB: use -Wall for compilation warnings with gcc
#
CC = g++ -Wall
LD = g++ -Wall
endif
ifeq (${OS},HP-UX)
OSFLAGS = -DHP-UX
# Which compiler?
# NB: use -Wall for compilation warnings with gcc
#
CC = g++ -Wall
LD = g++ -Wall
endif
ifeq (${OS},IRIX)
OSFLAGS = -DIRIX
# Which compiler?
# NB: use -Wall for compilation warnings with gcc
#
CC = g++ -Wall
LD = g++ -Wall
endif
# Which associated tools ?
AR = ar
#AR = /usr/local/arm/bin/arm-linux-ar
RANLIB = ranlib
#RANLIB = /usr/local/arm/bin/arm-linux-ranlib
DEPEND = makedepend