2011-09-20 14:38:12 +08:00
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
2011-09-28 13:56:06 +08:00
|
|
|
TARGET = libcocosdenshion.so
|
2011-10-28 12:19:26 +08:00
|
|
|
CCFLAGS = -Wall -g -O2 -fPIC
|
|
|
|
CXXFLAGS = -Wall -g -O2 -fPIC
|
2011-09-20 14:38:12 +08:00
|
|
|
VISIBILITY =
|
|
|
|
|
|
|
|
INCLUDES = -I.. \
|
|
|
|
-I../include \
|
|
|
|
-I../third_party/fmod/api/inc
|
|
|
|
|
|
|
|
DEFINES = -DLINUX
|
|
|
|
|
|
|
|
OBJECTS = ../Linux/FmodAudioPlayer.o \
|
|
|
|
../Linux/SimpleAudioEngine.o \
|
|
|
|
|
|
|
|
STATICLIBS =
|
2011-10-14 17:30:49 +08:00
|
|
|
SHAREDLIBS_DIR = ../third_party/fmod/api/lib
|
|
|
|
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
2011-09-20 14:38:12 +08:00
|
|
|
|
|
|
|
####### Build rules
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
|
|
|
|
|
|
|
####### Compile
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
2011-09-28 13:56:06 +08:00
|
|
|
rm -f $(OBJECTS) $(TARGET) core
|