Debian Codegraph @

Dll/Makefile.mingw32

raw
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, <[email protected]>
7 #
8 # PS: to 'make clean' you need rm. MS's del is unusable.
9 # PPS: quick build:
10 # make -fMakefile.mingw32
11
12 DLL_NAME = lame_enc
13 LAME_SRC_ROOT = ..
14 OFILES = BladeMP3EncDLL.o $(DLL_NAME)_exp.o
15 CFLAGS = -I$(LAME_SRC_ROOT)/include -I$(LAME_SRC_ROOT)/libmp3lame
16 CC = g++
17 LD = g++
18 DLLTOOL = dlltool
19 LFLAGS = -L$(LAME_SRC_ROOT)/libmp3lame/.libs -o $(DLL_NAME).dll -mdll -s
20 LIBS = -lmp3lame
21
22 all: $(DLL_NAME).dll example.exe
23
24 BladeMP3EncDLL.o: BladeMP3EncDLL.c BladeMP3EncDLL.h ../include/lame.h \
25 ../libmp3lame/lame_global_flags.h ../libmp3lame/version.h
26
27 $(DLL_NAME).dll : $(OFILES)
28 $(LD) $(LFLAGS) $(OFILES) $(LIBS)
29
30 $(DLL_NAME)_exp.o : BladeMP3EncDLL.o
31 $(DLLTOOL) --input-def BladeMP3EncDLL.def --output-lib lib$(DLL_NAME).a --output-exp $(DLL_NAME)_exp.o --dllname $(DLL_NAME) BladeMP3EncDLL.o
32
33 %.o : %.c
34 $(CC) $(CFLAGS) -c $< -o $@
35
36 example.exe : Example.cpp BladeMP3EncDLL.h
37 $(CC) Example.cpp -o example.exe
38
39 clean :
40 rm -f $(DLL_NAME).dll $(OFILES) example.exe