File: Makefile

package info (click to toggle)
simbody 3.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 46,144 kB
  • ctags: 38,501
  • sloc: cpp: 229,963; ansic: 15,729; makefile: 87
file content (63 lines) | stat: -rw-r--r-- 1,541 bytes parent folder | download
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
# Makefile for building Simbody examples on Linux or Mac.
# See README_Makefile.txt for more information.
 
# Comment this out if you're building 64 bit examples (Linux only).
M32FLAG = -m32

# Uncomment DEBUG to use Simbody debug libraries instead of release libraries
# DEBUG=_d

# Default install directory
# SimTK_INSTALL_DIR=/usr/local/SimTK
#
ifeq "${SimTK_INSTALL_DIR}" ""
SimTK_HOME=/usr/local/SimTK
else
SimTK_HOME=${SimTK_INSTALL_DIR}
endif

LIB_DIR=$(SimTK_HOME)/lib
INCLUDE_DIR=$(SimTK_HOME)/include

# You would need this whole list to link with static libraries; for 
# dynamic libraries (shared objects) the others are picked up as needed.
#       -llapack -lblas -lpthread -lm -lrt
LIBS= -lSimTKsimbody$(DEBUG) -lSimTKmath$(DEBUG) -lSimTKcommon$(DEBUG)

ifeq "${DEBUG}" ""
CFLAGS = -O2 ${M32FLAG}
else
CFLAGS = -g ${M32FLAG}
endif

ALL_PROGS = \
SimbodyInstallTestNoViz \
SimbodyInstallTest \
ChainExample \
ExampleAmysIKProblem \
ExampleAssemblerPlayground \
ExampleBricardMechanism \
ExampleContactPlayground \
ExampleEventHandler  \
ExampleEventReporter  \
ExampleGears  \
ExampleKneeJoint \
ExampleLongPendulum \
ExamplePendulum \
ExampleSampleAndHold \
JaredsDude \
Rattleback

default: SimbodyInstallTestNoViz SimbodyInstallTest
	@echo Using $(SimTK_HOME) as the SimTK installation directory.


all : $(ALL_PROGS)
	@echo Using $(SimTK_HOME) as the SimTK installation directory.

# Treat all .cpp source files the same way
.cpp : 
	g++ $(CFLAGS) $< -I$(INCLUDE_DIR) -L$(LIB_DIR) $(LIBS) -o $*

clean : 
	rm $(ALL_PROGS)