Update Makefile.lite build system.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
Evan Ramos 2014-06-23 16:24:49 -05:00 committed by Erik de Castro Lopo
parent 731655ad23
commit 9df6736ec0
33 changed files with 163 additions and 28 deletions

View File

@ -16,6 +16,17 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this # restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution. # distribution.
ifeq ($(findstring Windows,$(OS)),Windows) # "Windows" is provided by GNU Make's internal $(OS)
LIBFLAC_DEPS = share/win_utf8_io
else
ifeq ($(findstring MINGW,$(OS)),MINGW) # "MINGW" is provided by config.mk's `uname -s`
LIBFLAC_DEPS = share/win_utf8_io
else
LIBFLAC_DEPS =
endif
endif
libFLAC: $(LIBFLAC_DEPS)
flac: libFLAC share flac: libFLAC share
libFLAC++: libFLAC libFLAC++: libFLAC
metaflac: libFLAC share metaflac: libFLAC share

View File

@ -31,7 +31,7 @@
topdir = . topdir = .
.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams utils flacdiff flactimer .PHONY: all doc src examples libFLAC libFLAC++ share/win_utf8_io share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams utils flacdiff flactimer
all: doc src examples all: doc src examples
DEFAULT_CONFIG = release DEFAULT_CONFIG = release
@ -52,7 +52,7 @@ doc:
src examples: src examples:
(cd $@ && $(MAKE) -f Makefile.lite $(CONFIG)) (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++: libFLAC libFLAC++ share/win_utf8_io share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
(cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG)) (cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
flacdiff flactimer: flacdiff flactimer:

View File

@ -23,21 +23,21 @@
%.debug.o %.release.o : %.c %.debug.o %.release.o : %.c
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
%.debug.o %.release.o : %.cc %.debug.o %.release.o : %.cc
$(CCC) $(CFLAGS) -c $< -o $@ $(CCC) $(CXXFLAGS) -c $< -o $@
%.debug.o %.release.o : %.cpp %.debug.o %.release.o : %.cpp
$(CCC) $(CFLAGS) -c $< -o $@ $(CCC) $(CXXFLAGS) -c $< -o $@
%.debug.pic.o %.release.pic.o : %.c %.debug.pic.o %.release.pic.o : %.c
$(CC) $(CFLAGS) -fPIC -DPIC -c $< -o $@ $(CC) $(CFLAGS) -fPIC -DPIC -c $< -o $@
%.debug.pic.o %.release.pic.o : %.cc %.debug.pic.o %.release.pic.o : %.cc
$(CCC) $(CFLAGS) -fPIC -DPIC -c $< -o $@ $(CCC) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
%.debug.pic.o %.release.pic.o : %.cpp %.debug.pic.o %.release.pic.o : %.cpp
$(CCC) $(CFLAGS) -fPIC -DPIC -c $< -o $@ $(CCC) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
%.debug.i %.release.i : %.c %.debug.i %.release.i : %.c
$(CC) $(CFLAGS) -E $< -o $@ $(CC) $(CFLAGS) -E $< -o $@
%.debug.i %.release.i : %.cc %.debug.i %.release.i : %.cc
$(CCC) $(CFLAGS) -E $< -o $@ $(CCC) $(CXXFLAGS) -E $< -o $@
%.debug.i %.release.i : %.cpp %.debug.i %.release.i : %.cpp
$(CCC) $(CFLAGS) -E $< -o $@ $(CCC) $(CXXFLAGS) -E $< -o $@
%.debug.o %.release.o : %.s %.debug.o %.release.o : %.s
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)

View File

