File: Makefile

package info (click to toggle)
jade 1.2.1-47
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 8,804 kB
  • ctags: 16,991
  • sloc: cpp: 120,658; sh: 10,522; ansic: 8,228; perl: 378; makefile: 292; sed: 5
file content (147 lines) | stat: -rw-r--r-- 5,212 bytes parent folder | download | duplicates (7)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Copyright (c) 1994, 1995 James Clark
# See the file COPYING for copying permission.

prefix=/opt/local
exec_prefix=$(prefix)
# Where to install the binaries
bindir=$(exec_prefix)/bin
INSTALL=cp
# You might want to uncomment this on BSD systems
#INSTALL=install

# If you use gcc, then you must have at least version 2.6.1 and
# you must use -fno-implicit-templates
# and -O (or any optimization level >= 1).
# c++ is a front-end for gcc which takes care of linking with -lstdc++
CXX=c++ -fno-implicit-templates -O2
WARN=#-Wall -Wno-reorder -Wwrite-strings -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast
# Executables will be *very* large if you use -g.
DEBUG=
# Add -DSP_HAVE_BOOL if you have the bool type.
# Add -DSP_ANSI_CLASS_INST for ANSI style explicit class template instantiation.
# Add -DSP_MULTI_BYTE for multi-byte support.
# Add -DSP_HAVE_LOCALE if you have setlocale().
# Add -DSP_HAVE_GETTEXT if you gettext() and friends (eg Solaris 2.3).
# Add -DSP_HAVE_SOCKET if you have sockets and you want support for HTTP
# Add -DSP_MUTEX_PTHREADS if you want to use pthreads for mutexes
# Add -DSP_DECLARE_H_ERRNO if you have sockets, but netdb.h doesn't declare h_errno
#   (reportedly HPUX, Ultrix and Solaris 5.4)
# Add -DSGML_CATALOG_FILES_DEFAULT=\"/usr/local/lib/sgml/catalog\"
#   (for example) to change the value used if the SGML_CATALOG_FILES
#   environment variable is unset.  SP now automatically searches for a file
#   called "catalog" in the same directory as the document entity.
# Add -Dsig_atomic_t=int on SunOS 4.1.x with g++ (or any other platform
#  which doesn't appropriately define sig_atomic_t).
# Add -DJADE_MIF to include the Jade MIF backend
XDEFINES=
DEFINES=-DSP_HAVE_BOOL -DSP_ANSI_CLASS_INST -DSP_MULTI_BYTE $(XDEFINES)
CXXFLAGS=-ansi $(DEBUG) $(WARN)
# Flag to pass to CXX to make it output list of dependencies as a Makefile.
CXXDEPGENFLAGS=-MM
LDFLAGS=
CC=gcc
CFLAGS=-O $(DEBUG)
# Missing library functions
# Uncomment these if your C++ system doesn't provide them.
LIBOBJS=#strerror.o memmove.o
# iostreams are required
# If you defined SP_HAVE_SOCKET, add any libraries that are needed for sockets
# -lsocket -lnsl needed on Solaris 2.x
# -lnsl on SunOS 4.1.3
XLIBS=#-lsocket -lnsl
# -L/usr/local/lib may be needed on the RS/6000
LIBS=-lm $(XLIBS)
# If you're building in another directory, copy or link this Makefile
# to the build directory, and set srcdir to point to the source directory.
srcdir=.
AR=ar
RANLIB=:
# Uncomment this for SunOS 4.1.3 or FreeBSD
# (and probably other BSD flavor systems as well)
#RANLIB=ranlib
M4=m4
# perl is needed if you change or add messages
PERL=perl
# Suffix for executables.
EXE=
# Uncomment this for OS/2.
#EXE=.exe

SP_LIBDIRS=lib $(XLIBDIRS)
SP_PROGDIRS=nsgmls spam sgmlnorm spent sx $(XPROGDIRS)
JADE_LIBDIRS=grove spgrove style
JADE_PROGDIRS=jade
LIBDIRS=$(SP_LIBDIRS) $(JADE_LIBDIRS)
PROGDIRS=$(SP_PROGDIRS) $(JADE_PROGDIRS)
sp_dodirs=$(SP_LIBDIRS) $(SP_PROGDIRS)
jade_dodirs=$(LIBDIRS) $(PROGDIRS)

PURIFYFLAGS=
PURIFY=purify $(PURIFYFLAGS) -g++=yes -collector=`dirname \`gcc -print-libgcc-file-name\``/ld

MDEFINES='CXX=$(CXX)' 'CC=$(CC)' 'LIBOBJS=$(LIBOBJS)' 'CXXFLAGS=$(CXXFLAGS)' \
 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'DEFINES=$(DEFINES)' \
 'srcdir=$(srcdir)' 'AR=$(AR)' 'RANLIB=$(RANLIB)' \
 'M4=$(M4)' 'PERL=$(PERL)' 'LIBS=$(LIBS)' 'PURIFY=$(PURIFY)' \
 'PIC_FLAG=$(PIC_FLAG)' 'XPROGDIRS=$(XPROGDIRS)' 'XLIBDIRS=$(XLIBDIRS)' \
 'libMakefile=$(libMakefile)' 'EXE=$(EXE)' 'bindir=$(bindir)' \
 'INSTALL=$(INSTALL)' CXXDEPGENFLAGS='$(CXXDEPGENFLAGS)'

# Automatic template instantiation can cause compilers to generate
# various extra files; the clean target won't delete these.
TARGETS=all install depend gen clean pure
libMakefile=Makefile.lib
do=all

$(TARGETS): FORCE
	@if test -d $(srcdir)/jade; \
	then $(MAKE) -f $(srcdir)/Makefile $(MDEFINES) do=$@ $(jade_dodirs); \
	else $(MAKE) -f $(srcdir)/Makefile $(MDEFINES) do=$@ $(sp_dodirs); \
	fi

$(LIBDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	test -f $$srcdir/Makefile.dep || touch $$srcdir/Makefile.dep; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../$(libMakefile) -f $$srcdir/Makefile.dep $(do)

$(PROGDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	test -f $$srcdir/Makefile.dep || touch $$srcdir/Makefile.dep; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../Makefile.prog -f $$srcdir/Makefile.dep $(do)

$(PROGDIRS): lib

# GNU tar
TAR=tar

dist: FORCE
	version=`cat VERSION`; \
	rm -fr sp-$$version; \
	mkdir sp-$$version; \
	cd sp-$$version; \
	ln -s ../* .; \
	rm sp-$$version; \
	rm SP.mak ; \
	sed -e '/^   CD /s/[A-Z]:\\.*\\//' -e "s/$$/`echo @ | tr @ \\\\015`/" \
	  ../SP.mak >SP.mak; \
	cd ..; \
	ln -s `pwd` sp-$$version; \
	$(TAR) -c -f sp-$$version.tar.gz -h -z \
	  `sed -e "s|.*|sp-$$version/&|" FILES`; \
	rm -fr sp-$$version

FORCE: