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 \
-I../third_party/fmod/lib64/api/inc
else
2011-09-20 14:38:12 +08:00
INCLUDES = -I.. \
-I../include \
-I../third_party/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)
SHAREDLIBS_DIR = ../third_party/fmod/lib64/api/lib
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex64
else
SHAREDLIBS_DIR = ../third_party/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