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
|
|
|
# SDK locations - adjust to match your setup
|
|
|
|
ifneq ($(DXROOT_OVERRIDE),)
|
|
|
|
DXROOT ?= $(DXROOT_OVERRIDE)
|
2009-07-28 06:32:58 +00:00
|
|
|
else
|
2010-12-19 22:29:01 +00:00
|
|
|
DXROOT ?= c:/sdks/directx/dx8
|
2009-07-28 06:32:58 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-17 11:53:41 +00:00
|
|
|
CFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) $(F_NO_STACK_PROTECTOR)
|
2010-12-19 22:29:01 +00:00
|
|
|
# for BUILD_ECHOFLAGS:
|
|
|
|
OURCFLAGS=$(CFLAGS)
|
2011-05-11 22:15:35 +00:00
|
|
|
CPPFLAGS=-I$(INC) -I$(SRC) -DHAVE_VORBIS
|
2009-07-28 06:32:58 +00:00
|
|
|
|
2011-02-06 22:57:32 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
ifeq (1,$(SDL_FRAMEWORK))
|
|
|
|
APPLE_INCLUDE_DIR:=../../Apple/include
|
2012-03-04 09:31:37 +00:00
|
|
|
OURCFLAGS += -DSDL_FRAMEWORK -I$(APPLE_INCLUDE_DIR) -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
|
|
|
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
2011-02-06 22:57:32 +00:00
|
|
|
endif
|
|
|
|
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 \
|
|
|
|
$(OBJ)/vorbis.o \
|
|
|
|
$(OBJ)/driver_nosound.o
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2010-12-19 22:29:01 +00:00
|
|
|
CPPFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
|
|
|
|
OBJECTS+= $(OBJ)/driver_directsound.o
|
|
|
|
OBJNAME=libjfaudiolib_win32.a
|
|
|
|
OBJ=obj_win
|
2009-07-27 05:47:50 +00:00
|
|
|
else
|
2011-06-17 11:53:41 +00:00
|
|
|
CPPFLAGS+= -DHAVE_SDL
|
|
|
|
ifneq ($(PLATFORM),DARWIN)
|
|
|
|
CPPFLAGS+=`pkg-config --cflags vorbis`
|
|
|
|
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)
|
2011-02-06 22:57:32 +00:00
|
|
|
if $(CC) $(CPPFLAGS) $(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)
|