config.mk
author Radek Brich <radek.brich@devl.cz>
Tue, 08 Apr 2008 01:05:12 +0200
branchpyrit
changeset 60 a23b5089b9c3
parent 49 558fde7da82a
permissions -rw-r--r--
moving to SCons build system
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 41
diff changeset
     1
CXX=ccache g++
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 41
diff changeset
     2
37
5f954c0d34fc octree traversal rewritten to avoid recursion
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
     3
CCFLAGS=-g -Wall -Wno-write-strings -fno-strict-aliasing -I$(ROOT)/include
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
LDFLAGS=
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
PY_CCFLAGS=$(shell python-config --includes)
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
PY_LDFLAGS=$(shell python-config --libs)
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
SDL_CCFLAGS=$(shell sdl-config --cflags)
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
SDL_LDFLAGS=$(shell sdl-config --libs)
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
ifeq ($(OS), Windows_NT)
41
c1080cb5bd6d fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents: 37
diff changeset
    13
  CCFLAGS+=-DPTHREADS
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    14
  LDFLAGS+=-lpthreadGC2
41
c1080cb5bd6d fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents: 37
diff changeset
    15
  PY_CCFLAGS=-I"C:\Program Files\Python25\include"
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
  PY_LDFLAGS=-L"C:\Program Files\Python25\libs" -lpython25
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    17
  MODULENAME=raytracer.pyd
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    18
else
41
c1080cb5bd6d fix possible division by zero in ccdemos/common_ply.h
Radek Brich <radek.brich@devl.cz>
parents: 37
diff changeset
    19
  CCFLAGS+=-pthread -DPTHREADS -fPIC
22
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    20
  LDFLAGS+=-pthread
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    21
  MODULENAME=raytracermodule.so
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    22
endif
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    23
76b7bd51d64a new make infrastructure
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    24
# optimizations
37
5f954c0d34fc octree traversal rewritten to avoid recursion
Radek Brich <radek.brich@devl.cz>
parents: 22
diff changeset
    25
CCFLAGS+=-O3 -pipe -ffast-math -msse3