X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=makefile;h=ce0fa3f9dc8d99cdd8e8e6ef3190baa9088d9052;hb=82780a8852d09fa443add4565cebef4f6faefd4a;hp=bbda64736bab0690d95e369e9775075a0e2d593d;hpb=85c20cd8cfd58b533e653a7d9d32ad8823db3736;p=lugaru.git diff --git a/makefile b/makefile index bbda647..ce0fa3f 100644 --- a/makefile +++ b/makefile @@ -10,6 +10,9 @@ SDLDIR := SDL12 LIBPNGDIR := libpng-1.2.8 JPEGLIBDIR := jpeg-6b ZLIBDIR := zlib-1.2.3 +OPENALDIR := OpenAL +LIBOGGDIR := libogg-1.0 +LIBVORBISDIR := libvorbis-1.0.1 EXE := $(RUNDIR)/lugaru-bin @@ -53,6 +56,7 @@ endif ifeq ($(strip $(use_fmod)),false) DEFINES += -DUSE_OPENAL=1 + INCLUDES += -I$(OPENALDIR)/include -I$(LIBOGGDIR)/include -I$(LIBVORBISDIR)/include endif @@ -74,7 +78,9 @@ else endif ifeq ($(strip $(use_fmod)),true) - LDFLAGS += ./libfmod.so + POSTLDFLAGS += -lpthread ./libfmod-linux-x86.a + else + LDFLAGS += ./openal.so endif endif @@ -205,11 +211,45 @@ ZLIBSRCS = \ ZLIBSRCS := $(foreach f,$(ZLIBSRCS),$(ZLIBDIR)/$(f)) - -ifneq ($(strip $(use_devil)),true) +OGGSRCS := \ + bitwise.o \ + framing.o + +OGGSRCS := $(foreach f,$(OGGSRCS),$(LIBOGGDIR)/src/$(f)) + +VORBISSRCS := \ + analysis.o \ + bitrate.o \ + block.o \ + codebook.o \ + envelope.o \ + floor0.o \ + floor1.o \ + info.o \ + lpc.o \ + lsp.o \ + mapping0.o \ + mdct.o \ + psy.o \ + registry.o \ + res0.o \ + sharedbook.o \ + smallft.o \ + synthesis.o \ + vorbisfile.o \ + window.o + +VORBISSRCS := $(foreach f,$(VORBISSRCS),$(LIBVORBISDIR)/lib/$(f)) + + +ifeq ($(strip $(use_devil)),false) SRCS += $(PNGSRCS) $(JPEGSRCS) $(ZLIBSRCS) endif +ifeq ($(strip $(use_fmod)),false) + SRCS += $(OGGSRCS) $(VORBISSRCS) +endif + OBJS := $(SRCS:.CC=.o) OBJS := $(OBJS:.cc=.o) OBJS := $(OBJS:.cpp=.o) @@ -249,8 +289,10 @@ clean: rm -f $(BINDIR)/$(SRCDIR)/*.o rm -f $(BINDIR)/$(SRCDIR)/logger/*.o rm -f $(BINDIR)/$(LIBPNGDIR)/*.o - rm -f $(BINDIR)/$(JPEGLIB)/*.o + rm -f $(BINDIR)/$(JPEGLIBDIR)/*.o rm -f $(BINDIR)/$(ZLIBDIR)/*.o + rm -f $(BINDIR)/$(LIBOGGDIR)/src/*.o + rm -f $(BINDIR)/$(LIBVORBISDIR)/lib/*.o rm -f $(EXE) # end of makefile ...