~ubuntu-branches/ubuntu/vivid/tidy/vivid-updates

« back to all changes in this revision

Viewing changes to build/msvc/MakeDLL.vc6

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (0.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080120214603-oqicq5jwr1exrm55
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Makefile.vc6 - for tidy - HTML parser and pretty printer
2
 
# For use with Microsoft's Visual C++ 6 nmake tool
3
 
#
4
 
#  CVS Info :
5
 
#
6
 
#     $Author: arnaud02 $
7
 
#     $Date: 2005/08/17 09:50:18 $
8
 
#     $Revision: 1.4 $
9
 
#
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.
14
 
#
15
 
#  Contributing Author(s):
16
 
#
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>
21
 
#
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.
25
 
#
26
 
#  COPYRIGHT NOTICE:
27
 
#
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.
35
 
#
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.
40
 
#
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:
44
 
#
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.
50
 
#
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.
56
 
#
57
 
# Usage:
58
 
#     nmake -f Makefile.vc6
59
 
# or
60
 
#     nmake -f Makefile.vc6 DEBUG=1
61
 
 
62
 
CC=cl
63
 
RC=rc
64
 
LD=link
65
 
 
66
 
TOPDIR=..\..
67
 
BINDIR=$(TOPDIR)\bin
68
 
INCLDIR=$(TOPDIR)\include\  
69
 
SRCDIR=$(TOPDIR)\src\  
70
 
APPDIR=$(TOPDIR)\console\  
71
 
TIDYEXT=/D SUPPORT_ACCESSIBILITY_CHECKS=1 /D SUPPORT_UTF16_ENCODINGS=1 /D SUPPORT_ASIAN_ENCODINGS=1
72
 
 
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
83
 
 
84
 
CFLAGS=/nologo /TC /W4 /FD /c /D "WIN32" /D "_MBCS" $(TIDYEXT) /I $(INCLDIR)
85
 
 
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
91
 
 
92
 
CDEBUG=/Gm /GZ /Zi /Od /MD /D "DEBUG" /D "_DEBUG"
93
 
 
94
 
## Additional flags for release compilation
95
 
# /O1   Creates small code
96
 
# /O2   Creates fast code
97
 
# /Ox   Uses maximum optimization (/Ob1gity /Gs)
98
 
 
99
 
CNDEBUG=/Ox /MD /D "NDEBUG"
100
 
 
101
 
 
102
 
NAMEFLAG=/Fo
103
 
## General flags for link
104
 
LDFLAGS= /nologo /machine:I386 /libpath:"."
105
 
LIBFLAGS= /DLL /IMPLIB:$(OBJDIR)/libtidy.lib /SUBSYSTEM:WINDOWS
106
 
 
107
 
## Additional flags for debug link
108
 
LDDEBUG=/debug /pdbtype:sept /nodefaultlib:LIBC
109
 
 
110
 
## Additional flags for release link
111
 
LDNDEBUG=/opt:nowin98 /opt:ref /pdb:none
112
 
 
113
 
#LIBS=KERNEL32.lib USER32.lib GDI32.lib COMDLG32.lib COMCTL32.lib ADVAPI32.lib IMM32.lib SHELL32.LIB OLE32.LIB
114
 
LIBS=
115
 
DEBUGLIBS=
116
 
 
117
 
!IFDEF DEBUG
118
 
CFLAGS=$(CFLAGS) $(CDEBUG)
119
 
LDFLAGS=$(LDFLAGS) $(LDDEBUG)
120
 
OBJDIR= .\debugDLL
121
 
DLLFLAG=/LDd /D _USRDLL
122
 
!ELSE
123
 
CFLAGS=$(CFLAGS) $(CNDEBUG)
124
 
LDFLAGS=$(LDFLAGS) $(LDNDEBUG)
125
 
OBJDIR= .\releaseDLL
126
 
DLLFLAG=/LD /D _USRDLL
127
 
!ENDIF
128
 
 
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
137
 
 
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
146
 
 
147
 
HFILES= $(INCLDIR)platform.h $(INCLDIR)buffio.h \
148
 
        $(INCLDIR)fileio.h $(INCLDIR)tidy.h $(INCLDIR)tidyenum.h
149
 
 
150
 
LIBHFILES= \
151
 
        $(SRCDIR)access.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 \
156
 
        $(SRCDIR)tags.h \
157
 
        $(SRCDIR)tmbstr.h       $(SRCDIR)utf8.h         $(SRCDIR)tidy-int.h
158
 
 
159
 
all:            $(BINDIR)\libtidy.dll $(BINDIR)\tidy.exe
160
 
 
161
 
$(OBJDIR) :
162
 
                if not exist $(OBJDIR) md $(OBJDIR)
163
 
 
164
 
$(BINDIR) :
165
 
                if not exist $(BINDIR) md $(BINDIR)
166
 
 
167
 
$(BINDIR)\libtidy.dll:  $(OBJFILES) $(BINDIR)
168
 
                $(LD) $(LIBFLAGS) $(OBJFILES) /OUT:$(BINDIR)\libtidy.dll
169
 
 
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
173
 
 
174
 
$(OBJFILES):    $(HFILES) $(LIBHFILES) $(CFILES) MakeDLL.vc6 $(OBJDIR)
175
 
                $(CC) -c $(DLLFLAG) $(CFLAGS) $(CFILES) $(NAMEFLAG)$(OBJDIR)\  
176
 
 
177
 
clean:
178
 
        del $(OBJFILES) $(OBJDIR)\*.* $(BINDIR)\*.*
179
 
        rd $(OBJDIR)
180
 
        rd $(BINDIR)
181
 
 
182
 
 
183