1
# This makefile compiles lame_enc.dll with mingw32 (and possibly cygwin)
2
# Of course, you must first build ../libmp3lame/libmp3lame.a.
3
# liblame_enc.a can be used to link the lame_enc.dll to your programs.
4
# Tested with EAC 0.9pb9 (my own favorite, http://www.exactaudiocopy.de/)
5
# example.exe compiles and works, too.
6
# Vladislav Naumov, <vnaum@inbox.ru>
8
# PS: to 'make clean' you need rm. MS's del is unusable.
10
# make -fMakefile.mingw32
14
OFILES = BladeMP3EncDLL.o $(DLL_NAME)_exp.o
15
CFLAGS = -I$(LAME_SRC_ROOT)/include -I$(LAME_SRC_ROOT)/libmp3lame
18
LFLAGS = -L$(LAME_SRC_ROOT)/libmp3lame -o $(DLL_NAME).dll -mdll -s
21
all: $(DLL_NAME).dll example.exe
23
BladeMP3EncDLL.o: BladeMP3EncDLL.c BladeMP3EncDLL.h ../include/lame.h \
24
../libmp3lame/lame_global_flags.h ../libmp3lame/version.h
26
$(DLL_NAME).dll : $(OFILES)
27
$(LD) $(LFLAGS) $(OFILES) $(LIBS)
29
$(DLL_NAME)_exp.o : BladeMP3EncDLL.o
30
dlltool --input-def BladeMP3EncDLL.def --output-lib lib$(DLL_NAME).a --output-exp $(DLL_NAME)_exp.o --dllname $(DLL_NAME) BladeMP3EncDLL.o
33
$(CC) $(CFLAGS) -c $< -o $@
35
example.exe : Example.cpp BladeMP3EncDLL.h
36
$(CC) Example.cpp -o example.exe
39
rm -f $(DLL_NAME).dll $(OFILES) example.exe