2010-12-19 22:29:01 +00:00
|
|
|
include ../../Makefile.common
|
|
|
|
include ../../$(EROOT)/Makefile.shared
|
|
|
|
|
2009-07-27 05:47:50 +00:00
|
|
|
OBJ=obj
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJNAME=libjfaudiolib.a
|
2009-07-27 05:47:50 +00:00
|
|
|
SRC=src
|
2010-12-19 22:29:01 +00:00
|
|
|
INC=include
|
2009-07-27 05:47:50 +00:00
|
|
|
|
2010-12-19 22:29:01 +00:00
|
|
|
# for BUILD_ECHOFLAGS:
|
2012-11-06 07:49:44 +00:00
|
|
|
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(SRC)
|
2012-05-01 12:37:53 +00:00
|
|
|
ifneq ($(PLATFORM),WII)
|
2012-12-29 10:57:24 +00:00
|
|
|
OURCOMMONFLAGS+= -DHAVE_VORBIS -DHAVE_FLAC
|
2012-05-01 12:37:53 +00:00
|
|
|
endif
|
2012-03-23 20:22:10 +00:00
|
|
|
ifneq ($(RELEASE),0)
|
|
|
|
# Debugging disabled
|
|
|
|
debug+= $(F_NO_STACK_PROTECTOR)
|
|
|
|
endif
|
2012-11-06 07:49:44 +00:00
|
|
|
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
|
2012-03-12 04:48:42 +00:00
|
|
|
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
|
|
|
OURCXXFLAGS=$(BASECXXFLAGS)
|
2012-11-06 07:49:44 +00:00
|
|
|
PRINTLDFLAGS=$(BASELDFLAGS)
|
2012-10-29 04:26:25 +00:00
|
|
|
OURASFLAGS=$(BASEASFLAGS)
|
2009-07-28 06:32:58 +00:00
|
|
|
|
2012-12-13 02:34:30 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
ifeq (1,$(SDL_FRAMEWORK))
|
|
|
|
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
2012-03-04 09:31:37 +00:00
|
|
|
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
2012-12-13 02:34:30 +00:00
|
|
|
else
|
|
|
|
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
2011-02-06 22:57:32 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-11-06 07:49:44 +00:00
|
|
|
COMPILER=$(CC) $(OURCONLYFLAGS)
|
2012-11-05 02:49:08 +00:00
|
|
|
ifneq ($(CPLUSPLUS),0)
|
2012-11-06 07:49:44 +00:00
|
|
|
COMPILER=$(CXX) $(OURCXXFLAGS)
|
2012-11-05 02:49:08 +00:00
|
|
|
endif
|
|
|
|
|
2009-07-27 05:47:50 +00:00
|
|
|
|
|
|
|
OBJECTS=$(OBJ)/drivers.o \
|
|
|
|
$(OBJ)/fx_man.o \
|
|
|
|
$(OBJ)/multivoc.o \
|
|
|
|
$(OBJ)/mix.o \
|
|
|
|
$(OBJ)/mixst.o \
|
|
|
|
$(OBJ)/pitch.o \
|
2012-12-29 10:59:21 +00:00
|
|
|
$(OBJ)/formats.o \
|
2009-07-27 05:47:50 +00:00
|
|
|
$(OBJ)/vorbis.o \
|
2012-12-29 10:57:24 +00:00
|
|
|
$(OBJ)/flac.o \
|
2009-07-27 05:47:50 +00:00
|
|
|
$(OBJ)/driver_nosound.o
|
|
|
|
|
2012-12-29 10:54:35 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
OURCOMMONFLAGS+= -Ithird-party/common/include
|
|
|
|
endif
|
|
|
|
|
2009-07-27 05:47:50 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2012-11-24 09:13:29 +00:00
|
|
|
ifeq ($(RENDERTYPE),WIN)
|
2012-12-13 02:34:30 +00:00
|
|
|
OURCOMMONFLAGS+= -DHAVE_DS -I$(DXROOT) -I$(DXROOT)/include
|
2012-11-24 09:13:29 +00:00
|
|
|
OBJECTS+= $(OBJ)/driver_directsound.o
|
|
|
|
endif
|
|
|
|
|
2012-12-29 10:54:35 +00:00
|
|
|
OURCOMMONFLAGS+= -Ithird-party/common/include
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJNAME=libjfaudiolib_win32.a
|
|
|
|
OBJ=obj_win
|
2012-11-24 09:13:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
|
|
|
OURCOMMONFLAGS+= -DHAVE_SDL
|
2012-12-13 02:34:30 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
|
|
|
endif
|
2011-06-17 11:53:41 +00:00
|
|
|
ifneq ($(PLATFORM),DARWIN)
|
2012-11-24 09:13:29 +00:00
|
|
|
ifneq ($(PLATFORM),WINDOWS)
|
|
|
|
OURCOMMONFLAGS+=`pkg-config --cflags vorbis`
|
|
|
|
endif
|
2011-06-17 11:53:41 +00:00
|
|
|
endif
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJECTS+= $(OBJ)/driver_sdl.o
|
2009-07-27 05:47:50 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
|
|
|
|
|
|
|
|
$(OBJNAME): $(OBJECTS)
|
2010-12-19 22:29:01 +00:00
|
|
|
$(BUILD_ECHOFLAGS)
|
|
|
|
$(ARCHIVE_STATUS)
|
|
|
|
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
2009-07-27 05:47:50 +00:00
|
|
|
|
|
|
|
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
|
|
|
|
-mkdir -p $(OBJ)
|
|
|
|
$(COMPILE_STATUS)
|
2012-11-06 07:49:44 +00:00
|
|
|
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
2010-08-17 20:00:44 +00:00
|
|
|
|
2009-07-27 05:47:50 +00:00
|
|
|
ifeq ($(PRETTY_OUTPUT),1)
|
|
|
|
.SILENT:
|
|
|
|
endif
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
-rm -f $(OBJECTS) $(OBJNAME)
|