blob: c60f0d8ac3b3db496a20bdee2d83b151191449f8 [file] [log] [blame]
Brian Paula70ad912004-03-26 15:16:35 +00001# Configuration for generic Linux
2
3include $(TOP)/configs/default
4
5CONFIG_NAME = linux
6
7# Compiler and flags
8CC = gcc
9CXX = g++
10
Ian Romanick9204e872005-07-02 07:38:40 +000011OPT_FLAGS = -O3 -g
12PIC_FLAGS = -fPIC
13
14# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
15# to build properly on 64-bit platforms.
16
17ARCH_FLAGS ?=
18
19DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
Ian Romanickce9767f2006-08-24 18:06:37 +000020 -D_BSD_SOURCE -D_GNU_SOURCE \
21 -DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
Ian Romanick9204e872005-07-02 07:38:40 +000022
23X11_INCLUDES = -I/usr/X11R6/include
24
Brian Paul8e1b2ba2009-03-12 17:21:20 -060025CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
José Fonseca5976d8e2009-11-27 16:01:11 +000026 -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
27 $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
Ian Romanick9204e872005-07-02 07:38:40 +000028
José Fonseca5976d8e2009-11-27 16:01:11 +000029CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
30 $(DEFINES) $(X11_INCLUDES)
Ian Romanick9204e872005-07-02 07:38:40 +000031
Dan Nicholson013dbcd2007-10-31 09:47:39 -070032# Work around aliasing bugs - developers should comment this out
33CFLAGS += -fno-strict-aliasing
34CXXFLAGS += -fno-strict-aliasing
35
Brian Paula70ad912004-03-26 15:16:35 +000036GLUT_CFLAGS = -fexceptions
37
Ian Romanick9204e872005-07-02 07:38:40 +000038EXTRA_LIB_PATH = -L/usr/X11R6/lib