-
Notifications
You must be signed in to change notification settings - Fork 22
/
GNUmake.opt
executable file
·47 lines (38 loc) · 1.07 KB
/
GNUmake.opt
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
#
# Byte ordering ... default is Intel ordering (CPL_LSB),
# Select CPL_MSB for SUNs or other platforms with MSB first ordering.
#
# BYTE_ORDER_FL = -DCPL_MSB
BYTE_ORDER_FL = -DCPL_LSB
OPTFLAGS = -g -Wall -DDEBUG $(BYTE_ORDER_FL)
INCLUDE = -I. -I.. -I../cpl
#CXXFLAGS = $(INCLUDE) -fPIC --no-rtti -fno-exceptions $(OPTFLAGS)
CFLAGS = $(INCLUDE) -fPIC $(OPTFLAGS)
LINK = ld -shared --whole-archive
#
# Default compiler is gcc,
# but for Redhat 5 systems, we must use EGCS for C++
#
ifneq ($(wildcard /usr/bin/i486-linuxlibc5-gc?),)
CC = i486-linuxlibc5-gcc
CXX = i486-linuxlibc5-gcc
CXXFLAGS = $(INCLUDE) -fPIC --no-rtti $(OPTFLAGS)
else
ifneq ($(wildcard /usr/bin/egc?),)
CC = egcs
CXX = egcs
else
ifneq ($(wildcard /usr/bin/c+?),)
CC = gcc
CXX = c++
else
CC = gcc
CXX = gcc
endif
endif
CXXFLAGS = $(INCLUDE) -fPIC --no-rtti -fno-exceptions $(OPTFLAGS)
endif
%.o: %.c
$(CC) -c $(CFLAGS) $*.c -o $*.o
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o