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
|
# Top-level makefile for Unix-hosted interfaces to Xconq.
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Stanley T. Shebs.
# Xconq is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
prefix = /usr/games
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
datadir = $(prefix)/lib/xconq
mandir = $(prefix)/man
man6dir = $(mandir)/man6
infodir = $(prefix)/info
docdir = $(datadir)/doc
appdefaultsdir = /usr/lib/X11/app-defaults
srcdir = .
SHELL = /bin/sh
INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
SELFILE = SelFile
SUBDIRS = kernel $(SELFILE) x11 curses mac lib doc test misc
CC = cc
CFLAGS = -g
RANLIB = ranlib
AR = ar
AR_FLAGS = rcu
# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments
FLAGS_TO_PASS = \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
"bindir=$(bindir)" \
"appdefaultsdir=$(appdefaultsdir)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"REQD_CFLAGS=$(REQD_CFLAGS)" \
"CXX=$(CXX)" \
"CXXFLAGS=$(CXXFLAGS)" \
"RANLIB=$(RANLIB)" \
"MAKEINFO=$(MAKEINFO)" \
"INSTALL=$(INSTALL)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_DATA=$(INSTALL_DATA)"
all: all-xconq all-cconq
all-xconq all-SelFile all-kernel all-cconq:
all-xconq: all-kernel all-SelFile
@dir=x11; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-kernel:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-SelFile:
@dir=`echo $@ | sed -e 's/all-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
all-cconq: all-kernel
@dir=curses; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
else \
true; \
fi
installcheck:
check: force
@if [ -f test/Makefile ]; then \
rootme=`pwd`; export rootme; \
cd test; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
else true; fi
info dvi install-info clean-info: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
install: all install-only
install-only: install-dirs
@$(MAKE) $(FLAGS_TO_PASS) DO=install-only "DODIRS=$(SUBDIRS)" subdir_do
install-xconq: all-xconq install-lib install-dirs
@dir=x11; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install-only); \
else \
true; \
fi
install-cconq: all-cconq install-lib install-dirs
@dir=curses; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install-only); \
else \
true; \
fi
install-lib: install-dirs
@dir=lib; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install-only); \
else \
true; \
fi
MAKEDIRS= \
$(prefix) \
$(exec_prefix) \
$(bindir) \
$(datadir) \
$(mandir) \
$(man6dir) \
$(infodir)
.PHONY: install-dirs
install-dirs:
@for i in $(MAKEDIRS) ; do \
echo Making $$i... ; \
parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
if [ ! -d $$i ] ; then \
if mkdir $$i ; then \
true ; \
else \
exit 1 ; \
fi ; \
else \
true ; \
fi ; \
done
clean:
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
distclean: clean
@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do
rm -f Makefile config.status
extraclean: distclean
rm -f *~* .*~* #* %*
rm -f */*~* */.*~* */#* */%*
rm -f Makefile config.status
realclean: distclean
@$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do
rm -f Makefile
subdir_do: force
@srcroot=`cd $(srcdir); pwd`; export srcroot; \
for i in $(DODIRS); do \
if [ -f ./$$i/Makefile ] ; then \
if (cd ./$$i; \
$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
else exit 1 ; fi ; \
else true ; fi ; \
done
Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) config.status
force:
|