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
|
2012-03-12 04:48:42 +00:00
|
|
|
DXROOT=../../../sdk/dx
|
|
|
|
#DXROOT ?= c:/sdks/directx/dx8
|
2009-07-28 06:32:58 +00:00
|
|
|
endif
|
|
|
|
|
2010-12-19 22:29:01 +00:00
|
|
|
# for BUILD_ECHOFLAGS:
|
2012-05-01 12:37:53 +00:00
|
|
|
OURCFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) -I$(INC) -I$(SRC)
|
|
|
|
ifneq ($(PLATFORM),WII)
|
|
|
|
OURCFLAGS+= -DHAVE_VORBIS
|
|
|
|
endif
|
2012-03-23 20:22:10 +00:00
|
|
|
ifneq ($(RELEASE),0)
|
|
|
|
# Debugging disabled
|
|
|
|
debug+= $(F_NO_STACK_PROTECTOR)
|
|
|
|
endif
|
2012-03-12 04:48:42 +00:00
|
|
|
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
|
|
|
OURCXXFLAGS=$(BASECXXFLAGS)
|
2012-10-29 04:26:25 +00:00
|
|
|
OURLDFLAGS=$(BASELDFLAGS)
|
|
|
|
OURASFLAGS=$(BASEASFLAGS)
|
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
|
|
|
|
|
2012-11-05 02:49:08 +00:00
|
|
|
INVOCATION=$(CC) $(OURCONLYFLAGS)
|
|
|
|
ifneq ($(CPLUSPLUS),0)
|
|
|
|
INVOCATION=$(CXX) $(OURCXXFLAGS)
|
|
|
|
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)
|
2012-03-23 20:22:10 +00:00
|
|
|
OURCFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJECTS+= $(OBJ)/driver_directsound.o
|
|
|
|
OBJNAME=libjfaudiolib_win32.a
|
|
|
|
OBJ=obj_win
|
2009-07-27 05:47:50 +00:00
|
|
|
else
|
Add prototypical SDL 2.X support.
Doesn't work: indexed-color modes, gamma (at least for X11), mouse wheel,
special keys like ENTER or BACKSPACE in the OSD, probably more...
In build/Makefile.shared, we now have logic to autodetect an SDL2 installed
in /usr/local, however OS X and Wii builds follow other Makefile code paths,
it seems. Note that the matching SDL2_mixer must be used then, too.
In source/jaudiolib/src/driver_sdl.c, change the #includes from <SDL/SDL_xxx.h>
to "SDL_xxx.h". SDL wiki says this is the most portable way, hopefully this
doesn't break builds for anyone.
git-svn-id: https://svn.eduke32.com/eduke32@2777 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-22 21:39:53 +00:00
|
|
|
OURCFLAGS+= -DHAVE_SDL $(SDLCONFIG_CFLAGS)
|
2011-06-17 11:53:41 +00:00
|
|
|
ifneq ($(PLATFORM),DARWIN)
|
2012-03-23 20:22:10 +00:00
|
|
|
OURCFLAGS+=`pkg-config --cflags vorbis`
|
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-05 02:49:08 +00:00
|
|
|
if $(INVOCATION) $(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)
|