f988c3739af4f85fc015c10dc6a6172ab304d916
[blender-staging.git] / extern / ode / dist / ode / fbuild / Makefile
1 #########################################################################
2 #                                                                       #
3 # Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.       #
4 # All rights reserved.  Email: russ@q12.org   Web: www.q12.org          #
5 #                                                                       #
6 # This library is free software; you can redistribute it and/or         #
7 # modify it under the terms of EITHER:                                  #
8 #   (1) The GNU Lesser General Public License as published by the Free  #
9 #       Software Foundation; either version 2.1 of the License, or (at  #
10 #       your option) any later version. The text of the GNU Lesser      #
11 #       General Public License is included with this library in the     #
12 #       file LICENSE.TXT.                                               #
13 #   (2) The BSD-style license that is included with this library in     #
14 #       the file LICENSE-BSD.TXT.                                       #
15 #                                                                       #
16 # This library is distributed in the hope that it will be useful,       #
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of        #
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    #
19 # LICENSE.TXT and LICENSE-BSD.TXT for more details.                     #
20 #                                                                       #
21 #########################################################################
22
23 # currently this only works under linux, and it's a bit of a mess!
24
25 MAKEFILE_INC=../../build/Makefile.inc
26 include $(MAKEFILE_INC)
27
28 INCLUDE_PATHS=../../include
29 LIB_PATHS = ../../lib
30 DEFINES=dDOUBLE
31
32 SOURCES_CPP=test_ldlt.cpp
33 SOURCES_C=fastldlt.c fastlsolve.c fastltsolve.c
34 APPS=$(call fEXENAME,test_ldlt) $(call fEXENAME,test_dot) $(call fEXENAME,test_multidot)
35 EXTRA_CLEAN=test_ldlt test_dot test_multidot fastldlt.c fastlsolve.c fastltsolve.c fastdot.c fastmultidot.c
36
37
38 all: $(APPS)
39
40 $(call fEXENAME,test_ldlt): $(call fTARGETS,$(SOURCES_CPP) $(SOURCES_C))
41         gcc -o $@ $^ -L $(LIB_PATHS) $(call fLIB,ode) -lm
42
43 $(call fEXENAME,test_dot): test_dot.o fastdot.o
44         gcc -o $@ test_dot.o fastdot.o -L $(LIB_PATHS) $(call fLIB,ode) -lm
45
46 $(call fEXENAME,test_multidot): test_multidot.o fastmultidot.o
47         gcc -o $@ test_multidot.o fastmultidot.o -L $(LIB_PATHS) $(call fLIB,ode) -lm
48
49 fastldlt.o: fastldlt.c
50         gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $<
51
52 fastlsolve.o: fastlsolve.c
53         gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $<
54
55 fastltsolve.o: fastltsolve.c
56         gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $<
57
58 fastdot.o: fastdot.c
59         gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $<
60
61 fastmultidot.o: fastmultidot.c
62         gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $<
63
64 fastldlt.c: BuildLDLT BuildUtil ParametersF
65         ./BuildLDLT ParametersF
66
67 fastlsolve.c: BuildLDLT BuildUtil ParametersS
68         ./BuildLDLT ParametersS
69
70 fastltsolve.c: BuildLDLT BuildUtil ParametersT
71         ./BuildLDLT ParametersT
72
73 fastdot.c: BuildDot BuildUtil ParametersD
74         ./BuildDot ParametersD
75
76 fastmultidot.c: BuildMultidot BuildUtil ParametersM
77         ./BuildMultidot ParametersM