axmol/external/chipmunk/proj.linux/Makefile

66 lines
1.5 KiB
Makefile
Raw Normal View History

2012-08-02 13:02:59 +08:00
CC = gcc
CXX = g++
AR = ar
TARGET = libchipmunk.a
CCFLAGS = -Wall -std=gnu99
CXXFLAGS = -Wall
2012-08-02 13:02:59 +08:00
ARFLAGS = cr
INCLUDES = -I../include/chipmunk
DEFINES = -DLINUX
OBJECTS = ../src/chipmunk.o \
../src/cpBody.o \
../src/cpSpace.o \
../src/cpSpatialIndex.o \
../src/cpArbiter.o \
../src/cpCollision.o \
../src/cpSpaceComponent.o \
../src/cpSweep1D.o \
../src/cpArray.o \
../src/cpHashSet.o \
../src/cpSpaceHash.o \
../src/cpVect.o \
../src/cpBB.o \
../src/cpPolyShape.o \
../src/cpSpaceQuery.o \
../src/cpBBTree.o \
../src/cpShape.o \
../src/cpSpaceStep.o \
../src/constraints/cpConstraint.o \
../src/constraints/cpPivotJoint.o \
../src/constraints/cpDampedRotarySpring.o \
../src/constraints/cpRatchetJoint.o \
../src/constraints/cpDampedSpring.o \
../src/constraints/cpRotaryLimitJoint.o \
../src/constraints/cpGearJoint.o \
../src/constraints/cpSimpleMotor.o \
../src/constraints/cpGrooveJoint.o \
../src/constraints/cpSlideJoint.o \
../src/constraints/cpPinJoint.o \
debug: CCFLAGS += -g3 -O0
debug: CXXFLAGS += -g3 -O0
debug: DEFINES += -DDEBUG
debug: $(TARGET)
release: CCFLAGS += -O3
release: CXXFLAGS += -O3
release: DEFINES += -DNDEBIG
release: $(TARGET)
2012-08-02 13:02:59 +08:00
####### Build rules
$(TARGET): $(OBJECTS)
$(AR) $(ARFLAGS) $(TARGET) $(OBJECTS)
2012-08-02 13:02:59 +08:00
####### Compile
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
%.o: %.c
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
2012-08-02 13:02:59 +08:00
clean:
rm -f $(OBJECTS) $(TARGET) core