2013-03-03 10:30:39 +08:00
|
|
|
TARGET = libcocosdenshion.so
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-10-22 18:01:56 +08:00
|
|
|
INCLUDES = -I.. -I../include
|
2013-01-27 19:57:54 +08:00
|
|
|
|
2013-03-28 18:53:20 +08:00
|
|
|
##Using OpenAL
|
|
|
|
ifeq ($(OPENAL),1)
|
2013-06-22 04:01:00 +08:00
|
|
|
SOURCES = ../openal/OpenALDecoder.cpp \
|
|
|
|
../openal/SimpleAudioEngineOpenAL.cpp
|
2013-03-28 18:53:20 +08:00
|
|
|
SHAREDLIBS += -lopenal -lalut
|
|
|
|
|
2013-06-22 04:01:00 +08:00
|
|
|
ifeq ($(OPENAL_MP3),1)
|
|
|
|
DEFINES += -DENABLE_MPG123
|
|
|
|
SHAREDLIBS += -lmpg123
|
|
|
|
endif
|
|
|
|
|
2013-03-28 18:53:20 +08:00
|
|
|
ifneq ($(NOVORBIS),1)
|
|
|
|
SHAREDLIBS += -logg -lvorbis -lvorbisfile
|
2013-03-29 16:32:50 +08:00
|
|
|
else
|
2013-03-28 18:53:20 +08:00
|
|
|
DEFINES += -DDISABLE_VORBIS
|
|
|
|
endif
|
|
|
|
|
|
|
|
##Using FMOD
|
|
|
|
else
|
|
|
|
SOURCES = \
|
|
|
|
../linux/SimpleAudioEngineFMOD.cpp \
|
|
|
|
../linux/FmodAudioPlayer.cpp
|
|
|
|
|
2012-08-02 13:02:59 +08:00
|
|
|
ifeq ($(LBITS),64)
|
2013-10-22 18:01:56 +08:00
|
|
|
INCLUDES += -I../third-party/fmod/lib64/api/inc
|
2012-08-02 13:02:59 +08:00
|
|
|
else
|
2013-10-22 18:01:56 +08:00
|
|
|
INCLUDES += -I../third-party/fmod/api/inc
|
2012-08-02 13:02:59 +08:00
|
|
|
endif
|
2013-03-28 18:53:20 +08:00
|
|
|
|
|
|
|
endif
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-10-22 18:01:56 +08:00
|
|
|
COCOS_ROOT = ../../..
|
|
|
|
include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-03-03 10:30:39 +08:00
|
|
|
TARGET := $(LIB_DIR)/$(TARGET)
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-03-03 10:30:39 +08:00
|
|
|
all: $(TARGET)
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-03-03 10:30:39 +08:00
|
|
|
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
2012-09-19 03:42:57 +08:00
|
|
|
|
2013-03-03 10:30:39 +08:00
|
|
|
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|