aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/Makefile.nmake
blob: cb59f32b50b9ccdf5330fcd020a8a11901c42a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
## Makefile for building libwscodecs.dll with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#

include ..\config.nmake
include <win32.mak>
include ..\Makefile.nmake.inc

############### no need to modify below this line #########

CFLAGS=/I.. $(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
	$(GLIB_CFLAGS) -DWS_BUILD_DLL

DIRTY_CFLAGS=/I.. $(STANDARD_CFLAGS) \
	$(GLIB_CFLAGS) -DWS_BUILD_DLL

.c.obj::
	$(CC) $(CFLAGS) -Fd.\ -c $<

include Makefile.common

# if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
# XXX - if the codec files weren't in subdirectories, we could just do
# LIBWSCODECS_OBJECTS = $(LIBWSCODECS_SRC:.c=.obj), and wouldn't need rules
# for each of the codecs below
#
LIBWSCODECS_OBJECTS= \
	codecs.obj \
	G711udecode.obj \
	G711adecode.obj \
	G722decode.obj \
	G726decode.obj \
	resample.obj \
	sbc.obj

libwscodecs_LIBS = \
	$(GLIB_LIBS) \
	..\wsutil\libwsutil.lib

libwscodecs.lib: libwscodecs.dll
libwscodecs.exp: libwscodecs.dll

libwscodecs.dll : $(LIBWSCODECS_OBJECTS) ..\image\libwscodecs.res
	@echo Linking libwscodecs.dll
	$(link) $(dlllflags) $(conlibsdll) \
		$(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
		/OUT:libwscodecs.dll \
		/IMPLIB:libwscodecs.lib \
		..\image\libwscodecs.res \
		$(LIBWSCODECS_OBJECTS) $(libwscodecs_LIBS)

codecs.obj: codecs.c codecs.h
	$(CC) $(CFLAGS) -Fd.\ -c codecs.c /Fo%|fF.obj

G711adecode.obj: G711a\G711adecode.c G711a\G711adecode.h G711a\G711atable.h
	$(CC) $(CFLAGS) -Fd.\ -c G711a\G711adecode.c /Fo%|fF.obj

G711udecode.obj: G711u\G711udecode.c G711u\G711udecode.h G711u\G711utable.h
	$(CC) $(CFLAGS) -Fd.\ -c G711u\G711udecode.c /Fo%|fF.obj

G722decode.obj: G722\G722decode.c G722\G722decode.h
	$(CC) $(CFLAGS) -Fd.\ -c G722\G722decode.c /Fo%|fF.obj

G726decode.obj: G726\G726decode.c G726\G726decode.h
	$(CC) $(CFLAGS) -Fd.\ -c G726\G726decode.c /Fo%|fF.obj

resample.obj: speex\resample.c speex\arch.h speex\speex_resampler.h speex\stack_alloc.h
	$(CC) $(DIRTY_CFLAGS) -Fd.\ -c speex\resample.c /Fo%|fF.obj

sbc.obj: sbc\sbc.c sbc\sbc_private.h
	$(CC) $(CFLAGS) -Fd.\ -c sbc\sbc.c /Fo%|fF.obj

clean:
	rm -f $(LIBWSCODECS_OBJECTS) \
		libwscodecs.lib \
		libwscodecs.exp \
		libwscodecs.dll \
		libwscodecs.dll.manifest \
		*.nativecodeanalysis.xml *.pdb *.sbr

distclean: clean

maintainer-clean: distclean

checkapi:
	$(PERL) ../tools/checkAPIs.pl -g abort -g termoutput -build \
	$(LIBWSCODECS_SRC) sbc/sbc.c