1 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2 # Use is subject to license terms.
6 # Copyright 1994, 1995 James Clark
9 #ident "%Z%%M% %I% %E% SMI"
11 include ..
/..
/..
/..
/Makefile.cmd
14 # Where to install the binaries
15 bindir=$(exec_prefix)/sgml
16 # Extension for man pages.
18 # Directory for man pages
19 man1dir=$(prefix)/man
/man
$(man1ext)
21 # You might want to change this to uncomment this on BSD systems
24 # If you use gcc, then you must have at least version 2.6.1 and
25 # you must use -fno-implicit-templates
26 # and -O (or any optimization level >= 1).
27 # c++ is a front-end for gcc which takes care of linking with -lstdc++
28 #CXX=c++ -fno-implicit-templates -O2
30 WARN
=-Wall
-Wno-reorder
-Wwrite-strings
-Wpointer-arith
-Wnested-externs
-Woverloaded-virtual
-Wbad-function-cast
31 # Executables will be *very* large if you use -g.
33 # Add -DSP_HAVE_BOOL if you have the bool type.
34 # Add -DSP_ANSI_CLASS_INST for ANSI style explicit class template instantiation.
35 # Add -DSP_MULTI_BYTE for multi-byte support.
36 # Add -DSP_HAVE_LOCALE if you have setlocale().
37 # Add -DSP_HAVE_GETTEXT if you gettext() and friends (eg Solaris 2.3).
38 # Add -DSP_HAVE_SOCKET if you have sockets and you want support for HTTP
39 # Add -DSGML_CATALOG_FILES_DEFAULT=\"/usr/local/lib/sgml/catalog\"
40 # (for example) to change the value used if the SGML_CATALOG_FILES
41 # environment variable is unset. SP now automatically searches for a file
42 # called "catalog" in the same directory as the document entity.
43 XDEFINES
=-DSP_MULTI_BYTE
-DSP_HAVE_LOCALE
-DSP_HAVE_GETTEXT
-DSP_HAVE_SOCKET
-DSGML_CATALOG_FILES_DEFAULT
=\"/usr
/share
/lib
/sgml
/locale
/C
/dtds
/catalog
\"
45 #CXXFLAGS=-ansi $(DEBUG) $(WARN)
47 # Flag to pass to CXX to make it output list of dependencies as a Makefile.
48 LDFLAGS
+= -norunpath
-nolib
50 CFLAGS
+= $(OPT
) $(DEBUG
)
52 # Missing library functions
53 # Uncomment these if your C++ system doesn't provide them.
54 LIBOBJS
=#strerror.o memmove.o
55 # iostreams are required
56 # If you defined SP_HAVE_SOCKET, add any libraries that are needed for sockets
57 #-lsocket -lnsl needed on Solaris 2.x
58 # -lnsl on SunOS 4.1.3
60 # -L/usr/local/lib may be needed on the RS/6000
61 LIBS
+= $(ENVLDLIBS1
) $(ENVLDLIBS2
) $(XLIBS
) $(CCNEEDED
) -lc
62 # If you're building in another directory, copy or link this Makefile
63 # to the build directory, and set srcdir to point to the source directory.
67 # Uncomment this for SunOS 4.1.3 or FreeBSD
68 # (and probably other BSD flavor systems as well)
71 # perl is needed if you change or add messages
73 # Suffix for executables.
75 # Uncomment this for OS/2.
78 LIBDIRS
=lib
$(XLIBDIRS
)
79 PROGDIRS
=nsgmls
$(XPROGDIRS
)
80 dodirs
=$(LIBDIRS
) $(PROGDIRS
)
82 PURIFY
=purify
$(PURIFYFLAGS
) -g
++=yes
-collector
=`dirname \`gcc
-print-libgcc-file-name\
``/ld
84 MDEFINES
='CXX=$(CXX)' 'CC=$(CC)' 'LIBOBJS=$(LIBOBJS)' 'CXXFLAGS=$(CXXFLAGS)' \
85 'CCFLAGS=$(CCFLAGS)' \
86 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'DEFINES=$(DEFINES)' \
87 'srcdir=$(srcdir)' 'AR=$(AR)' 'RANLIB=$(RANLIB)' \
88 'M4=$(M4)' 'PERL=$(PERL)' 'LIBS=$(LIBS)' 'PURIFY=$(PURIFY)' \
89 'PIC_FLAG=$(PIC_FLAG)' 'XPROGDIRS=$(XPROGDIRS)' 'XLIBDIRS=$(XLIBDIRS)' \
90 'libMakefile=$(libMakefile)' 'EXE=$(EXE)' 'bindir=$(bindir)' \
91 'man1dir=$(man1dir)' 'man1ext=$(man1ext)' 'INSTALL=$(INSTALL)'
94 # Automatic template instantiation can cause compilers to generate
95 # various extra files; the clean target won't delete these.
96 TARGETS
=all install depend gen
clean clobber
97 libMakefile
=Makefile.lib
101 @
$(MAKE
) -f
$(srcdir)/Makefile
$(MDEFINES
) do
=$@
$(dodirs
)
105 @if
test $(srcdir) = .
; \
107 else srcdir=`cd $(srcdir); pwd`/$@
; \
109 test -d
$@ || mkdir
$@
; \
111 test -f
$$srcdir/Makefile.dep || touch
$$srcdir/Makefile.dep
; \
112 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
113 -f
$$srcdir/..
/Makefile.comm
-f
$$srcdir/Makefile.sub \
114 -f
$$srcdir/..
/$(libMakefile
) -f
$$srcdir/Makefile.dep
$(do
)
117 @if
test $(srcdir) = .
; \
119 else srcdir=`cd $(srcdir); pwd`/$@
; \
121 test -d
$@ || mkdir
$@
; \
123 test -f
$$srcdir/Makefile.dep || touch
$$srcdir/Makefile.dep
; \
124 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
125 -f
$$srcdir/..
/Makefile.comm
-f
$$srcdir/Makefile.sub \
126 -f
$$srcdir/..
/Makefile.prog
-f
$$srcdir/Makefile.dep
$(do
)
135 #version=`cat VERSION`; \
136 #rm -f sp-$$version; \
137 #ln -s `pwd` sp-$$version; \
138 #$(TAR) -c -f sp-$$version.tar.gz -h -z \
139 #--exclude sp-$$version/test/cap \
140 #--exclude sp-$$version/test/out \
141 #--exclude sp-$$version/test/err \
142 #`sed -e "s|.*|sp-$$version/&|" FILES`; \
146 #NSGMLS=`pwd`/nsgmls/nsgmls; export NSGMLS; cd $(srcdir); ./dotest