1159b3361Sopenharmony_ci# This makefile compiles lame_enc.dll with mingw32 (and possibly cygwin) 2159b3361Sopenharmony_ci# Of course, you must first build ../libmp3lame/libmp3lame.a. 3159b3361Sopenharmony_ci# liblame_enc.a can be used to link the lame_enc.dll to your programs. 4159b3361Sopenharmony_ci# Tested with EAC 0.9pb9 (my own favorite, http://www.exactaudiocopy.de/) 5159b3361Sopenharmony_ci# example.exe compiles and works, too. 6159b3361Sopenharmony_ci# Vladislav Naumov, <vnaum@inbox.ru> 7159b3361Sopenharmony_ci# 8159b3361Sopenharmony_ci# PS: to 'make clean' you need rm. MS's del is unusable. 9159b3361Sopenharmony_ci# PPS: quick build: 10159b3361Sopenharmony_ci# make -fMakefile.mingw32 11159b3361Sopenharmony_ci 12159b3361Sopenharmony_ciDLL_NAME = lame_enc 13159b3361Sopenharmony_ciLAME_SRC_ROOT = .. 14159b3361Sopenharmony_ciOFILES = BladeMP3EncDLL.o $(DLL_NAME)_exp.o 15159b3361Sopenharmony_ciCFLAGS = -I$(LAME_SRC_ROOT)/include -I$(LAME_SRC_ROOT)/libmp3lame 16159b3361Sopenharmony_ciCC = g++ 17159b3361Sopenharmony_ciLD = g++ 18159b3361Sopenharmony_ciDLLTOOL = dlltool 19159b3361Sopenharmony_ciLFLAGS = -L$(LAME_SRC_ROOT)/libmp3lame/.libs -o $(DLL_NAME).dll -mdll -s 20159b3361Sopenharmony_ciLIBS = -lmp3lame 21159b3361Sopenharmony_ci 22159b3361Sopenharmony_ciall: $(DLL_NAME).dll example.exe 23159b3361Sopenharmony_ci 24159b3361Sopenharmony_ciBladeMP3EncDLL.o: BladeMP3EncDLL.c BladeMP3EncDLL.h ../include/lame.h \ 25159b3361Sopenharmony_ci ../libmp3lame/lame_global_flags.h ../libmp3lame/version.h 26159b3361Sopenharmony_ci 27159b3361Sopenharmony_ci$(DLL_NAME).dll : $(OFILES) 28159b3361Sopenharmony_ci $(LD) $(LFLAGS) $(OFILES) $(LIBS) 29159b3361Sopenharmony_ci 30159b3361Sopenharmony_ci$(DLL_NAME)_exp.o : BladeMP3EncDLL.o 31159b3361Sopenharmony_ci $(DLLTOOL) --input-def BladeMP3EncDLL.def --output-lib lib$(DLL_NAME).a --output-exp $(DLL_NAME)_exp.o --dllname $(DLL_NAME) BladeMP3EncDLL.o 32159b3361Sopenharmony_ci 33159b3361Sopenharmony_ci%.o : %.c 34159b3361Sopenharmony_ci $(CC) $(CFLAGS) -c $< -o $@ 35159b3361Sopenharmony_ci 36159b3361Sopenharmony_ciexample.exe : Example.cpp BladeMP3EncDLL.h 37159b3361Sopenharmony_ci $(CC) Example.cpp -o example.exe 38159b3361Sopenharmony_ci 39159b3361Sopenharmony_ciclean : 40159b3361Sopenharmony_ci rm -f $(DLL_NAME).dll $(OFILES) example.exe 41