1
# Makefile.vc6 - for tidy - HTML parser and pretty printer
2
# For use with Microsoft's Visual C++ 6 nmake tool
7
# $Date: 2005/08/17 09:50:18 $
10
# Copyright (c) 1998-2005 World Wide Web Consortium
11
# (Massachusetts Institute of Technology, European Research
12
# Consortium for Informatics and Mathematics, Keio University).
13
# All Rights Reserved.
15
# Contributing Author(s):
17
# Dave Raggett <dsr@w3.org>
18
# Terry Teague <terry_teague@users.sourceforge.net>
19
# Mark Hale <m.j.hale@durham.ac.uk>
20
# Philippe Lhoste <PhiLho@GMX.net>
22
# The contributing author(s) would like to thank all those who
23
# helped with testing, bug fixes, and patience. This wouldn't
24
# have been possible without all of you.
28
# This software and documentation is provided "as is," and
29
# the copyright holders and contributing author(s) make no
30
# representations or warranties, express or implied, including
31
# but not limited to, warranties of merchantability or fitness
32
# for any particular purpose or that the use of the software or
33
# documentation will not infringe any third party patents,
34
# copyrights, trademarks or other rights.
36
# The copyright holders and contributing author(s) will not be
37
# liable for any direct, indirect, special or consequential damages
38
# arising out of any use of the software or documentation, even if
39
# advised of the possibility of such damage.
41
# Permission is hereby granted to use, copy, modify, and distribute
42
# this source code, or portions hereof, documentation and executables,
43
# for any purpose, without fee, subject to the following restrictions:
45
# 1. The origin of this source code must not be misrepresented.
46
# 2. Altered versions must be plainly marked as such and must
47
# not be misrepresented as being the original source.
48
# 3. This Copyright notice may not be removed or altered from any
49
# source or altered source distribution.
51
# The copyright holders and contributing author(s) specifically
52
# permit, without fee, and encourage the use of this source code
53
# as a component for supporting the Hypertext Markup Language in
54
# commercial products. If you use this source code in a product,
55
# acknowledgment is not required but would be appreciated.
58
# nmake -f Makefile.vc6
60
# nmake -f Makefile.vc6 DEBUG=1
68
INCLDIR=$(TOPDIR)\include\
70
APPDIR=$(TOPDIR)\console\
71
TIDYEXT=/D SUPPORT_ACCESSIBILITY_CHECKS=1 /D SUPPORT_UTF16_ENCODINGS=1 /D SUPPORT_ASIAN_ENCODINGS=1
73
## General flags for compilation
74
# /W4 Sets warning level 4 (max)
75
# /Za Disables Microsoft extensions (aka ANSI)
76
# /FD Generate file dependencies
77
# /c Compiles without linking
78
# /MD Use DLL version of multi-threaded C runtime library
79
# /MDd Uses debug DLL version of multi-threaded CRT.
80
# /MT Use statically linked, multi-threaded C runtime library
81
# /MTd Uses debug version of statically linked, multi-threaded CRT.
82
# In the following, replace /D "_CONSOLE" by /D "_WINDOWS" for Windows programs
84
CFLAGS=/nologo /TC /W4 /FD /c /D "WIN32" /D "_MBCS" $(TIDYEXT) /I $(INCLDIR)
86
## Additional flags for debug compilation
87
# /Gm Enables minimal rebuild
88
# /GZ Catch release-build errors in debug build
89
# /Zi Generates complete debugging information
90
# /Od Disables optimization
92
CDEBUG=/Gm /GZ /Zi /Od /MD /D "DEBUG" /D "_DEBUG"
94
## Additional flags for release compilation
95
# /O1 Creates small code
96
# /O2 Creates fast code
97
# /Ox Uses maximum optimization (/Ob1gity /Gs)
99
CNDEBUG=/Ox /MD /D "NDEBUG"
103
## General flags for link
104
LDFLAGS= /nologo /machine:I386 /libpath:"."
105
LIBFLAGS= /DLL /IMPLIB:$(OBJDIR)/libtidy.lib /SUBSYSTEM:WINDOWS
107
## Additional flags for debug link
108
LDDEBUG=/debug /pdbtype:sept /nodefaultlib:LIBC
110
## Additional flags for release link
111
LDNDEBUG=/opt:nowin98 /opt:ref /pdb:none
113
#LIBS=KERNEL32.lib USER32.lib GDI32.lib COMDLG32.lib COMCTL32.lib ADVAPI32.lib IMM32.lib SHELL32.LIB OLE32.LIB
118
CFLAGS=$(CFLAGS) $(CDEBUG)
119
LDFLAGS=$(LDFLAGS) $(LDDEBUG)
121
DLLFLAG=/LDd /D _USRDLL
123
CFLAGS=$(CFLAGS) $(CNDEBUG)
124
LDFLAGS=$(LDFLAGS) $(LDNDEBUG)
126
DLLFLAG=/LD /D _USRDLL
129
OBJFILES=$(OBJDIR)\access.obj $(OBJDIR)\attrs.obj $(OBJDIR)\istack.obj\
130
$(OBJDIR)\parser.obj $(OBJDIR)\tags.obj $(OBJDIR)\entities.obj\
131
$(OBJDIR)\lexer.obj $(OBJDIR)\pprint.obj $(OBJDIR)\clean.obj\
132
$(OBJDIR)\localize.obj $(OBJDIR)\config.obj $(OBJDIR)\alloc.obj\
133
$(OBJDIR)\attrask.obj $(OBJDIR)\attrget.obj $(OBJDIR)\buffio.obj\
134
$(OBJDIR)\tagask.obj $(OBJDIR)\fileio.obj $(OBJDIR)\streamio.obj\
135
$(OBJDIR)\tmbstr.obj $(OBJDIR)\utf8.obj $(OBJDIR)\tidylib.obj\
136
$(OBJDIR)\attrdict.obj
138
CFILES= $(SRCDIR)access.c $(SRCDIR)attrs.c $(SRCDIR)istack.c \
139
$(SRCDIR)parser.c $(SRCDIR)tags.c $(SRCDIR)entities.c \
140
$(SRCDIR)lexer.c $(SRCDIR)pprint.c $(SRCDIR)clean.c \
141
$(SRCDIR)localize.c $(SRCDIR)config.c $(SRCDIR)alloc.c \
142
$(SRCDIR)attrask.c $(SRCDIR)attrget.c $(SRCDIR)buffio.c \
143
$(SRCDIR)tagask.c $(SRCDIR)fileio.c $(SRCDIR)streamio.c\
144
$(SRCDIR)tmbstr.c $(SRCDIR)utf8.c $(SRCDIR)tidylib.c\
145
+ $(SRCDIR)\attrdict.c
147
HFILES= $(INCLDIR)platform.h $(INCLDIR)buffio.h \
148
$(INCLDIR)fileio.h $(INCLDIR)tidy.h $(INCLDIR)tidyenum.h
152
$(SRCDIR)attrdict.h $(SRCDIR)attrs.h $(SRCDIR)clean.h \
153
$(SRCDIR)config.h $(SRCDIR)entities.h \
154
$(SRCDIR)forward.h $(SRCDIR)lexer.h $(SRCDIR)message.h \
155
$(SRCDIR)parser.h $(SRCDIR)pprint.h $(SRCDIR)streamio.h \
157
$(SRCDIR)tmbstr.h $(SRCDIR)utf8.h $(SRCDIR)tidy-int.h
159
all: $(BINDIR)\libtidy.dll $(BINDIR)\tidy.exe
162
if not exist $(OBJDIR) md $(OBJDIR)
165
if not exist $(BINDIR) md $(BINDIR)
167
$(BINDIR)\libtidy.dll: $(OBJFILES) $(BINDIR)
168
$(LD) $(LIBFLAGS) $(OBJFILES) /OUT:$(BINDIR)\libtidy.dll
170
$(BINDIR)\tidy.exe: $(APPDIR)tidy.c $(HFILES) $(BINDIR)\libtidy.dll MakeDLL.vc6
171
$(CC) /D "_CONSOLE" $(CFLAGS) $(APPDIR)tidy.c $(NAMEFLAG)$(OBJDIR)\
172
$(LD) /subsystem:console $(LDFLAGS) $(OBJDIR)\tidy.obj $(LIBS) $(OBJDIR)\libtidy.lib /OUT:$(BINDIR)\tidy.exe
174
$(OBJFILES): $(HFILES) $(LIBHFILES) $(CFILES) MakeDLL.vc6 $(OBJDIR)
175
$(CC) -c $(DLLFLAG) $(CFLAGS) $(CFILES) $(NAMEFLAG)$(OBJDIR)\
178
del $(OBJFILES) $(OBJDIR)\*.* $(BINDIR)\*.*