@ -22,6 +22,8 @@
USE_OGG ?= 1 USE_OGG ?= 1
USE_ICONV ?= 1 USE_ICONV ?= 1
USE_LROUND ?= 1
USE_FSEEKO ?= 1
# #
# debug/release selection # debug/release selection
@ -41,11 +43,10 @@ ifdef PROC_OVERRIDE
else else
ifeq ($(findstring MINGW,$(OS)),MINGW) ifeq ($(findstring MINGW,$(OS)),MINGW)
PROC := i386 # failsafe PROC := i386 # failsafe
USE_ICONV := 0
# ifeq (mingw32,$(shell gcc -dumpmachine)) # MinGW (mainline): mingw32 # ifeq (mingw32,$(shell gcc -dumpmachine)) # MinGW (mainline): mingw32
ifeq ($(findstring i686,$(shell gcc -dumpmachine)),i686) # MinGW-w64: i686-w64-mingw32 # ifeq ($(findstring i686,$(shell gcc -dumpmachine)),i686) # MinGW-w64: i686-w64-mingw32
USE_ICONV := 0 ifeq ($(findstring x86_64,$(shell gcc -dumpmachine)),x86_64) # MinGW-w64: x86_64-w64-mingw32
else ifeq ($(findstring x86_64,$(shell gcc -dumpmachine)),x86_64) # MinGW-w64: x86_64-w64-mingw32
USE_ICONV := 0
PROC := x86_64 PROC := x86_64
endif endif
else else
@ -82,7 +83,7 @@ all default: $(DEFAULT_BUILD)
VERSION=\"1.3.0\" VERSION=\"1.3.0\"
CONFIG_CFLAGS=-DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_CXX_VARARRAYS -DHAVE_LANGINFO_CODESET -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 CONFIG_CFLAGS=$(CUSTOM_CFLAGS) -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_CXX_VARARRAYS -DHAVE_LANGINFO_CODESET -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
CONFIG_CFLAGS += -DFLAC__SYS_DARWIN -arch $(PROC) CONFIG_CFLAGS += -DFLAC__SYS_DARWIN -arch $(PROC)
@ -125,3 +126,11 @@ endif
OGG_INCLUDE_DIR=$(HOME)/local/include OGG_INCLUDE_DIR=$(HOME)/local/include
OGG_LIB_DIR=$(HOME)/local/lib OGG_LIB_DIR=$(HOME)/local/lib
ifneq (0,$(USE_LROUND))
CONFIG_CFLAGS += -DHAVE_LROUND
endif
ifneq (0,$(USE_FSEEKO))
CONFIG_CFLAGS += -DHAVE_FSEEKO
endif

View File

@ -42,11 +42,14 @@ PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
DEBUG_PROGRAM = $(DEBUG_BINPATH)/$(PROGRAM_NAME) DEBUG_PROGRAM = $(DEBUG_BINPATH)/$(PROGRAM_NAME)
RELEASE_PROGRAM = $(RELEASE_BINPATH)/$(PROGRAM_NAME) RELEASE_PROGRAM = $(RELEASE_BINPATH)/$(PROGRAM_NAME)
debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -Wmissing-prototypes -Wstrict-prototypes -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -Wmissing-prototypes -Wstrict-prototypes -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH) CFLAGS = $(CFLAGS) -Wmissing-prototypes -Wstrict-prototypes
CXXFLAGS = $(CFLAGS)
LFLAGS = -L$(LIBPATH)
DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=%.debug.o) $(SRCS_NASM:%.nasm=%.debug.o) $(SRCS_S:%.s=%.debug.o) DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=%.debug.o) $(SRCS_NASM:%.nasm=%.debug.o) $(SRCS_S:%.s=%.debug.o)
RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o) $(SRCS_S:%.s=%.release.o) RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o) $(SRCS_S:%.s=%.release.o)

View File

