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
|
# $Id$
#
# LynxOS with g++. Defaults to LynxOS Version 2.5.0. For Version 3.0.0,
# add "VERSION=3.0.0" to your make invocation.
debug = 1
shared_libs =
static_libs = 1
#### optimize is defined below because it is version-dependent.
ifneq ($(shell uname -s),LynxOS)
CROSS-COMPILE = 1
#### The following may need to be customized for your host or target type.
#### Or, you can source the appropriate (for your shell) Lynx SETUP file
#### before running "make".
ifeq (,$(VERSION))
VERSION=2.5.0
endif # VERSION
ifeq (,$(LYNXTARGET))
LYNXTARGET = x86
endif # LYNXTARGET
ifeq (,$(HOST_OS))
ifeq (2.5.0,$(VERSION))
HOST_OS = sunos
else
ifeq ($(LYNXTARGET),x86)
HOST_OS = sunos-coff
else
ifeq ($(LYNXTARGET),ppc)
HOST_OS = sunos-xcoff
endif # ppc
endif # x86
endif # VERSION
endif # HOST_OS
ifeq (,$(findstring /usr/lynx/$(VERSION)/$(LYNXTARGET),$(PATH)))
PATH:=\
/usr/lynx/$(VERSION)/$(LYNXTARGET)/cdk/$(HOST_OS)-$(LYNXTARGET)/bin:/usr/lynx/$(VERSION)/$(LYNXTARGET)/cdk/$(HOST_OS)-$(LYNXTARGET)/usr/bin:$(PATH)
endif # PATH
endif # ! LynxOS
ifeq (2.5.0,$(VERSION))
# NOTE: On LynxOS Version 2.5.0, optimization causes these warnings:
# warning: internal compiler error: debugging info corrupted
optimize = 0
else
optimize = 1
endif # VERSION
CC = gcc
CXX = g++
CFLAGS += -mthreads -pipe -ansi -Wpointer-arith
#### -Winline complains a lot with -O2.
#### CFLAGS += -Winline
#### LynxOS 3.0.0's g++ has a lot of warnings about non-virtual base class
#### destructors with -Wall.
ifeq (2.5.0,$(VERSION))
CFLAGS += -Wall
endif # VERSION
CCFLAGS += $(CFLAGS) -fno-implicit-templates
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
LIBS += -lnetinet -lnsl
OCFLAGS += -O2
AR = ar
ARFLAGS = ruv
RANLIB = @true
PRELIB = @true
# To save much disk space, strip all executables. Comment the
# following line out if you want to debug. Or, added "POSTLINK="
# to your make invocation.
POSTLINK = ; strip $@
|