1# $Id: makefile.win32,v 1.3 2002/08/10 11:49:08 t1mpy Exp $
2#
3# Win32 makefile for id3lib
4#
5# First off, copy config.h.win32 to config.h
6#
7# You should run this using 'name -f makefile.win32' from the
8# id3lib root directory (for instance, c:\projects\id3lib-3.8.0\).
9#
10# If you want a debug version of the lib, add DEBUG=1 to
11# the nmake command line.
12#
13# The library will be produced as 'id3lib.lib' for the release
14# version, or 'id3libd.lib' for the debug version.
15#
16# Comments, bugs, go to johan@linkdata.se
17# Mail me on how to run the command line compiler, and I'll flame you. RTFM.
18#
19# PS.
20# Wtf is it that everyone insists on using the Visual C++ IDE?
21# I mean, I found the instructions for building this lib under
22# the IDE posted on a mailing list. It was 4 pages long, at least.
23#
24
25CFLAGS=-nologo -I. -Iinclude -Iinclude\id3 -Izlib\include \
26	-W3 -WX -GX \
27	-DHAVE_CONFIG_H -DID3LIB_LINKOPTION=1
28
29!ifdef DEBUG
30SUFFIX=d
31CFLAGS=$(CFLAGS) -Od -Z7 -Oy- -MD -D "WIN32" -D "_DEBUG"
32!else
33SUFFIX=
34CFLAGS=$(CFLAGS) -Ox     -Oy- -MD -D "WIN32" -D "NDEBUG"
35!endif
36
37SRCDIR=src
38ZLIBDIR=zlib\src
39OBJDIR=obj$(SUFFIX)
40
41SRCS=\
42	$(SRCDIR)\c_wrapper.cpp \
43	$(SRCDIR)\field.cpp \
44	$(SRCDIR)\field_binary.cpp \
45	$(SRCDIR)\field_integer.cpp \
46	$(SRCDIR)\field_string_ascii.cpp \
47	$(SRCDIR)\field_string_unicode.cpp \
48	$(SRCDIR)\frame.cpp \
49	$(SRCDIR)\frame_impl.cpp \
50	$(SRCDIR)\frame_parse.cpp \
51	$(SRCDIR)\frame_render.cpp \
52	$(SRCDIR)\globals.cpp \
53	$(SRCDIR)\header.cpp \
54	$(SRCDIR)\header_frame.cpp \
55	$(SRCDIR)\header_tag.cpp \
56	$(SRCDIR)\helpers.cpp \
57	$(SRCDIR)\io.cpp \
58	$(SRCDIR)\io_decorators.cpp \
59	$(SRCDIR)\io_helpers.cpp \
60	$(SRCDIR)\misc_support.cpp \
61	$(SRCDIR)\mp3_parse.cpp \
62	$(SRCDIR)\readers.cpp \
63	$(SRCDIR)\spec.cpp \
64	$(SRCDIR)\tag.cpp \
65	$(SRCDIR)\tag_file.cpp \
66	$(SRCDIR)\tag_find.cpp \
67	$(SRCDIR)\tag_impl.cpp \
68	$(SRCDIR)\tag_parse.cpp \
69	$(SRCDIR)\tag_parse_lyrics3.cpp \
70	$(SRCDIR)\tag_parse_musicmatch.cpp \
71	$(SRCDIR)\tag_parse_v1.cpp \
72	$(SRCDIR)\tag_render.cpp \
73	$(SRCDIR)\utils.cpp \
74	$(SRCDIR)\writers.cpp \
75	$(ZLIBDIR)\adler32.c \
76	$(ZLIBDIR)\compress.c \
77	$(ZLIBDIR)\crc32.c \
78	$(ZLIBDIR)\deflate.c \
79	$(ZLIBDIR)\gzio.c \
80	$(ZLIBDIR)\infblock.c \
81	$(ZLIBDIR)\infcodes.c \
82	$(ZLIBDIR)\inffast.c \
83	$(ZLIBDIR)\inflate.c \
84	$(ZLIBDIR)\inftrees.c \
85	$(ZLIBDIR)\infutil.c \
86	$(ZLIBDIR)\trees.c \
87	$(ZLIBDIR)\uncompr.c \
88	$(ZLIBDIR)\zutil.c
89
90OBJS=\
91	$(OBJDIR)\c_wrapper.obj \
92	$(OBJDIR)\field.obj \
93	$(OBJDIR)\field_binary.obj \
94	$(OBJDIR)\field_integer.obj \
95	$(OBJDIR)\field_string_ascii.obj \
96	$(OBJDIR)\field_string_unicode.obj \
97	$(OBJDIR)\frame.obj \
98	$(OBJDIR)\frame_impl.obj \
99	$(OBJDIR)\frame_parse.obj \
100	$(OBJDIR)\frame_render.obj \
101	$(OBJDIR)\globals.obj \
102	$(OBJDIR)\header.obj \
103	$(OBJDIR)\header_frame.obj \
104	$(OBJDIR)\header_tag.obj \
105	$(OBJDIR)\helpers.obj \
106	$(OBJDIR)\io.obj \
107	$(OBJDIR)\io_decorators.obj \
108	$(OBJDIR)\io_helpers.obj \
109	$(OBJDIR)\misc_support.obj \
110	$(OBJDIR)\mp3_parse.obj \
111	$(OBJDIR)\readers.obj \
112	$(OBJDIR)\spec.obj \
113	$(OBJDIR)\tag.obj \
114	$(OBJDIR)\tag_file.obj \
115	$(OBJDIR)\tag_find.obj \
116	$(OBJDIR)\tag_impl.obj \
117	$(OBJDIR)\tag_parse.obj \
118	$(OBJDIR)\tag_parse_lyrics3.obj \
119	$(OBJDIR)\tag_parse_musicmatch.obj \
120	$(OBJDIR)\tag_parse_v1.obj \
121	$(OBJDIR)\tag_render.obj \
122	$(OBJDIR)\utils.obj \
123	$(OBJDIR)\writers.obj \
124	$(OBJDIR)\adler32.obj \
125	$(OBJDIR)\compress.obj \
126	$(OBJDIR)\crc32.obj \
127	$(OBJDIR)\deflate.obj \
128	$(OBJDIR)\gzio.obj \
129	$(OBJDIR)\infblock.obj \
130	$(OBJDIR)\infcodes.obj \
131	$(OBJDIR)\inffast.obj \
132	$(OBJDIR)\inflate.obj \
133	$(OBJDIR)\inftrees.obj \
134	$(OBJDIR)\infutil.obj \
135	$(OBJDIR)\trees.obj \
136	$(OBJDIR)\uncompr.obj \
137	$(OBJDIR)\zutil.obj
138
139{$(SRCDIR)}.cpp{$(OBJDIR)}.obj:
140	@if not exist $(OBJDIR) md $(OBJDIR)
141	@$(CC) $(CFLAGS) -Fo$*.obj -c $(SRCDIR)\$(*F).cpp
142
143{$(ZLIBDIR)}.c{$(OBJDIR)}.obj:
144	@if not exist $(OBJDIR) md $(OBJDIR)
145	@$(CC) $(CFLAGS) -Fo$*.obj -c $(ZLIBDIR)\$(*F).c
146
147id3lib$(SUFFIX).lib : $(OBJS)
148	@lib /nologo /out:id3lib$(SUFFIX).lib $(OBJS)
149