axmol/CocosDenshion/proj.linux/Makefile

49 lines
1.0 KiB
Makefile
Raw Normal View History

2011-09-20 14:38:12 +08:00
CC = gcc
CXX = g++
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 =
2011-10-28 15:43:44 +08:00
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
INCLUDES = -I.. \
-I../include \
2012-02-15 15:57:09 +08:00
-I../third_party/linux/fmod/lib64/api/inc
2011-10-28 15:43:44 +08:00
else
2011-09-20 14:38:12 +08:00
INCLUDES = -I.. \
-I../include \
2012-02-15 15:57:09 +08:00
-I../third_party/linux/fmod/api/inc
2011-10-28 15:43:44 +08:00
endif
2011-09-20 14:38:12 +08:00
DEFINES = -DLINUX
OBJECTS = ../Linux/FmodAudioPlayer.o \
../Linux/SimpleAudioEngine.o \
STATICLIBS =
2011-10-28 15:43:44 +08:00
ifeq ($(LBITS),64)
2012-02-15 15:57:09 +08:00
SHAREDLIBS_DIR = ../third_party/linux/fmod/lib64/api/lib
2011-10-28 15:43:44 +08:00
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex64
else
2012-02-15 15:57:09 +08:00
SHAREDLIBS_DIR = ../third_party/linux/fmod/api/lib
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
2011-10-28 15:43:44 +08:00
endif
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:
rm -f $(OBJECTS) $(TARGET) core