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 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
|
# Imakefile for xpat2 version 1.06
#
# ****************************************************************************
# customizing:
#
# 0.) extra warnings for gcc and development
#
#undef EXTRA_WARNINGS
# 1.) specify, which interface to use (exactly one of the interfaces below)
#undef useXlib /* similar to xpat version 1.x, not all features */
#undef useXaw /* the recommended interface for xpat2 */
#undef useXm /* Motif / Lesstif, not yet perfect */
#undef useXview /* Xview / OpenLook interface */
#undef useXQt /* Qt widgets, playable, but NOT YET FINISHED */
/* advice on Qt improvements from experienced
programmers welcome at Michael.Bischoff@gmx.net */
# 2.) specify, if you want online help (Athena Widgets only)
#define USE_ONLINEHELP
# 3.) specify, if you want round cards (nicer, but you need Xmu)
#define USE_ROUND_CARDS
# 4.) specify, if you want sound (must copy the appropriate sound module)
# SOUNDOBJ should be one module of X-sound_*.o if USE_SOUND is on, else empty
# Note: for X-sound_SUN.o, /dev/audio must have 666 permissions */
#define USE_SOUND /* doesn't harm if you don't have a sound card */
# the default is to copy an .au-file to /dev/audio
SOUNDOBJ = X-sound_SUN.o
SOUNDLIB =
# uncomment this if you're using the NAS audio system:
# SOUNDOBJ = X-sound_NAS.o
# SOUNDLIB = -laudio
# uncomment this if you have an old Adlib card:
# SOUNDOBJ = X-sound_FM.o
# SOUNDLIB =
# 5.) specify, if you want the antialiased card construction set (SLOW!)
#define USE_CARD_CONSTRUCTION
# 6.) if you answered NO to 5.): Do you want support for full xpm cards?
#define USE_XPM
# 7.) if you answered NO to 5.): Do you want to load external bitmap cards?
#define USE_LOADCARDS
# BINDIR and LIBDIR should be predefined by the templates
# BINDIR = /usr/bin/X11
# LIBDIR = /usr/lib/X11
XPATLIBDIR = /usr/games/lib/xpat
APPDEFSDIR = $(LIBDIR)
XPATMANDIR = /usr/man/man6
# This is the name of the log-file, where solved games are stored:
# an alternative path would be $(XPATLIBDIR)/xpat.log
SCOREFILE = /var/games/xpat.log
# paths for installation in user's home-directory.
LXPATBINDIR = $(HOME)/bin
LXPATMANDIR = $(HOME)/xpat
LAPPDEFSDIR = $(HOME)
# xpat2 needs to know where the xpm library resides (if needed)
XPMLIB = -L$(USRLIBDIR) -lXpm
XPMINCLUDE = -I $(INCDIR)
# for the Qt interface, the following paths are needed
QTDIR = /usr/local/qt
QTINCDIR = $(QTDIR)/include
QTLIBDIR = $(QTDIR)/lib
MOC = $(QTDIR)/bin/moc
# *****************************************************************************
# I hope you don't need to change anything below this point
# *****************************************************************************
#if defined(HPArchitecture) || defined(AIXArchitecture)
CC = c89
CCOPTIONS =
#else
CC = gcc
CXX = g++
#ifdef EXTRA_WARNINGS
CCOPTIONS = -O2 -pipe -ansi -fno-common -Wall -Wshadow -Wpointer-arith \
-Wcast-qual -Wcast-align -Waggregate-return \
-Wstrict-prototypes -Wmissing-prototypes \
-Wnested-externs -Wwrite-strings
#else
CCOPTIONS = -O6 -fomit-frame-pointer -pipe -ansi -fno-common -Wall
#endif
#endif
#ifdef useXlib
KIT_OPTION = -DuseXlib
#ifdef USE_ROUND_CARDS
KIT_LIBS = $(XMULIB) $(XLIB)
#else
KIT_LIBS = $(XLIB)
#endif
KIT_OBJS = Xlib-buttons.o Xlib-main.o Xlib-windows.o Xlib-events.o
DEPLIBS = $(DEPXLIB)
#endif
#ifdef useXaw
KIT_OPTION = -DuseXaw
KIT_LIBS = XawClientLibs # $(XMULIB) $(XTOOLLIB)
KIT_OBJS = Xaw-main.o Xaw-help.o
DEPLIBS = XawClientDepLibs
#endif
#ifdef useXm
KIT_OPTION = -DuseXm
KIT_LIBS = -lXm $(XMULIB) $(XTOOLLIB) $(XLIB)
KIT_OBJS = Xm-main.o Xm-help.o
DEPLIBS = $(DEPXLIB)
#endif
#ifdef useXview
KIT_OPTION = -DuseXview -I/usr/openwin/include
KIT_LIBS = -L/usr/openwin/lib -lxview -lolgx $(XMULIB) $(XLIB)
KIT_OBJS = Xv-main.o Xv-events.o
#endif
#ifdef useXQt
KIT_OPTION = -DuseXQt -I$(QTINCDIR)
KIT_LIBS = -L$(QTLIBDIR) -lqt
KIT_OBJS = XQtCards.o XQtCrdPile.o moc_XQtCP.o XQt-main.o XQtTableau.o \
XQtWindow.o moc_XQtT.o moc_XQtW.o XQtCrdsDlg.o \
moc_XQtC.o XQtMarkCrd.o XQtArrows.o \
mqmaskedit.o qmaskedit.o qhelpwin.o mqhelpwin.o
DEPLIBS = $(DEPXLIB)
#endif
#ifdef USE_ONLINEHELP
HELP_OPTION = -DONLINE_HELP
#else
HELP_OPTION =
#endif
#ifdef USE_ROUND_CARDS
ROUND_OPTION = # -DNO_ROUND_CARDS
#else
ROUND_OPTION =
#endif
#ifdef USE_SOUND
SOUND_OPTION = -DSOUND
#else
SOUND_OPTION =
#endif
#ifdef USE_LOADCARDS
LOAD_OPTION = -DLOADCARDS
#else
LOAD_OPTION =
#endif
#ifdef USE_XPM
XPM_OPTION = $(XPMINCLUDE)
#else
XPM_OPTION = -DNO_XPM
XPMLIB =
#endif
#ifdef USE_CARD_CONSTRUCTION
GFXOBJ = X-gfx2.o
GFX_OPTION = -DGFX2
#else
GFXOBJ = X-gfx1.o
GFX_OPTION = -DGFX1
#endif
# Qt has its own Xpm implementation, we don't need libXpm.a
#ifdef useXQt
XPMLIB =
#endif
LOCAL_LIBRARIES = $(XPMLIB) $(KIT_LIBS) $(SOUNDLIB)
VER=1.06
XOBJS = X-events.o X-layout.o X-expose.o X-cards.o \
X-markcard.o X-arrows.o X-widget.o $(GFXOBJ)
STDOBJS = rules.o commands.o messages.o hints.o layout.o arrows.o \
loadsave.o util.o moves.o $(SOUNDOBJ) \
r_Klondike.o r_Spider.o r_Delight.o r_MonteCarlo.o r_Midnight.o \
r_Gypsy.o r_Seahaven.o r_FreeCell.o r_Calculatio.o r_Michaels.o \
r_Royal.o r_Canfield.o r_mdCanfield.o r_Bakers.o r_Oonsoo.o \
r_BlueMoon.o
#ifdef useXQt /* does not need X-*.o */
OBJS = $(STDOBJS) $(KIT_OBJS)
#else
OBJS = $(STDOBJS) $(XOBJS) $(KIT_OBJS)
#endif
MYPROG = xpat2
LANGUAGES = italian german russian french
DEFINES = $(LOAD_OPTION) $(HELP_OPTION) $(KIT_OPTION) $(ROUND_OPTION) \
$(SOUND_OPTION) $(XPM_OPTION) $(GFX_OPTION) \
-DSCOREFILE=\"$(SCOREFILE)\" -DLIBDIR=\"$(XPATLIBDIR)\"
# Dependencies:
# *.c require version.h xpat.h xpatgame.h
# X*.c additionally require X-pat.h and Tableau.h
# X-widget.c additionally requires TableauP.h
all:: $(MYPROG)
install:: $(MYPROGS)
mkdirhier $(XPATLIBDIR)
chmod 755 $(XPATLIBDIR)
for f in $(LANGUAGES); do \
mkdirhier $(APPDEFSDIR)/$$f/app-defaults; \
cp ../lib/$$f/XPat $(APPDEFSDIR)/$$f/app-defaults; \
chmod 755 $(APPDEFSDIR)/$$f/app-defaults; \
chmod 644 $(APPDEFSDIR)/$$f/app-defaults/XPat; \
done
(cd ../lib; tar cf - * | (cd $(XPATLIBDIR); tar xf -))
chown -R root $(XPATLIBDIR)
chmod -R a+r $(XPATLIBDIR)
for f in $(LANGUAGES); do \
chmod 755 $(XPATLIBDIR)/$$f; \
done
mkdirhier $(XPATMANDIR)
cp xpat2.man $(XPATMANDIR)/xpat2.6x
chmod 644 $(XPATMANDIR)/xpat2.6x
ComplexProgramTarget($(MYPROG))
InstallAppDefaults(XPat)
install.fsstnd:
$(MAKE) install
mkdirhier /usr/games/bin
chmod 755 /usr/games/bin
mv $(BINDIR)/xpat2 /usr/games/bin
install.local: $(MYPROGS)
mkdirhier $(LXPATBINDIR) $(LXPATMANDIR) $(XPATLIBDIR) $(LAPPDEFSDIR)/app-defaults
chmod 755 $(XPATLIBDIR) $(LXPATMANDIR) $(LAPPDEFSDIR)/app-defaults
for f in $(LANGUAGES); do \
mkdirhier $(LAPPDEFSDIR)/$$f/app-defaults; \
cp ../lib/$$f/XPat $(LAPPDEFSDIR)/$$f/app-defaults; \
chmod 755 $(LAPPDEFSDIR)/$$f/app-defaults; \
chmod 644 $(LAPPDEFSDIR)/$$f/app-defaults/XPat; \
done
cp XPat.ad $(LAPPDEFSDIR)/app-defaults/XPat
chmod 755 $(LAPPDEFSDIR)/app-defaults/XPat
(cd ../lib; tar cf - * | (cd $(XPATLIBDIR); tar xf -))
chmod -R a+r $(XPATLIBDIR)
for f in $(LANGUAGES); do \
chmod 755 $(XPATLIBDIR)/$$f; \
done
cp xpat2 $(LXPATBINDIR)
chmod 755 $(LXPATBINDIR)/xpat2
cp xpat2.man $(LXPATMANDIR)/xpat2.6x
chmod 644 $(LXPATMANDIR)/xpat2.6x
# dependecies for the Qt interface:
moc_XQtCP.cpp: XQtCardPile.h
$(MOC) -o moc_XQtCP.cpp XQtCardPile.h
moc_XQtT.cpp: XQtTableau.h
$(MOC) -o moc_XQtT.cpp XQtTableau.h
moc_XQtW.cpp: XQtWindow.h
$(MOC) -o moc_XQtW.cpp XQtWindow.h
mqmaskedit.cpp: qmaskedit.h
$(MOC) -o mqmaskedit.cpp qmaskedit.h
mqhelpwin.cpp: qhelpwin.h
$(MOC) -o mqhelpwin.cpp qhelpwin.h
moc_XQtC.cpp: XQtCards.h
$(MOC) -o moc_XQtC.cpp XQtCards.h
|