aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Mesa/configs/beos
blob: 1d2eaa959957adfd245ba79ebe3adf0de0d26b24 (plain)
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
# Configuration for BeOS
# Written by Philippe Houdoin

include $(TOP)/configs/default

CONFIG_NAME = beos


DEFINES = 	\
	-DBEOS_THREADS 

MACHINE=$(shell uname -m)
ifeq ($(MACHINE), BePC)
	CPU = x86
else
	CPU = ppc
endif

ifeq ($(CPU), x86)
	# BeOS x86 settings

	DEFINES += \
		-DGNU_ASSEMBLER \
		-DUSE_X86_ASM \
		-DUSE_MMX_ASM \
		-DUSE_3DNOW_ASM \
		-DUSE_SSE_ASM
	
	ASM_SOURCES = $(X86_SOURCES) $(X86_API)

	CC = gcc
	CXX = g++
	LD = gcc
	
	CFLAGS = \
		-Wall -Wno-multichar -Wno-ctor-dtor-privacy \
		$(DEFINES)

	CXXFLAGS = $(CFLAGS)

	LDFLAGS += -Xlinker

	ifdef DEBUG
		CFLAGS   += -g -O0
		LDFLAGS += -g
		DEFINES += -DDEBUG
	else
		CFLAGS   += -O3
	endif

	GLUT_CFLAGS = -fexceptions

else
	# BeOS PPC settings

	CC = mwcc
	CXX = $(CC)
	LD = mwldppc

	CFLAGS = \
		-w on -requireprotos \
		$(DEFINES)

	CXXFLAGS = $(CFLAGS)

	LDFLAGS += \
		-export pragma \
		-init _init_routine_ \
		-term _term_routine_ \
		-lroot \
		/boot/develop/lib/ppc/glue-noinit.a \
		/boot/develop/lib/ppc/init_term_dyn.o \
		/boot/develop/lib/ppc/start_dyn.o 

	ifdef DEBUG
		CFLAGS   += -g -O0
		CXXFLAGS += -g -O0
		LDFLAGS += -g
	else
		CFLAGS   += -O7
		CXXFLAGS += -O7
	endif

	GLUT_CFLAGS = -fexceptions
endif

# Directories
SRC_DIRS = mesa glu glut/beos
GLU_DIRS = sgi
DRIVER_DIRS = beos
PROGRAM_DIRS = beos samples redbook demos tests

# Library/program dependencies
GL_LIB_DEPS = 
OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS =  
GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB)
APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)