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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
##
## Makefile -- gFONT Makefile
##
@SET_MAKE@
# ------------------------------------------------
# DEFINITIONS
# ------------------------------------------------
# compiler tools
CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ -I.
LDFLAGS = @LDFLAGS@
debug = @debug@
# installation tools
PATH_PERL = @PATH_PERL@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
MKDIR = ./etc/mkinstalldirs
# installation paths
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = ${exec_prefix}/man
tmpgdfdir = @tmpgdfdir@
libsubdir = @libsubdir@
libdir = @libdir@
# ------------------------------------------------
# THE DEFAULT TARGETS
# ------------------------------------------------
all: config gfont gfont.1 gfont_pktopx gfont_pxtogdf gfont_mkgdf gfont_mkgdf_all
# ------------------------------------------------
# THE CONFIGURATION SUPPORT
# ------------------------------------------------
config: configure config_ac.h.in
configure: configure.in aclocal.m4 acconfig.h
rm -f configure
autoconf configure.in >configure
chmod 770 configure
config_ac.h.in: configure.in acconfig.h
rm -f config_ac.h.in
autoheader configure.in >config_ac.h.in
# ------------------------------------------------
# THE RELEASE STUFF
# ------------------------------------------------
_GETDISTINFO = \
_version=`./etc/newvers -lc -d gfont_version.c`; \
_date=`date '+%y%m%d_%H%M'`
_BUILDDIST = \
echo "Creating tarball..."; \
tar cvf - * |\
tardy --user_number=1000 --user_name=rse \
--group_number=1000 --group_name=en \
--prefix=$${_distname} - |\
gzip >$${_tarball}; \
echo "Done"; \
ls -l $${_tarball}
_NEWVERS = \
./etc/newvers -lc -p gFONT $$OPT gfont_version.c; \
V=`./etc/newvers -lc -D gfont_version.c`;\
sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README
_UPDATEVERS = \
V=`./etc/newvers -lc -d gfont_version.c`;\
./etc/newvers -lc -p gFONT -r $$V gfont_version.c; \
V=`./etc/newvers -lc -D gfont_version.c`;\
sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README
release: distclean fixperm
@$(_GETDISTINFO) \
_distname="gfont-$${_version}"; \
_tarball="/tmp/$${_distname}.tar.gz"; \
echo "Release Distribution: gFONT Version $$_version"; \
$(_BUILDDIST); \
mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz; \
snap: distclean fixperm
@$(_GETDISTINFO) \
_distname="gfont-$${_version}-SNAP-$$_date"; \
_tarball="/tmp/$${_distname}.tar.gz"; \
echo "Snap of whole source tree: gFONT Version $$_version as of $$_date"; \
$(_BUILDDIST); \
mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz
new-version:
OPT=-iv; $(_NEWVERS)
new-revision:
OPT=-ir; $(_NEWVERS)
new-betalevel:
OPT=-ib; $(_NEWVERS)
new-patchlevel:
OPT=-iP; $(_NEWVERS)
new-release:
OPT=-r$(R); $(_NEWVERS)
update-version:
$(_UPDATEVERS)
fixperm:
./etc/fixperm *
# ------------------------------------------------
# THE PROGRAM
# ------------------------------------------------
gfont: gfont_main.o gfont_getopt.o gfont_version.o gfont_gd.o gfont_gdfontl.o
$(CC) $(LDFLAGS) -o gfont gfont_main.o gfont_getopt.o gfont_version.o gfont_gd.o gfont_gdfontl.o -lm
gfont_main.o: gfont_main.c
$(CC) $(CFLAGS) -o gfont_main.o -c gfont_main.c
gfont_getopt.o: gfont_getopt.c
$(CC) $(CFLAGS) -o gfont_getopt.o -c gfont_getopt.c
gfont_version.o: gfont_version.c
$(CC) $(CFLAGS) -o gfont_version.o -c gfont_version.c
gfont_gd.o: gfont_gd.c
$(CC) $(CFLAGS) -o gfont_gd.o -c gfont_gd.c
gfont_gdfontl.o: gfont_gdfontl.c
$(CC) $(CFLAGS) -o gfont_gdfontl.o -c gfont_gdfontl.c
gfont_pktopx: gfont_pktopx.o
$(CC) $(LDFLAGS) -o gfont_pktopx gfont_pktopx.o
gfont_pktopx.o: gfont_pktopx.c
$(CC) $(CFLAGS) -o gfont_pktopx.o -c gfont_pktopx.c
gfont_pxtogdf: gfont_pxtogdf.o
$(CC) $(LDFLAGS) -o gfont_pxtogdf gfont_pxtogdf.o
gfont_pxtogdf.o: gfont_pxtogdf.c
$(CC) $(CFLAGS) -o gfont_pxtogdf.o -c gfont_pxtogdf.c
gfont_mkgdf: gfont_mkgdf.pl
sed -e "s|\@PATH_PERL\@|$(PATH_PERL)|g" \
-e "s|\@tmpgdfdir\@|$(tmpgdfdir)|g" \
-e "s|\@libsubdir\@|$(libsubdir)|g" \
-e "s|\@libdir\@|$(libdir)|g" \
<gfont_mkgdf.pl >gfont_mkgdf && chmod a+x gfont_mkgdf
gfont_mkgdf_all: gfont_mkgdf_all.pl
sed -e "s|\@PATH_PERL\@|$(PATH_PERL)|g" \
-e "s|\@tmpgdfdir\@|$(tmpgdfdir)|g" \
-e "s|\@libsubdir\@|$(libsubdir)|g" \
-e "s|\@libdir\@|$(libdir)|g" \
<gfont_mkgdf_all.pl >gfont_mkgdf_all && chmod a+x gfont_mkgdf_all
# ------------------------------------------------
# THE DOCUMENTATION
# ------------------------------------------------
gfont.1: gfont.pod gfont_version.c
V=`./etc/newvers -l c -D gfont_version.c`; \
sed -e "s|\@V\@|$$V|g" \
-e "s|\@prefix\@|$(prefix)|" \
-e "s|\@tmpgdfdir\@|$(tmpgdfdir)|g" \
-e "s|\@libsubdir\@|$(libsubdir)|g" \
-e "s|\@libdir\@|$(libdir)|g" \
<gfont.pod >/tmp/gfont.pod; \
pod2man --section=1 \
--center="Ralf S. Engelschall" \
--release="EN" \
/tmp/gfont.pod >gfont.1 && \
rm -f /tmp/gfont.pod
# ------------------------------------------------
# INSTALLATION
# ------------------------------------------------
install: all
$(MKDIR) $(bindir)
$(MKDIR) $(mandir)
$(MKDIR) $(mandir)/man1
$(MKDIR) $(libdir)$(libsubdir)
$(MKDIR) $(libdir)$(libsubdir)/etc
$(MKDIR) $(libdir)$(libsubdir)/exec
$(MKDIR) $(libdir)$(libsubdir)/gdf
$(INSTALL_PROGRAM) gfont $(bindir)/gfont
$(INSTALL_DATA) gfont.1 $(mandir)/man1/gfont.1
$(INSTALL_PROGRAM) gfont_pktopx $(libdir)$(libsubdir)/exec/gfont_pktopx
$(INSTALL_PROGRAM) gfont_pxtogdf $(libdir)$(libsubdir)/exec/gfont_pxtogdf
$(INSTALL_SCRIPT) gfont_mkgdf $(libdir)$(libsubdir)/exec/gfont_mkgdf
$(INSTALL_SCRIPT) gfont_mkgdf_all $(libdir)$(libsubdir)/exec/gfont_mkgdf_all
$(INSTALL_DATA) Fontmap $(libdir)$(libsubdir)/etc/Fontmap
cd Fonts; for file in *.gdf.gz; do \
$(INSTALL_DATA) $$file $(libdir)$(libsubdir)/gdf/$$file; \
done
$(MKDIR) $(tmpgdfdir) && chmod a+rwx $(tmpgdfdir)
# ------------------------------------------------
# CLEANUP
# ------------------------------------------------
clean:
-rm -f *.o
-rm -f gfont
-rm -f gfont_pktopx
-rm -f gfont_pxtogdf
-rm -f gfont_mkgdf
-rm -f core *.core
distclean:
-@make clean
-rm -f config_ac.h config_sc.h
-rm -f config.status config.cache config.log
-rm -f Makefile
##EOF##
|