| 1 |
# :: Makefile.in for aciijump project, |
| 2 |
# |
| 3 |
|
| 4 |
GCCPREFIX = @ # comment this line to enable normal output << |
| 5 |
|
| 6 |
|
| 7 |
PACKAGE = asciijump |
| 8 |
VERSION = @PACKAGE_VERSION@ |
| 9 |
SHELL = /bin/sh |
| 10 |
|
| 11 |
prefix = @prefix@ |
| 12 |
exec_prefix = @exec_prefix@ |
| 13 |
sysconfdir = @sysconfdir@ |
| 14 |
bindir = @bindir@ |
| 15 |
datadir = @datadir@ |
| 16 |
mandir = @mandir@ |
| 17 |
vardir = @localstatedir@ |
| 18 |
|
| 19 |
CC = @CC@ |
| 20 |
CFLAGS = @CFLAGS@ |
| 21 |
LDFLAGS = @LDFLAGS@ |
| 22 |
TAR = tar |
| 23 |
GZIP = gzip |
| 24 |
TAR_OPTIONS = |
| 25 |
GZIP_ENV = --best |
| 26 |
|
| 27 |
INSTALL = @INSTALL@ |
| 28 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 29 |
INSTALL_DATA = @INSTALL_DATA@ |
| 30 |
INSTALL_DIR = @INSTALL@ -d |
| 31 |
|
| 32 |
srcdir = @srcdir@ |
| 33 |
top_srcdir = @top_srcdir@ |
| 34 |
subdir = |
| 35 |
VPATH = ${srcdir} |
| 36 |
ifeq (${subdir},) |
| 37 |
top_builddir = . |
| 38 |
else |
| 39 |
top_builddir = .. |
| 40 |
endif |
| 41 |
builddir = @builddir@ |
| 42 |
|
| 43 |
EXTRA_DIST = configure configure.ac config.h.in install-sh \ |
| 44 |
config.guess config.sub asciijump.png asciijump.desktop \ |
| 45 |
asciijump.spec COPYING README README-pl gfx hills include asciijump.6 |
| 46 |
|
| 47 |
CLEANFILES = ${SOURCES:.c=.da} |
| 48 |
DISTCLEANFILES = Makefile config.status config.log |
| 49 |
MAINTCLEANFILES = configure |
| 50 |
|
| 51 |
|
| 52 |
INCLUDES = -I. -I${top_srcdir}/include -I${top_builddir} |
| 53 |
DEFINES = -DVERSION=\"${VERSION}\" -DPACKAGE=\"${PACKAGE}\" \ |
| 54 |
-DDATADIR=\"${datadir}/${PACKAGE}\" -DVARDIR=\"${vardir}/games/asciijump/\" |
| 55 |
ALL_CFLAGS = ${INCLUDES} ${DEFINES} ${CFLAGS} -g |
| 56 |
|
| 57 |
LIBS = @LIBS@ |
| 58 |
ALL_LDFLAGS = ${LIBS} ${LDFLAGS} |
| 59 |
|
| 60 |
# colors |
| 61 |
color="[0m[36m" |
| 62 |
color_light="[0m[36m[1m" |
| 63 |
color_reset="[0m" |
| 64 |
|
| 65 |
# asciijump client |
| 66 |
ac_name = "asciijump" |
| 67 |
ac_src = $(wildcard scr*.c) \ |
| 68 |
cmdline.c\ |
| 69 |
wsys.c\ |
| 70 |
frame.c\ |
| 71 |
skier.c\ |
| 72 |
hill.c\ |
| 73 |
skin.c\ |
| 74 |
matrix.c\ |
| 75 |
intro.c\ |
| 76 |
main.c\ |
| 77 |
slang.c\ |
| 78 |
client.c\ |
| 79 |
cup.c |
| 80 |
ac_obj = $(addprefix bin/,${ac_src:.c=.o}) |
| 81 |
|
| 82 |
# asciijump eerver |
| 83 |
as_name = "aj-server" |
| 84 |
as_src = $(wildcard as*.c) |
| 85 |
as_obj = $(addprefix bin/,${as_src:.c=.o}) |
| 86 |
|
| 87 |
# object used in ac and as to |
| 88 |
other_src = xfnc.c |
| 89 |
other_obj = $(addprefix bin/,${other_src:.c=.o}) |
| 90 |
|
| 91 |
DISTFILES = ${ac_src} ${as_src} ${other_src} ${HEADERS} Makefile.in ${EXTRA_DIST} |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
bin/%.o: %.c |
| 96 |
@echo |
| 97 |
@echo -n "$< .. " |
| 98 |
${GCCPREFIX}${CC} ${ALL_CFLAGS} -c $< -o $@ |
| 99 |
@echo -n "ok"; |
| 100 |
|
| 101 |
|
| 102 |
all: bin ${ac_name} ${as_name} ${other_obj} |
| 103 |
@echo |
| 104 |
@ctags ${other_src} ${as_src} ${ac_src} include/* |
| 105 |
@echo "type: ${color}./${ac_name}${color_reset} to run asciijump client" |
| 106 |
@echo "type: ${color}./${as_name}${color_reset} to run asciijump server" |
| 107 |
|
| 108 |
bin: |
| 109 |
@[ -d bin ] || mkdir bin |
| 110 |
|
| 111 |
ac_info: |
| 112 |
@echo -n "${color}creating client ${color_light}{${color_reset}" |
| 113 |
|
| 114 |
${ac_name}: ac_info ${other_obj} ${ac_obj} |
| 115 |
@${CC} ${ALL_LDFLAGS} -o $@ ${ac_obj} ${other_obj} |
| 116 |
@echo " ${color_light}} .. ${color}ok${color_reset}" |
| 117 |
@echo |
| 118 |
|
| 119 |
|
| 120 |
as_info: |
| 121 |
@echo -n "${color}creating server ${color_light}{${color_reset}" |
| 122 |
|
| 123 |
${as_name}: as_info ${other_obj} ${as_obj} |
| 124 |
@${CC} ${ALL_LDFLAGS} -o $@ ${as_obj} ${other_obj} |
| 125 |
@echo " ${color_light}} .. ${color}ok${color_reset}" |
| 126 |
|
| 127 |
install: all |
| 128 |
${INSTALL} -d ${DESTDIR}${datadir}/${ac_name} |
| 129 |
find gfx -type d ! -path '*CVS*' -exec \ |
| 130 |
${INSTALL} -d ${DESTDIR}${datadir}/${PACKAGE}/{} \; |
| 131 |
find gfx -type f ! -path '*CVS*' -exec ${INSTALL_DATA} {} \ |
| 132 |
${DESTDIR}${datadir}/${PACKAGE}/{} \; |
| 133 |
find hills -type d ! -path '*CVS*' -exec \ |
| 134 |
${INSTALL} -d ${DESTDIR}${datadir}/${PACKAGE}/{} \; |
| 135 |
find hills -type f ! -path '*CVS*' -exec ${INSTALL_DATA} {} \ |
| 136 |
${DESTDIR}${datadir}/${PACKAGE}/{} \; |
| 137 |
${INSTALL} -d ${DESTDIR}${bindir}/ |
| 138 |
${INSTALL_PROGRAM} ${ac_name} ${DESTDIR}${bindir}/ |
| 139 |
${INSTALL_PROGRAM} ${as_name} ${DESTDIR}${bindir}/ |
| 140 |
|
| 141 |
${INSTALL} -d $(DESTDIR)$(prefix)/share/applications |
| 142 |
${INSTALL} -m 644 asciijump.desktop \ |
| 143 |
$(DESTDIR)$(prefix)/share/applications |
| 144 |
|
| 145 |
${INSTALL} -d $(DESTDIR)$(prefix)/X11R6/share/pixmaps |
| 146 |
${INSTALL} -m 644 asciijump.png $(DESTDIR)$(prefix)/X11R6/share/pixmaps |
| 147 |
|
| 148 |
${INSTALL} -d $(DESTDIR)$(prefix)/share/pixmaps |
| 149 |
${INSTALL} -m 644 asciijump.png $(DESTDIR)$(prefix)/share/pixmaps |
| 150 |
|
| 151 |
${INSTALL} -d $(DESTDIR)$/$(mandir)/man6 |
| 152 |
${INSTALL} -m 644 asciijump.6 $(DESTDIR)$/$(mandir)/man6 |
| 153 |
|
| 154 |
${INSTALL} -d $(DESTDIR)$/$(vardir)/games |
| 155 |
${INSTALL} -d -m 777 $(DESTDIR)$/$(vardir)/games/asciijump |
| 156 |
|
| 157 |
install-strip: |
| 158 |
${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' install |
| 159 |
|
| 160 |
uninstall: |
| 161 |
rm -f ${DESTDIR}${bindir}/${ac_name} |
| 162 |
rm -f ${DESTDIR}${bindir}/${as_name} |
| 163 |
rm -rf ${DESTDIR}${datadir}/${name} |
| 164 |
rm -f $(DESTDIR)$(prefix)/X11R6/share/applnk/Games/Arcade/asciijump.desktop |
| 165 |
rm -f $(DESTDIR)$(prefix)/share/applnk/Games/Arcade/asciijump.desktop |
| 166 |
rm -f $(DESTDIR)$(prefix)/X11R6/share/pixmaps/asciijump.png |
| 167 |
rm -f $(DESTDIR)$(prefix)/share/pixmaps/asciijump.png |
| 168 |
rm -f $(DESTDIR)/$(mandir)/man6/asciijump.6 |
| 169 |
|
| 170 |
distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} |
| 171 |
|
| 172 |
dist: |
| 173 |
test -z "${distdir}" || rm -rf "${distdir}" |
| 174 |
${INSTALL_DIR} ${distdir} |
| 175 |
@list='${DISTFILES}'; for f in $$list; do \ |
| 176 |
if test -e ${srcdir}/$$f; then \ |
| 177 |
fn=${srcdir}/$$f; \ |
| 178 |
else \ |
| 179 |
fn=$$f; \ |
| 180 |
fi ; \ |
| 181 |
echo cp -pr $$fn ${distdir}/$$f ;\ |
| 182 |
cp -pr $$fn ${distdir}/$$f ;\ |
| 183 |
done |
| 184 |
find ${distdir} -type d -name 'CVS' | xargs rm -rf |
| 185 |
find ${distdir} -type d -name '.svn' | xargs rm -rf |
| 186 |
${TAR} ${TAR_OPTIONS} -cf - ${PACKAGE}-${VERSION} | ${GZIP} ${GZIP_ENV} >${PACKAGE}-${VERSION}.tar.gz |
| 187 |
test -z "${distdir}" || rm -rf "${distdir}" |
| 188 |
|
| 189 |
distcheck: dist |
| 190 |
${GZIP} -dfc ${PACKAGE}-${VERSION}.tar.gz | tar ${TAR_OPTIONS} -xf - |
| 191 |
cd ${PACKAGE}-${VERSION} && ./configure |
| 192 |
${MAKE} -C ${PACKAGE}-${VERSION} all install dist DESTDIR=$(shell pwd)/${PACKAGE}-${VERSION} |
| 193 |
rm -rf ${PACKAGE}-${VERSION} |
| 194 |
@banner="${PACKAGE}-${VERSION}.tar.gz is ready for distribution." ;\ |
| 195 |
dashes=`echo "$$banner" | sed -e s/./=/g`; \ |
| 196 |
echo "$$dashes" ;\ |
| 197 |
echo "$$banner" ;\ |
| 198 |
echo "$$dashes" |
| 199 |
|
| 200 |
mostlyclean clean: |
| 201 |
rm -fr *~ ${ac_name} ${as_name} bin tags core |
| 202 |
test -z "${CLEANFILES}" || rm -rf ${CLEANFILES} |
| 203 |
|
| 204 |
distclean: clean |
| 205 |
rm -f Makefile |
| 206 |
test -z "${DISTCLEANFILES}" || rm -rf ${DISTCLEANFILES} |
| 207 |
|
| 208 |
maintainer-clean: distclean |
| 209 |
test -z "${MAINTCLEANFILES}" || rm -rf ${MAINTCLEANFILES} |
| 210 |
|
| 211 |
distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} |
| 212 |
distdir: ${DISTFILES} |
| 213 |
${INSTALL_DIR} ${distdir} |
| 214 |
@list='${DISTFILES}'; for f in $$list; do \ |
| 215 |
if test -e ${srcdir}/$$f; then \ |
| 216 |
fn=${srcdir}/$$f; \ |
| 217 |
else \ |
| 218 |
fn=$$f; \ |
| 219 |
fi ; \ |
| 220 |
echo cp -p $$fn ${distdir}/$$f ;\ |
| 221 |
cp -p $$fn ${distdir}/$$f ;\ |
| 222 |
done |
| 223 |
|
| 224 |
${builddir}/Makefile: ${srcdir}/Makefile.in ${top_builddir}/config.status |
| 225 |
cd ${top_builddir} && ./config.status |
| 226 |
|
| 227 |
## -- Dependencies -- ## |
| 228 |
${top_builddir}/config.h: ${top_builddir}/config.status |
| 229 |
|
| 230 |
## -- ${MAKE} control -- ## |
| 231 |
.PHONY: all bin install clean distclean mostlyclean \ |
| 232 |
uninstall maintainer-clean distdir dist distcheck |
| 233 |
.SUFFIXES: |
| 234 |
.SUFFIXES: .c .o |
| 235 |
.DEFAULT: all |
| 236 |
|