2011-03-11 13:57:03 +03:00
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
LIBRARY = libmpg123
|
2011-03-11 13:57:03 +03:00
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS= -c -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math
|
|
|
|
CPPFLAGS = -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOWEXT -DOPT_SSE -DREAL_IS_FLOAT -DNOXFERMEM -DNEWOLD_WRITE_SAMPLE
|
2011-03-11 13:57:03 +03:00
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
LD = ld
|
|
|
|
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBRARY).dll.a
|
2011-03-11 13:57:03 +03:00
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
STRIP = $(PREFIX)strip
|
|
|
|
|
|
|
|
UDEF= -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER
|
|
|
|
DEFINES= -DHAVE_CONFIG_H
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
INCLUDES= -I../newlib/include
|
|
|
|
|
|
|
|
LIBPATH:= -L../newlib
|
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
LIBS:= -ldll -lc.dll -lgcc
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
|
|
|
|
SRCS= \
|
|
|
|
compat.c \
|
|
|
|
dct64.c \
|
|
|
|
dct64_i386.c \
|
2013-10-02 20:44:03 +04:00
|
|
|
dither.c \
|
2011-03-11 13:57:03 +03:00
|
|
|
equalizer.c \
|
2013-10-02 20:44:03 +04:00
|
|
|
feature.c \
|
|
|
|
format.c \
|
|
|
|
frame.c \
|
2011-03-11 13:57:03 +03:00
|
|
|
icy.c \
|
2013-10-02 20:44:03 +04:00
|
|
|
icy2utf8.c \
|
2011-03-11 13:57:03 +03:00
|
|
|
id3.c \
|
|
|
|
index.c \
|
|
|
|
layer1.c \
|
|
|
|
layer2.c \
|
|
|
|
layer3.c \
|
2013-10-02 20:44:03 +04:00
|
|
|
lfs_alias.c \
|
|
|
|
libmpg123.c \
|
|
|
|
ntom.c \
|
|
|
|
optimize.c \
|
2011-03-11 13:57:03 +03:00
|
|
|
parse.c \
|
|
|
|
readers.c \
|
2013-10-02 20:44:03 +04:00
|
|
|
stringbuf.c \
|
|
|
|
synth.c \
|
|
|
|
tabinit.c
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
ASM= \
|
2013-10-02 20:44:03 +04:00
|
|
|
dct36_3dnow.S \
|
|
|
|
dct36_3dnowext.S \
|
|
|
|
dct64_3dnow.S \
|
|
|
|
dct64_3dnowext.S \
|
2011-03-11 13:57:03 +03:00
|
|
|
dct64_mmx.S \
|
2013-10-02 20:44:03 +04:00
|
|
|
dct64_sse.S \
|
|
|
|
dct64_sse_float.S \
|
|
|
|
equalizer_3dnow.S \
|
|
|
|
getcpuflags.S \
|
|
|
|
synth_3dnow.S \
|
|
|
|
synth_3dnowext.S \
|
|
|
|
synth_i586.S \
|
|
|
|
synth_i586_dither.S \
|
|
|
|
synth_mmx.S \
|
|
|
|
synth_sse.S \
|
|
|
|
synth_sse_float.S \
|
|
|
|
synth_sse_s32.S \
|
|
|
|
synth_stereo_sse_float.S\
|
|
|
|
synth_stereo_sse_S32.S \
|
|
|
|
tabinit_mmx.S
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
ASM_OBJS = $(patsubst %.S, %.o, $(ASM))
|
|
|
|
SRCS_OBJ = $(patsubst %.c, %.o, $(SRCS))
|
|
|
|
|
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
all: $(LIBRARY).dll
|
2011-03-11 13:57:03 +03:00
|
|
|
|
2013-10-02 20:44:03 +04:00
|
|
|
$(LIBRARY).dll: $(SRCS_OBJ) $(ASM_OBJS) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ libmpg123.dll.def $(SRCS_OBJ) $(ASM_OBJS) $(LIBS)
|
|
|
|
$(STRIP) $@
|
|
|
|
sed -f ../newlib/cmd1.sed libmpg123.dll.def > mem
|
|
|
|
sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
%.o : %.S $(ASM) Makefile
|
2013-10-02 20:44:03 +04:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(UDEF) $(DEFINES) $(INCLUDES) -o $@ $<
|
2011-03-11 13:57:03 +03:00
|
|
|
|
|
|
|
%.o: %.c Makefile
|
2013-10-02 20:44:03 +04:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(UDEF) $(DEFINES) $(INCLUDES) -o $@ $<
|
2011-03-12 12:36:46 +03:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
|
2011-03-11 13:57:03 +03:00
|
|
|
|