Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 1 | # Configuration for generic Linux |
| 2 | |
| 3 | include $(TOP)/configs/default |
| 4 | |
| 5 | CONFIG_NAME = linux |
| 6 | |
| 7 | # Compiler and flags |
| 8 | CC = gcc |
| 9 | CXX = g++ |
| 10 | |
Ian Romanick | 9204e87 | 2005-07-02 07:38:40 +0000 | [diff] [blame] | 11 | OPT_FLAGS = -O3 -g |
| 12 | PIC_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 | |
| 17 | ARCH_FLAGS ?= |
| 18 | |
| 19 | DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ |
Ian Romanick | ce9767f | 2006-08-24 18:06:37 +0000 | [diff] [blame] | 20 | -D_BSD_SOURCE -D_GNU_SOURCE \ |
| 21 | -DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN |
Ian Romanick | 9204e87 | 2005-07-02 07:38:40 +0000 | [diff] [blame] | 22 | |
| 23 | X11_INCLUDES = -I/usr/X11R6/include |
| 24 | |
Brian Paul | 8e1b2ba | 2009-03-12 17:21:20 -0600 | [diff] [blame] | 25 | CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \ |
José Fonseca | 5976d8e | 2009-11-27 16:01:11 +0000 | [diff] [blame] | 26 | -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ |
| 27 | $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math |
Ian Romanick | 9204e87 | 2005-07-02 07:38:40 +0000 | [diff] [blame] | 28 | |
José Fonseca | 5976d8e | 2009-11-27 16:01:11 +0000 | [diff] [blame] | 29 | CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ |
| 30 | $(DEFINES) $(X11_INCLUDES) |
Ian Romanick | 9204e87 | 2005-07-02 07:38:40 +0000 | [diff] [blame] | 31 | |
Dan Nicholson | 013dbcd | 2007-10-31 09:47:39 -0700 | [diff] [blame] | 32 | # Work around aliasing bugs - developers should comment this out |
| 33 | CFLAGS += -fno-strict-aliasing |
| 34 | CXXFLAGS += -fno-strict-aliasing |
| 35 | |
Brian Paul | a70ad91 | 2004-03-26 15:16:35 +0000 | [diff] [blame] | 36 | GLUT_CFLAGS = -fexceptions |
| 37 | |
Ian Romanick | 9204e87 | 2005-07-02 07:38:40 +0000 | [diff] [blame] | 38 | EXTRA_LIB_PATH = -L/usr/X11R6/lib |