-
Notifications
You must be signed in to change notification settings - Fork 267
/
Copy pathlinuxmake.mk
32 lines (22 loc) · 974 Bytes
/
linuxmake.mk
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
# New makefile to build the Cyclone physics engine for Linux.
# Determine architecture (Linux or Mac OS X).
PLATFORM = $(shell uname)
ifeq ($(PLATFORM), Linux)
LDFLAGS = -lGL -lGLU -lglut
else
$(error This OS is not Ubuntu Linux. Aborting)
endif
# Demo files path.
DEMOPATH = ./src/demos/
# Demo core files.
DEMOCOREFILES = $(DEMOPATH)main.cpp $(DEMOPATH)app.cpp $(DEMOPATH)timing.cpp
# Demo files.
DEMOLIST = ballistic bigballistic blob bridge explosion fireworks flightsim fracture platform ragdoll sailboat
# Cyclone core files.
CYCLONEFILES = ./src/body.cpp ./src/collide_coarse.cpp ./src/collide_fine.cpp ./src/contacts.cpp ./src/core.cpp ./src/fgen.cpp ./src/joints.cpp ./src/particle.cpp ./src/pcontacts.cpp ./src/pfgen.cpp ./src/plinks.cpp ./src/pworld.cpp ./src/random.cpp ./src/world.cpp
.PHONY: clean
all: $(DEMOLIST)
$(DEMOLIST):
g++ -O2 -Iinclude $(DEMOCOREFILES) $(CYCLONEFILES) $(DEMOPATH)$@/[email protected] -o $@ $(LDFLAGS)
clean:
rm $(DEMOLIST)