@ -60,11 +60,14 @@ else
LINKD = $(CC) -shared LINKD = $(CC) -shared
endif endif
debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -Wmissing-prototypes -Wstrict-prototypes -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -Wmissing-prototypes -Wstrict-prototypes -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH) CFLAGS = $(CFLAGS) -Wmissing-prototypes -Wstrict-prototypes
CXXFLAGS = $(CFLAGS)
LFLAGS = -L$(LIBPATH)
DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=%.debug.o) $(SRCS_NASM:%.nasm=%.debug.o) $(SRCS_S:%.s=%.debug.o) DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=%.debug.o) $(SRCS_NASM:%.nasm=%.debug.o) $(SRCS_S:%.s=%.debug.o)
RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o) $(SRCS_S:%.s=%.release.o) RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o) $(SRCS_S:%.s=%.release.o)

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = main.c SRCS_C = main.c

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = main.c SRCS_C = main.c

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_CPP = main.cpp SRCS_CPP = main.cpp

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_CPP = main.cpp SRCS_CPP = main.cpp

View File

@ -30,7 +30,11 @@ else
endif endif
endif endif
.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams utils flacdiff flactimer ifeq ($(findstring MINGW,$(OS)),MINGW)
EXTRA_TARGETS += share/win_utf8_io
endif
.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams utils flacdiff flactimer
all: flac libFLAC libFLAC++ metaflac plugin_common $(EXTRA_TARGETS) share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams utils all: flac libFLAC libFLAC++ metaflac plugin_common $(EXTRA_TARGETS) share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams utils
DEFAULT_CONFIG = release DEFAULT_CONFIG = release

View File

@ -29,9 +29,13 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
analyze.c \ analyze.c \

View File

@ -29,9 +29,13 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
foreign_metadata.c \ foreign_metadata.c \

View File

@ -38,9 +38,13 @@ libdir = $(topdir)/objs/$(BUILD)/lib
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++ EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -lsupc++
else else
LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++ LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++
endif endif
endif
LIB_NAME = libFLAC++ LIB_NAME = libFLAC++
INCLUDES = -I$(topdir)/include INCLUDES = -I$(topdir)/include

View File

@ -37,9 +37,13 @@ topdir = ../..
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = $(OGG_LIBS) -lm LIBS = $(OGG_LIBS) -lm
endif endif
endif
LIB_NAME = libFLAC LIB_NAME = libFLAC
ifeq ($(PROC),ppc) ifeq ($(PROC),ppc)

View File

@ -29,9 +29,13 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
main.c \ main.c \

View File

@ -28,9 +28,13 @@ INCLUDES = -I./include -I$(topdir)/include -I.. $(shell xmms-config --cflags)
# refer to the static libs explicitly # refer to the static libs explicitly
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libwin_utf8_io.a $(OGG_LIBS) -lm -lsupc++ -lz
else else
LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz
endif endif
endif
SRCS_C = \ SRCS_C = \
charset.c \ charset.c \

View File

@ -46,9 +46,13 @@ replaygain_synthesis:
utf8: utf8:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG)) (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
win_utf8_io:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
clean: clean:
-(cd getopt ; $(MAKE) -f Makefile.lite clean) -(cd getopt ; $(MAKE) -f Makefile.lite clean)
-(cd grabbag ; $(MAKE) -f Makefile.lite clean) -(cd grabbag ; $(MAKE) -f Makefile.lite clean)
-(cd replaygain_analysis ; $(MAKE) -f Makefile.lite clean) -(cd replaygain_analysis ; $(MAKE) -f Makefile.lite clean)
-(cd replaygain_synthesis ; $(MAKE) -f Makefile.lite clean) -(cd replaygain_synthesis ; $(MAKE) -f Makefile.lite clean)
-(cd utf8 ; $(MAKE) -f Makefile.lite clean) -(cd utf8 ; $(MAKE) -f Makefile.lite clean)
-(cd win_utf8_io ; $(MAKE) -f Makefile.lite clean)

View File

@ -5,7 +5,7 @@
topdir = ../../.. topdir = ../../..
LIB_NAME = libgetopt LIB_NAME = libgetopt
INCLUDES = -I$(topdir)/include -I$(topdir)/include/share INCLUDES = -I$(topdir)/include
SRCS_C = \ SRCS_C = \
getopt.c \ getopt.c \

View File

@ -7,9 +7,13 @@ libdir = $(topdir)/objs/$(BUILD)/lib
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lreplaygain_analysis -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm
endif endif
endif
LIB_NAME = libgrabbag LIB_NAME = libgrabbag
INCLUDES = -I$(topdir)/include INCLUDES = -I$(topdir)/include
@ -20,7 +24,8 @@ SRCS_C = \
file.c \ file.c \
picture.c \ picture.c \
replaygain.c \ replaygain.c \
seektable.c seektable.c \
snprintf.c
include $(topdir)/build/lib.mk include $(topdir)/build/lib.mk

View File

@ -5,7 +5,7 @@
topdir = ../../.. topdir = ../../..
LIB_NAME = libreplaygain_analysis LIB_NAME = libreplaygain_analysis
INCLUDES = -I$(topdir)/include/share INCLUDES = -I$(topdir)/include
SRCS_C = \ SRCS_C = \
replaygain_analysis.c replaygain_analysis.c

View File

@ -5,7 +5,7 @@
topdir = ../../.. topdir = ../../..
LIB_NAME = libreplaygain_synthesis LIB_NAME = libreplaygain_synthesis
INCLUDES = -I./include -I$(topdir)/include -I$(topdir)/include/share INCLUDES = -I./include -I$(topdir)/include
SRCS_C = \ SRCS_C = \
replaygain_synthesis.c replaygain_synthesis.c

View File

@ -13,7 +13,7 @@ else
LIBS = -lgrabbag $(ICONV_LIBS) LIBS = -lgrabbag $(ICONV_LIBS)
endif endif
INCLUDES = -I$(topdir)/include -I$(topdir)/include/share INCLUDES = -I$(topdir)/include
SRCS_C = \ SRCS_C = \
charset.c \ charset.c \

View File

@ -0,0 +1,15 @@
#
# GNU makefile
#
topdir = ../../..
LIB_NAME = libwin_utf8_io
INCLUDES = -I$(topdir)/include
SRCS_C = \
win_utf8_io.c
include $(topdir)/build/lib.mk
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -29,9 +29,13 @@ INCLUDES = -I./include -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
main.c main.c

View File

@ -29,9 +29,13 @@ INCLUDES = -I./include -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
main.c main.c

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_CPP = \ SRCS_CPP = \
decoders.cpp \ decoders.cpp \

View File

@ -29,9 +29,13 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
bitwriter.c \ bitwriter.c \
@ -39,6 +43,7 @@ SRCS_C = \
encoders.c \ encoders.c \
format.c \ format.c \
main.c \ main.c \
md5.c \
metadata.c \ metadata.c \
metadata_manip.c \ metadata_manip.c \
metadata_object.c metadata_object.c

View File

@ -27,9 +27,13 @@ LIB_NAME = libtest_libs_common
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC $(OGG_LIBS) -lm
endif endif
endif
INCLUDES = -I$(topdir)/include INCLUDES = -I$(topdir)/include

View File

@ -29,9 +29,13 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_C = \ SRCS_C = \
main.c main.c

View File

@ -27,7 +27,15 @@ PROGRAM_NAME = test_streams
INCLUDES = -I./include -I$(topdir)/include INCLUDES = -I./include -I$(topdir)/include
LIBS = -lm ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libgrabbag.a -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lgrabbag -lwin_utf8_io -lm
else
LIBS = -lgrabbag -lm
endif
endif
SRCS_C = \ SRCS_C = \
main.c main.c

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_CPP = \ SRCS_CPP = \
main.cpp main.cpp

View File

@ -29,9 +29,13 @@ INCLUDES = -I$(topdir)/include
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
else
ifeq ($(findstring Windows,$(OS)),Windows)
LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
else else
LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
endif endif
endif
SRCS_CPP = \ SRCS_CPP = \
main.cpp main.cpp