home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume20 / xball / part01 < prev    next >
Encoding:
Text File  |  1993-05-26  |  80.6 KB  |  2,968 lines

  1. Newsgroups: comp.sources.x
  2. From: daven@ctron.com ("David N. Nedde")
  3. Subject: v20i001:  xball - simulate bouncing balls in a window, Part01/05
  4. Message-ID: <csx-v20i001=xball.152626@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: b4f65a61d4b1088449a4d8afb1867dd0
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Mon, 24 May 1993 20:28:09 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: daven@ctron.com ("David N. Nedde")
  12. Posting-number: Volume 20, Issue 1
  13. Archive-name: xball/part01
  14. Environment: X11, OSF/Motif, Athena
  15.  
  16. XBall Version 3.0 - 5/93
  17.  
  18.   This program simulates bouncing balls in a window.  You create the
  19. balls in a variety of ways, and can set the gravity, elasticity,
  20. whether balls collide or not, etc.
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 1 (of 5)."
  29. # Contents:  X11 X11/Xaw_d X11/Xaw_d/DrawingA.c X11/Xaw_d/DrawingA.h
  30. #   X11/Xaw_d/DrawingAP.h X11/Xaw_d/DrawingA.doc X11/Xaw_d/Imakefile
  31. #   X11/Xaw_d/Makefile.std X11/Xaw_d/Makefile X11/Xaw_d/demo.c
  32. #   X11/Xaw_d/README Imakefile Makefile.std Makefile items.c
  33. #   patchlevel.h
  34. # Wrapped by daven@osiris on Tue May  4 16:35:06 1993
  35. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  36. if test ! -d 'X11' ; then
  37.     echo shar: Creating directory \"'X11'\"
  38.     mkdir 'X11'
  39. fi
  40. if test ! -d 'X11/Xaw_d' ; then
  41.     echo shar: Creating directory \"'X11/Xaw_d'\"
  42.     mkdir 'X11/Xaw_d'
  43. fi
  44. if test -f 'X11/Xaw_d/DrawingA.c' -a "${1}" != "-c" ; then 
  45.   echo shar: Will not clobber existing file \"'X11/Xaw_d/DrawingA.c'\"
  46. else
  47. echo shar: Extracting \"'X11/Xaw_d/DrawingA.c'\" \(5136 characters\)
  48. sed "s/^X//" >'X11/Xaw_d/DrawingA.c' <<'END_OF_FILE'
  49. X/* DrawingA.c: The DrawingArea Widget Methods */
  50. X
  51. X/* Copyright 1990, David Nedde
  52. X/*
  53. X/* Permission to use, copy, modify, and distribute this
  54. X/* software and its documentation for any purpose and without fee
  55. X/* is granted provided that the above copyright notice appears in all copies.
  56. X/* It is provided "as is" without express or implied warranty.
  57. X*/
  58. X
  59. X#include <X11/IntrinsicP.h>
  60. X#include <X11/StringDefs.h>
  61. X#include <X11/CoreP.h>
  62. X#include <X11/Xaw/SimpleP.h>
  63. X#include <X11/Xaw_d/DrawingAP.h>
  64. X
  65. Xstatic void    Initialize();
  66. Xstatic void    Destroy();
  67. Xstatic void    Redisplay();
  68. Xstatic void    input_draw();
  69. Xstatic void    motion_draw();
  70. Xstatic void    resize_draw();
  71. X
  72. Xstatic char defaultTranslations[] = "<BtnDown>: input() \n <BtnUp>: input() \n <KeyDown>: input() \n <KeyUp>: input() \n <Motion>: motion() \n <Configure>: resize()";
  73. Xstatic XtActionsRec actionsList[] = {
  74. X  { "input",  (XtActionProc)input_draw },
  75. X  { "motion", (XtActionProc)motion_draw },
  76. X  { "resize", (XtActionProc)resize_draw },
  77. X};
  78. X
  79. X/* Default instance record values */
  80. Xstatic XtResource resources[] = {
  81. X  {XtNexposeCallback, XtCCallback, XtRCallback, sizeof(caddr_t),
  82. X     XtOffset(DrawingAreaWidget, drawing_area.expose_callback), 
  83. X     XtRCallback, NULL },
  84. X  {XtNinputCallback, XtCCallback, XtRCallback, sizeof(caddr_t),
  85. X     XtOffset(DrawingAreaWidget, drawing_area.input_callback), 
  86. X     XtRCallback, NULL },
  87. X  {XtNmotionCallback, XtCCallback, XtRCallback, sizeof(caddr_t),
  88. X     XtOffset(DrawingAreaWidget, drawing_area.motion_callback), 
  89. X     XtRCallback, NULL },
  90. X  {XtNresizeCallback, XtCCallback, XtRCallback, sizeof(caddr_t),
  91. X     XtOffset(DrawingAreaWidget, drawing_area.resize_callback), 
  92. X     XtRCallback, NULL },
  93. X};
  94. X
  95. X
  96. XDrawingAreaClassRec drawingAreaClassRec = {
  97. X  /* CoreClassPart */
  98. X{
  99. X  (WidgetClass) &simpleClassRec,    /* superclass          */    
  100. X    "DrawingArea",            /* class_name          */
  101. X    sizeof(DrawingAreaRec),        /* size              */
  102. X    NULL,                /* class_initialize      */
  103. X    NULL,                /* class_part_initialize  */
  104. X    FALSE,                /* class_inited          */
  105. X    Initialize,                /* initialize          */
  106. X    NULL,                /* initialize_hook      */
  107. X    XtInheritRealize,            /* realize          */
  108. X    actionsList,            /* actions          */
  109. X    XtNumber(actionsList),        /* num_actions          */
  110. X    resources,                /* resources          */
  111. X    XtNumber(resources),        /* resource_count      */
  112. X    NULLQUARK,                /* xrm_class          */
  113. X    FALSE,                /* compress_motion      */
  114. X    FALSE,                /* compress_exposure      */
  115. X    TRUE,                /* compress_enterleave    */
  116. X    FALSE,                /* visible_interest      */
  117. X    Destroy,                /* destroy          */
  118. X    NULL,                /* resize          */
  119. X    Redisplay,                /* expose          */
  120. X    NULL,                /* set_values          */
  121. X    NULL,                /* set_values_hook      */
  122. X    XtInheritSetValuesAlmost,        /* set_values_almost      */
  123. X    NULL,                /* get_values_hook      */
  124. X    NULL,                /* accept_focus          */
  125. X    XtVersion,                /* version          */
  126. X    NULL,                /* callback_private      */
  127. X    defaultTranslations,        /* tm_table          */
  128. X    XtInheritQueryGeometry,        /* query_geometry      */
  129. X    XtInheritDisplayAccelerator,    /* display_accelerator      */
  130. X    NULL                /* extension          */
  131. X  },  /* CoreClass fields initialization */
  132. X  {
  133. X    /* change_sensitive        */    XtInheritChangeSensitive
  134. X  },  /* SimpleClass fields initialization */
  135. X  {
  136. X    0,                                     /* field not used    */
  137. X  },  /* DrawingAreaClass fields initialization */
  138. X};
  139. X
  140. X  
  141. XWidgetClass drawingAreaWidgetClass = (WidgetClass)&drawingAreaClassRec;
  142. X
  143. X
  144. Xstatic void Initialize( request, new)
  145. XDrawingAreaWidget request, new;
  146. X{
  147. X  if (request->core.width == 0)
  148. X    new->core.width = 100;
  149. X  if (request->core.height == 0)
  150. X    new->core.height = 100;
  151. X}
  152. X
  153. X
  154. Xstatic void Destroy( w)
  155. XDrawingAreaWidget w;
  156. X{
  157. X  XtRemoveAllCallbacks((Widget)w, XtNexposeCallback);
  158. X  XtRemoveAllCallbacks((Widget)w, XtNinputCallback);
  159. X  XtRemoveAllCallbacks((Widget)w, XtNmotionCallback);
  160. X  XtRemoveAllCallbacks((Widget)w, XtNresizeCallback);
  161. X}
  162. X
  163. X
  164. X/* Invoke expose callbacks */
  165. Xstatic void Redisplay(w, event, region)
  166. XDrawingAreaWidget w;
  167. XXEvent         *event;
  168. XRegion          region;
  169. X{
  170. X  XawDrawingAreaCallbackStruct cb;
  171. X
  172. X  cb.reason = XawCR_EXPOSE;
  173. X  cb.event  = event;
  174. X  cb.window = XtWindow(w);
  175. X  XtCallCallbacks((Widget)w, XtNexposeCallback, (char *)&cb);
  176. X}
  177. X
  178. X/* Invoke resize callbacks */
  179. Xstatic void resize_draw(w, event, args, n_args)
  180. XDrawingAreaWidget w;
  181. XXEvent         *event;
  182. Xchar         *args[];
  183. Xint          n_args;
  184. X{
  185. X  XawDrawingAreaCallbackStruct cb;
  186. X
  187. X  cb.reason = XawCR_RESIZE;
  188. X  cb.event  = event;
  189. X  cb.window = XtWindow(w);
  190. X  XtCallCallbacks((Widget)w, XtNresizeCallback, (char *)&cb);
  191. X}
  192. X
  193. X/* Invoke input callbacks */
  194. Xstatic void input_draw(w, event, args, n_args)
  195. XDrawingAreaWidget w;
  196. XXEvent         *event;
  197. Xchar         *args[];
  198. Xint          n_args;
  199. X{
  200. X  XawDrawingAreaCallbackStruct cb;
  201. X
  202. X  cb.reason = XawCR_INPUT;
  203. X  cb.event  = event;
  204. X  cb.window = XtWindow(w);
  205. X  XtCallCallbacks((Widget)w, XtNinputCallback, (char *)&cb);
  206. X}
  207. X
  208. X/* Invoke motion callbacks */
  209. Xstatic void motion_draw(w, event, args, n_args)
  210. XDrawingAreaWidget w;
  211. XXEvent         *event;
  212. Xchar         *args[];
  213. Xint          n_args;
  214. X{
  215. X  XawDrawingAreaCallbackStruct cb;
  216. X
  217. X  cb.reason = XawCR_MOTION;
  218. X  cb.event  = event;
  219. X  cb.window = XtWindow(w);
  220. X  XtCallCallbacks((Widget)w, XtNmotionCallback, (char *)&cb);
  221. X}
  222. END_OF_FILE
  223. if test 5136 -ne `wc -c <'X11/Xaw_d/DrawingA.c'`; then
  224.     echo shar: \"'X11/Xaw_d/DrawingA.c'\" unpacked with wrong size!
  225. fi
  226. # end of 'X11/Xaw_d/DrawingA.c'
  227. fi
  228. if test -f 'X11/Xaw_d/DrawingA.h' -a "${1}" != "-c" ; then 
  229.   echo shar: Will not clobber existing file \"'X11/Xaw_d/DrawingA.h'\"
  230. else
  231. echo shar: Extracting \"'X11/Xaw_d/DrawingA.h'\" \(1399 characters\)
  232. sed "s/^X//" >'X11/Xaw_d/DrawingA.h' <<'END_OF_FILE'
  233. X/* DrawingA.h - Public Header file */
  234. X
  235. X/* Copyright 1990, David Nedde
  236. X/*
  237. X/* Permission to use, copy, modify, and distribute this
  238. X/* software and its documentation for any purpose and without fee
  239. X/* is granted provided that the above copyright notice appears in all copies.
  240. X/* It is provided "as is" without express or implied warranty.
  241. X*/
  242. X
  243. X/* Define widget's class pointer and strings used to specify resources */
  244. X
  245. X#ifndef _XawDrawingArea_h
  246. X#define _XawDrawingArea_h
  247. X
  248. X/* Resources ADDED to label widget:
  249. X
  250. X Name             Class        RepType        Default Value
  251. X ----             -----        -------        -------------
  252. X exposeCallback         Callback        Pointer        NULL
  253. X inputCallback         Callback        Pointer        NULL
  254. X motionCallback         Callback        Pointer        NULL
  255. X resizeCallback         Callback        Pointer        NULL
  256. X*/
  257. X
  258. X
  259. Xextern WidgetClass drawingAreaWidgetClass;
  260. X
  261. Xtypedef struct _DrawingAreaClassRec *DrawingAreaWidgetClass;
  262. Xtypedef struct _DrawingAreaRec        *DrawingAreaWidget;
  263. X
  264. X
  265. X/* Resource strings */
  266. X#define XtNexposeCallback    "exposeCallback"
  267. X#define XtNinputCallback    "inputCallback"
  268. X#define XtNmotionCallback    "motionCallback"
  269. X#define XtNresizeCallback    "resizeCallback"
  270. X
  271. X
  272. Xtypedef struct _XawDrawingAreaCallbackStruct {
  273. X  int      reason;
  274. X  XEvent *event;
  275. X  Window  window;
  276. X} XawDrawingAreaCallbackStruct;
  277. X
  278. X/* Reasons */
  279. X#define XawCR_EXPOSE 1
  280. X#define XawCR_INPUT  2
  281. X#define XawCR_MOTION 3
  282. X#define XawCR_RESIZE 4
  283. X
  284. X#endif /* _XawDrawingArea_h */
  285. END_OF_FILE
  286. if test 1399 -ne `wc -c <'X11/Xaw_d/DrawingA.h'`; then
  287.     echo shar: \"'X11/Xaw_d/DrawingA.h'\" unpacked with wrong size!
  288. fi
  289. # end of 'X11/Xaw_d/DrawingA.h'
  290. fi
  291. if test -f 'X11/Xaw_d/DrawingAP.h' -a "${1}" != "-c" ; then 
  292.   echo shar: Will not clobber existing file \"'X11/Xaw_d/DrawingAP.h'\"
  293. else
  294. echo shar: Extracting \"'X11/Xaw_d/DrawingAP.h'\" \(1365 characters\)
  295. sed "s/^X//" >'X11/Xaw_d/DrawingAP.h' <<'END_OF_FILE'
  296. X/* DrawingArea Private header file */
  297. X
  298. X/* Copyright 1990, David Nedde
  299. X/*
  300. X/* Permission to use, copy, modify, and distribute this
  301. X/* software and its documentation for any purpose and without fee
  302. X/* is granted provided that the above copyright notice appears in all copies.
  303. X/* It is provided "as is" without express or implied warranty.
  304. X*/
  305. X
  306. X#ifndef _XawDrawingAreaP_h
  307. X#define _XawDrawingAreaP_h
  308. X
  309. X#include "DrawingA.h"
  310. X#ifdef X11_R3
  311. X#include <X11/SimpleP.h>
  312. X#else
  313. X#include <X11/Xaw/SimpleP.h>
  314. X#endif
  315. X
  316. X/* The drawing area's contribution to the class record */
  317. Xtypedef struct _DrawingAreaClassPart {
  318. X  int ignore;
  319. X} DrawingAreaClassPart;
  320. X
  321. X/* Drawing area's full class record */
  322. Xtypedef struct _DrawingAreaClassRec {
  323. X    CoreClassPart    core_class;
  324. X    SimpleClassPart    simple_class;
  325. X    DrawingAreaClassPart drawing_area;
  326. X} DrawingAreaClassRec;
  327. X
  328. Xextern DrawingAreaClassRec drawingAreaClassRec;
  329. X
  330. X/* Resources added and status of drawing area widget */
  331. Xtypedef struct _XsDrawingAreaPart {
  332. X  /* Resources */
  333. X  XtCallbackList    expose_callback;
  334. X  XtCallbackList    input_callback;
  335. X  XtCallbackList    motion_callback;
  336. X  XtCallbackList    resize_callback;
  337. X} DrawingAreaPart;
  338. X
  339. X
  340. X/* Drawing area's instance record */
  341. Xtypedef struct _DrawingAreaRec {
  342. X    CorePart         core;
  343. X    SimplePart         simple;
  344. X    DrawingAreaPart  drawing_area;
  345. X} DrawingAreaRec;
  346. X
  347. X#endif /* _XawDrawingAreaP_h */
  348. END_OF_FILE
  349. if test 1365 -ne `wc -c <'X11/Xaw_d/DrawingAP.h'`; then
  350.     echo shar: \"'X11/Xaw_d/DrawingAP.h'\" unpacked with wrong size!
  351. fi
  352. # end of 'X11/Xaw_d/DrawingAP.h'
  353. fi
  354. if test -f 'X11/Xaw_d/DrawingA.doc' -a "${1}" != "-c" ; then 
  355.   echo shar: Will not clobber existing file \"'X11/Xaw_d/DrawingA.doc'\"
  356. else
  357. echo shar: Extracting \"'X11/Xaw_d/DrawingA.doc'\" \(4190 characters\)
  358. sed "s/^X//" >'X11/Xaw_d/DrawingA.doc' <<'END_OF_FILE'
  359. XDrawingArea Widget
  360. X
  361. X
  362. XSYNOPSIS
  363. X  Application header file    <X11/Xaw_d/DrawingA.h>
  364. X  Class header file        <X11/Xaw_d/DrawingAP.h>
  365. X  Class                drawingAreaWidgetClass
  366. X  Class Name            DrawingArea
  367. X  Superclass            Simple
  368. X
  369. X
  370. XOVERVIEW
  371. X  This widget was needed to allow a drawing area in the Athena widget
  372. X  set that doesn't require hacking up the Label widget by adding
  373. X  complicated actions.  This widget follows Motif's DrawingArea widget
  374. X  closely, except that it follows Athena's naming conventions and there
  375. X  is no resize policy.  Also, Motif's Drawing area is a composite widget,
  376. X  while this one is a simple widget.  This widget is NOT officially
  377. X  part of the Athena widget set.
  378. X
  379. X
  380. XDESCRIPTION
  381. X  The DrawingArea widget is modeled after Motif's DrawingArea widget.
  382. X  The DrawingArea widget is an empty widget that is easily adaptable to
  383. X  a variety of purposes.  It does no drawing and defines no behavior
  384. X  except for invoking callbacks.  Callbacks notify the application when
  385. X  graphics need to be drawn (exposure events or widget resize) and when
  386. X  the widget receives input from the keyboard or mouse.  Applications
  387. X  are responsible for defining appearence and behavior as needed in
  388. X  response to DrawingArea callbacks.
  389. X
  390. X
  391. XClasses
  392. X  DrawingArea inherits behavior and resources from the Core and Simple
  393. X  classes.
  394. X  The class pointer is DrawingAreaWidgetClass.  The class name is DrawingArea.
  395. X
  396. X
  397. XNew Resources
  398. X   Name                 Class        RepType        Default Value
  399. X   ----                 -----        -------        -------------
  400. X   exposeCallback    Callback    Pointer        NULL
  401. X   inputCallback    Callback    Pointer        NULL
  402. X   motionCallback    Callback    Pointer        NULL
  403. X   resizeCallback    Callback    Pointer        NULL
  404. X
  405. X   XtNexposeCallback
  406. X     Specifies list of callbacks that is called when DrawingArea recieves
  407. X     an exposure event.  The callback reason is XawCR_EXPOSE.
  408. X   XtNinputCallback
  409. X     Specifies list of callbacks that is called when DrawingArea recieves
  410. X     an keyboard or mouse event (key or button, up or down).  The callback 
  411. X     reason is XawCR_INPUT.
  412. X   XtNmotionCallback   
  413. X     Specifies list of callbacks that is called when DrawingArea recieves
  414. X     a mouse motion event.  The callback reason is XawCR_MOTION.
  415. X   XtNresizeCallback
  416. X     Specifies list of callbacks that is called when the DrawingArea is
  417. X     resized.  The callback reason is XawCR_RESIZE.
  418. X
  419. X
  420. XInherited Resources, Changed defaults
  421. X   Name                 Class        RepType        Default Value
  422. X   ----                 -----        -------        -------------
  423. X   height        Height        Dimension    100
  424. X   width        Width        Dimension    100
  425. X
  426. X
  427. XCallback Information
  428. X  A pointer to the following structure is returned with each callback.
  429. X
  430. X  typedef struct {
  431. X    int        reason;
  432. X    XEvent *event;
  433. X    Window  window;
  434. X  } XawDrawingAreaCallbackStruct;
  435. X
  436. X  reason: Indicates why the callback was invoked
  437. X  event:  Points to the XEvent that triggered the callback
  438. X  window: Is set to the widget window
  439. X
  440. X
  441. XBehavior
  442. X <KeyDown>,<KeyUp>,<BtnDown>,<BtnUp>:
  443. X   The callbacks for XtNinputCallback are called when a key or button is 
  444. X   pressed or released.
  445. X <Expose>:
  446. X   The callbacks for XtNexposeCallbacks are called when the widget recieves
  447. X   an exposure event.
  448. X <Configure>:
  449. X   The callbacks for XtNresizeCallbacks are called when the widget is resized.
  450. X <Motion>:
  451. X   The callbacks for XtNmotionCallbacks are called when the widget recieves a 
  452. X   pointer motion event.
  453. X
  454. X
  455. XDefault Translations
  456. X  <BtnDown>:    input()
  457. X  <BtnUp>:    input()
  458. X  <KeyDown>:    input()
  459. X  <KeyUp>:    input()
  460. X  <Motion>:    motion()
  461. X  <ResReq>:    resize()
  462. X
  463. X
  464. XSEE ALSO
  465. X  OSF/Motif Programmer's reference: XmDrawingArea
  466. X    Open Software Foundation
  467. X  Athena Widget Set - C Language Interface Rel 4: 3.6 Simple Widget
  468. X    Chris D. Peterson
  469. X  X Toolkit Intrinsics - C Language Interface
  470. X    Joel McCormack, Paul Asenta, Ralph R. Swick
  471. X  The X Window System, programming and Applications with Xt, OSF/Motif Edition
  472. X    Douglas A. Young
  473. X
  474. X
  475. XCOPYRIGHT
  476. X  Copyright 1990, David Nedde
  477. X  Permission to use, copy, modify, and distribute this
  478. X  software and its documentation for any purpose and without
  479. X  fee is provided that the above copyright notice appears in all copies.
  480. X  It is provided "as is" without express or implied warranty.
  481. X
  482. X
  483. XAUTHOR
  484. X  David Nedde, daven@maxine.wpi.edu
  485. END_OF_FILE
  486. if test 4190 -ne `wc -c <'X11/Xaw_d/DrawingA.doc'`; then
  487.     echo shar: \"'X11/Xaw_d/DrawingA.doc'\" unpacked with wrong size!
  488. fi
  489. # end of 'X11/Xaw_d/DrawingA.doc'
  490. fi
  491. if test -f 'X11/Xaw_d/Imakefile' -a "${1}" != "-c" ; then 
  492.   echo shar: Will not clobber existing file \"'X11/Xaw_d/Imakefile'\"
  493. else
  494. echo shar: Extracting \"'X11/Xaw_d/Imakefile'\" \(820 characters\)
  495. sed "s/^X//" >'X11/Xaw_d/Imakefile' <<'END_OF_FILE'
  496. X/**/#
  497. X/**/#   Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu)
  498. X/**/#
  499. X
  500. X       INCLUDES = -I../..
  501. X      DEMO_SRCS = demo.c
  502. X      DEMO_OBJS = demo.o
  503. XLOCAL_LIBRARIES = -lXaw_d
  504. X      LDOPTIONS = -L.
  505. X         LDLIBS = -lXaw -lXt -lXmu -lXext -lX11
  506. X
  507. XNormalLibraryTarget(Xaw_d,DrawingA.o)
  508. X
  509. XSRCS = $(DEMO_SRCS)
  510. XOBJS = $(DEMO_OBJS)
  511. X
  512. XComplexProgramTarget(demo)
  513. X
  514. XDIST = \
  515. X        X11 \
  516. X        X11/Xaw_d \
  517. X        X11/Xaw_d/DrawingA.c \
  518. X        X11/Xaw_d/DrawingA.h \
  519. X        X11/Xaw_d/DrawingAP.h \
  520. X        X11/Xaw_d/DrawingA.doc \
  521. X        X11/Xaw_d/Imakefile \
  522. X        X11/Xaw_d/Makefile.std \
  523. X        X11/Xaw_d/patchlevel.h \
  524. X        X11/Xaw_d/demo.c \
  525. X        X11/Xaw_d/README
  526. X
  527. Xshar:
  528. X    ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d )
  529. X
  530. Xtar:
  531. X    ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z )
  532. END_OF_FILE
  533. if test 820 -ne `wc -c <'X11/Xaw_d/Imakefile'`; then
  534.     echo shar: \"'X11/Xaw_d/Imakefile'\" unpacked with wrong size!
  535. fi
  536. # end of 'X11/Xaw_d/Imakefile'
  537. fi
  538. if test -f 'X11/Xaw_d/Makefile.std' -a "${1}" != "-c" ; then 
  539.   echo shar: Will not clobber existing file \"'X11/Xaw_d/Makefile.std'\"
  540. else
  541. echo shar: Extracting \"'X11/Xaw_d/Makefile.std'\" \(10622 characters\)
  542. sed "s/^X//" >'X11/Xaw_d/Makefile.std' <<'END_OF_FILE'
  543. X# Makefile generated by imake - do not edit!
  544. X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  545. X#
  546. X# The cpp used on this machine replaces all newlines and multiple tabs and
  547. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  548. X# for this, but is not always successful.
  549. X#
  550. X
  551. X###########################################################################
  552. X# Makefile generated from "Imake.tmpl" and <Imakefile>
  553. X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  554. X#
  555. X# Platform-specific parameters may be set in the appropriate .cf
  556. X# configuration files.  Site-wide parameters may be set in the file
  557. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  558. X#
  559. X# If your C preprocessor doesn't define any unique symbols, you'll need
  560. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  561. X# "make Makefile", "make Makefiles", or "make World").
  562. X#
  563. X# If you absolutely can't get imake to work, you'll need to set the
  564. X# variables at the top of each Makefile as well as the dependencies at the
  565. X# bottom (makedepend will do this automatically).
  566. X#
  567. X
  568. X###########################################################################
  569. X# platform-specific configuration parameters - edit sun.cf to change
  570. X
  571. XSYSLIBS=-lXt -lX11
  572. XMWM_DEFINES=-DSHAPE -DOPAQUE
  573. XSYSLIBS=$(MTOOLKITSRC)/libXt.a $(XLIBSRC)/libX11.a
  574. X
  575. X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  576. X# operating system:  SunOS 4.1
  577. X
  578. X###########################################################################
  579. X# site-specific configuration parameters - edit site.def to change
  580. X
  581. X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  582. X
  583. X            SHELL = /bin/sh
  584. X
  585. X              TOP = .
  586. X      CURRENT_DIR = .
  587. X
  588. X               AR = ar cq
  589. X  BOOTSTRAPCFLAGS =
  590. X               CC = cc
  591. X
  592. X         COMPRESS = compress
  593. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  594. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  595. X          INSTALL = install
  596. X               LD = ld
  597. X             LINT = lint
  598. X      LINTLIBFLAG = -C
  599. X         LINTOPTS = -axz
  600. X               LN = ln -s
  601. X             MAKE = make
  602. X               MV = mv
  603. X               CP = cp
  604. X           RANLIB = ranlib
  605. X  RANLIBINSTFLAGS =
  606. X               RM = rm -f
  607. X     STD_INCLUDES =
  608. X  STD_CPP_DEFINES =
  609. X      STD_DEFINES =
  610. X EXTRA_LOAD_FLAGS =
  611. X  EXTRA_LIBRARIES =
  612. X             TAGS = ctags
  613. X
  614. X    SHAREDCODEDEF = -DSHAREDCODE
  615. X         SHLIBDEF = -DSUNSHLIB
  616. X
  617. X    PROTO_DEFINES =
  618. X
  619. X     INSTPGMFLAGS =
  620. X
  621. X     INSTBINFLAGS = -m 0755
  622. X     INSTUIDFLAGS = -m 4755
  623. X     INSTLIBFLAGS = -m 0664
  624. X     INSTINCFLAGS = -m 0444
  625. X     INSTMANFLAGS = -m 0444
  626. X     INSTDATFLAGS = -m 0444
  627. X    INSTKMEMFLAGS = -m 4755
  628. X
  629. X          DESTDIR =
  630. X
  631. X     TOP_INCLUDES = -I$(INCROOT)
  632. X
  633. X      CDEBUGFLAGS = -O
  634. X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD
  635. X      COMPATFLAGS =
  636. X
  637. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  638. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  639. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  640. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  641. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  642. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  643. X   LDCOMBINEFLAGS = -X -r
  644. X
  645. X        MACROFILE = sun.cf
  646. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  647. X
  648. X    IMAKE_DEFINES =
  649. X
  650. X         IRULESRC = $(CONFIGDIR)
  651. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  652. X
  653. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  654. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  655. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  656. X
  657. X###########################################################################
  658. X# X Window System Build Parameters
  659. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  660. X
  661. X###########################################################################
  662. X# X Window System make variables; this need to be coordinated with rules
  663. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  664. X
  665. X          PATHSEP = /
  666. X        USRLIBDIR = $(DESTDIR)/usr/lib
  667. X           BINDIR = $(DESTDIR)/usr/bin/X11
  668. X          INCROOT = $(DESTDIR)/usr/include
  669. X     BUILDINCROOT = $(TOP)
  670. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  671. X      BUILDINCTOP = ..
  672. X           INCDIR = $(INCROOT)/X11
  673. X           ADMDIR = $(DESTDIR)/usr/adm
  674. X           LIBDIR = $(USRLIBDIR)/X11
  675. X        CONFIGDIR = $(LIBDIR)/config
  676. X       LINTLIBDIR = $(USRLIBDIR)/lint
  677. X
  678. X          FONTDIR = $(LIBDIR)/fonts
  679. X         XINITDIR = $(LIBDIR)/xinit
  680. X           XDMDIR = $(LIBDIR)/xdm
  681. X           AWMDIR = $(LIBDIR)/awm
  682. X           TWMDIR = $(LIBDIR)/twm
  683. X           GWMDIR = $(LIBDIR)/gwm
  684. X          MANPATH = $(DESTDIR)/usr/man
  685. X    MANSOURCEPATH = $(MANPATH)/man
  686. X           MANDIR = $(MANSOURCEPATH)n
  687. X        LIBMANDIR = $(MANSOURCEPATH)3
  688. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  689. X
  690. X        SOXLIBREV = 4.2
  691. X          SOXTREV = 4.0
  692. X         SOXAWREV = 4.0
  693. X        SOOLDXREV = 4.0
  694. X         SOXMUREV = 4.0
  695. X        SOXEXTREV = 4.0
  696. X
  697. X       FONTCFLAGS = -t
  698. X
  699. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  700. X
  701. X            IMAKE = imake
  702. X           DEPEND = makedepend
  703. X              RGB = rgb
  704. X            FONTC = bdftosnf
  705. X        MKFONTDIR = mkfontdir
  706. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  707. X
  708. X        CONFIGSRC = $(TOP)/config
  709. X        CLIENTSRC = $(TOP)/clients
  710. X          DEMOSRC = $(TOP)/demos
  711. X           LIBSRC = $(TOP)/lib
  712. X          FONTSRC = $(TOP)/fonts
  713. X       INCLUDESRC = $(TOP)/X11
  714. X        SERVERSRC = $(TOP)/server
  715. X          UTILSRC = $(TOP)/util
  716. X        SCRIPTSRC = $(UTILSRC)/scripts
  717. X       EXAMPLESRC = $(TOP)/examples
  718. X       CONTRIBSRC = $(TOP)/../contrib
  719. X           DOCSRC = $(TOP)/doc
  720. X           RGBSRC = $(TOP)/rgb
  721. X        DEPENDSRC = $(UTILSRC)/makedepend
  722. X         IMAKESRC = $(CONFIGSRC)
  723. X         XAUTHSRC = $(LIBSRC)/Xau
  724. X          XLIBSRC = $(LIBSRC)/X
  725. X           XMUSRC = $(LIBSRC)/Xmu
  726. X       TOOLKITSRC = $(LIBSRC)/Xt
  727. X       AWIDGETSRC = $(LIBSRC)/Xaw
  728. X       OLDXLIBSRC = $(LIBSRC)/oldX
  729. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  730. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  731. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  732. X     EXTENSIONSRC = $(TOP)/extensions
  733. X
  734. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  735. X     EXTENSIONLIB =  -lXext
  736. X
  737. X          DEPXLIB = $(DEPEXTENSIONLIB)
  738. X             XLIB = $(EXTENSIONLIB) -lX11
  739. X
  740. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  741. X         XAUTHLIB =  -lXau
  742. X
  743. X        DEPXMULIB =
  744. X           XMULIB = -lXmu
  745. X
  746. X       DEPOLDXLIB =
  747. X          OLDXLIB = -loldX
  748. X
  749. X      DEPXTOOLLIB =
  750. X         XTOOLLIB = -lXt
  751. X
  752. X        DEPXAWLIB =
  753. X           XAWLIB = -lXaw
  754. X
  755. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  756. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  757. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  758. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  759. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  760. X
  761. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  762. X
  763. X         DEPLIBS1 = $(DEPLIBS)
  764. X         DEPLIBS2 = $(DEPLIBS)
  765. X         DEPLIBS3 = $(DEPLIBS)
  766. X
  767. X      USRINCDIR = $(DESTDIR)/usr/include
  768. X        TESTSRC = $(TOP)/tests
  769. X     TESTSRCLIB = $(TESTSRC)/lib
  770. X     TESTSRCBIN = $(TESTSRC)/bin
  771. X       COMMONPP = $(TESTSRCBIN)/Commonpp
  772. X
  773. X     TESTCOMSRC = $(TESTSRCLIB)/Common
  774. X    MTOOLKITSRC = $(LIBSRC)/Xt
  775. X     MWIDGETSRC = $(LIBSRC)/Xm
  776. X   MRESOURCESRC = $(LIBSRC)/Mrm
  777. X         UILSRC = $(CLIENTSRC)/uil
  778. X            UIL = $(UILSRC)/uil
  779. X      XMTOOLLIB = $(MTOOLKITSRC)/libXt.a
  780. X          XMLIB = $(MWIDGETSRC)/libXm.a
  781. X   MRESOURCELIB = $(MRESOURCESRC)/libMrm.a
  782. X         UILLIB = $(UILSRC)/libUil.a
  783. X     TESTCOMLIB = $(TESTCOMSRC)/libCommon.a
  784. X
  785. X  LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
  786. XLINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
  787. X     LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
  788. X     LINTUILLIB = $(UILSRC)/llib-lUil.ln
  789. X
  790. X        DEPLIBS =
  791. X
  792. X        DEPLIBS1 = $(DEPLIBS)
  793. X        DEPLIBS2 = $(DEPLIBS)
  794. X        DEPLIBS3 = $(DEPLIBS)
  795. X
  796. X###########################################################################
  797. X# Imake rules for building libraries, programs, scripts, and data files
  798. X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  799. X
  800. X###########################################################################
  801. X# start of Imakefile
  802. X
  803. X#
  804. X#   Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu)
  805. X#
  806. X
  807. X       INCLUDES = -I../..
  808. X      DEMO_SRCS = demo.c
  809. X      DEMO_OBJS = demo.o
  810. XLOCAL_LIBRARIES = -lXaw_d
  811. X      LDOPTIONS = -L.
  812. X         LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11
  813. X
  814. Xall:: libXaw_d.a
  815. X
  816. XlibXaw_d.a: DrawingA.o
  817. X    $(RM) $@
  818. X    $(AR) $@ DrawingA.o
  819. X    $(RANLIB) $@
  820. X
  821. XSRCS = $(DEMO_SRCS)
  822. XOBJS = $(DEMO_OBJS)
  823. X
  824. X PROGRAM = demo
  825. X
  826. Xall:: demo
  827. X
  828. Xdemo: $(OBJS) $(DEPLIBS)
  829. X    $(RM) $@
  830. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  831. X
  832. Xsaber_demo:
  833. X    #load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  834. X
  835. Xosaber_demo:
  836. X    #load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  837. X
  838. Xinstall:: demo
  839. X    $(INSTALL) -c $(INSTPGMFLAGS)   demo $(BINDIR)
  840. X
  841. Xinstall.man:: demo.man
  842. X    $(INSTALL) -c $(INSTMANFLAGS) demo.man $(MANDIR)/demo.n
  843. X
  844. Xdepend::
  845. X    $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  846. X
  847. Xlint:
  848. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  849. Xlint1:
  850. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  851. X
  852. Xclean::
  853. X    $(RM) $(PROGRAM)
  854. X
  855. XDIST = \
  856. X        X11 \
  857. X        X11/Xaw_d \
  858. X        X11/Xaw_d/DrawingA.c \
  859. X        X11/Xaw_d/DrawingA.h \
  860. X        X11/Xaw_d/DrawingAP.h \
  861. X        X11/Xaw_d/DrawingA.doc \
  862. X        X11/Xaw_d/Imakefile \
  863. X        X11/Xaw_d/Makefile.std \
  864. X        X11/Xaw_d/patchlevel.h \
  865. X        X11/Xaw_d/demo.c \
  866. X        X11/Xaw_d/README
  867. X
  868. Xshar:
  869. X    ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d )
  870. X
  871. Xtar:
  872. X    ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z )
  873. X
  874. X###########################################################################
  875. X# common rules for all Makefiles - do not edit
  876. X
  877. Xemptyrule::
  878. X
  879. Xclean::
  880. X    $(RM_CMD) \#*
  881. X
  882. XMakefile::
  883. X    -@if [ -f Makefile ]; then \
  884. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  885. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  886. X    else exit 0; fi
  887. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  888. X
  889. Xtags::
  890. X    $(TAGS) -w *.[ch]
  891. X    $(TAGS) -xw *.[ch] > TAGS
  892. X
  893. Xsaber:
  894. X    #load $(ALLDEFINES) $(SRCS)
  895. X
  896. Xosaber:
  897. X    #load $(ALLDEFINES) $(OBJS)
  898. X
  899. X###########################################################################
  900. X# empty rules for directories that do not have SUBDIRS - do not edit
  901. X
  902. Xinstall::
  903. X    @echo "install in $(CURRENT_DIR) done"
  904. X
  905. Xinstall.man::
  906. X    @echo "install.man in $(CURRENT_DIR) done"
  907. X
  908. XMakefiles::
  909. X
  910. Xincludes::
  911. X
  912. X###########################################################################
  913. X# dependencies generated by makedepend
  914. X
  915. END_OF_FILE
  916. if test 10622 -ne `wc -c <'X11/Xaw_d/Makefile.std'`; then
  917.     echo shar: \"'X11/Xaw_d/Makefile.std'\" unpacked with wrong size!
  918. fi
  919. # end of 'X11/Xaw_d/Makefile.std'
  920. fi
  921. if test -f 'X11/Xaw_d/Makefile' -a "${1}" != "-c" ; then 
  922.   echo shar: Will not clobber existing file \"'X11/Xaw_d/Makefile'\"
  923. else
  924. echo shar: Extracting \"'X11/Xaw_d/Makefile'\" \(10622 characters\)
  925. sed "s/^X//" >'X11/Xaw_d/Makefile' <<'END_OF_FILE'
  926. X# Makefile generated by imake - do not edit!
  927. X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  928. X#
  929. X# The cpp used on this machine replaces all newlines and multiple tabs and
  930. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  931. X# for this, but is not always successful.
  932. X#
  933. X
  934. X###########################################################################
  935. X# Makefile generated from "Imake.tmpl" and <Imakefile>
  936. X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  937. X#
  938. X# Platform-specific parameters may be set in the appropriate .cf
  939. X# configuration files.  Site-wide parameters may be set in the file
  940. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  941. X#
  942. X# If your C preprocessor doesn't define any unique symbols, you'll need
  943. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  944. X# "make Makefile", "make Makefiles", or "make World").
  945. X#
  946. X# If you absolutely can't get imake to work, you'll need to set the
  947. X# variables at the top of each Makefile as well as the dependencies at the
  948. X# bottom (makedepend will do this automatically).
  949. X#
  950. X
  951. X###########################################################################
  952. X# platform-specific configuration parameters - edit sun.cf to change
  953. X
  954. XSYSLIBS=-lXt -lX11
  955. XMWM_DEFINES=-DSHAPE -DOPAQUE
  956. XSYSLIBS=$(MTOOLKITSRC)/libXt.a $(XLIBSRC)/libX11.a
  957. X
  958. X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  959. X# operating system:  SunOS 4.1
  960. X
  961. X###########################################################################
  962. X# site-specific configuration parameters - edit site.def to change
  963. X
  964. X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  965. X
  966. X            SHELL = /bin/sh
  967. X
  968. X              TOP = .
  969. X      CURRENT_DIR = .
  970. X
  971. X               AR = ar cq
  972. X  BOOTSTRAPCFLAGS =
  973. X               CC = cc
  974. X
  975. X         COMPRESS = compress
  976. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  977. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  978. X          INSTALL = install
  979. X               LD = ld
  980. X             LINT = lint
  981. X      LINTLIBFLAG = -C
  982. X         LINTOPTS = -axz
  983. X               LN = ln -s
  984. X             MAKE = make
  985. X               MV = mv
  986. X               CP = cp
  987. X           RANLIB = ranlib
  988. X  RANLIBINSTFLAGS =
  989. X               RM = rm -f
  990. X     STD_INCLUDES =
  991. X  STD_CPP_DEFINES =
  992. X      STD_DEFINES =
  993. X EXTRA_LOAD_FLAGS =
  994. X  EXTRA_LIBRARIES =
  995. X             TAGS = ctags
  996. X
  997. X    SHAREDCODEDEF = -DSHAREDCODE
  998. X         SHLIBDEF = -DSUNSHLIB
  999. X
  1000. X    PROTO_DEFINES =
  1001. X
  1002. X     INSTPGMFLAGS =
  1003. X
  1004. X     INSTBINFLAGS = -m 0755
  1005. X     INSTUIDFLAGS = -m 4755
  1006. X     INSTLIBFLAGS = -m 0664
  1007. X     INSTINCFLAGS = -m 0444
  1008. X     INSTMANFLAGS = -m 0444
  1009. X     INSTDATFLAGS = -m 0444
  1010. X    INSTKMEMFLAGS = -m 4755
  1011. X
  1012. X          DESTDIR =
  1013. X
  1014. X     TOP_INCLUDES = -I$(INCROOT)
  1015. X
  1016. X      CDEBUGFLAGS = -O
  1017. X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD
  1018. X      COMPATFLAGS =
  1019. X
  1020. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  1021. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  1022. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  1023. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  1024. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1025. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  1026. X   LDCOMBINEFLAGS = -X -r
  1027. X
  1028. X        MACROFILE = sun.cf
  1029. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  1030. X
  1031. X    IMAKE_DEFINES =
  1032. X
  1033. X         IRULESRC = $(CONFIGDIR)
  1034. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  1035. X
  1036. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  1037. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  1038. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  1039. X
  1040. X###########################################################################
  1041. X# X Window System Build Parameters
  1042. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1043. X
  1044. X###########################################################################
  1045. X# X Window System make variables; this need to be coordinated with rules
  1046. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1047. X
  1048. X          PATHSEP = /
  1049. X        USRLIBDIR = $(DESTDIR)/usr/lib
  1050. X           BINDIR = $(DESTDIR)/usr/bin/X11
  1051. X          INCROOT = $(DESTDIR)/usr/include
  1052. X     BUILDINCROOT = $(TOP)
  1053. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  1054. X      BUILDINCTOP = ..
  1055. X           INCDIR = $(INCROOT)/X11
  1056. X           ADMDIR = $(DESTDIR)/usr/adm
  1057. X           LIBDIR = $(USRLIBDIR)/X11
  1058. X        CONFIGDIR = $(LIBDIR)/config
  1059. X       LINTLIBDIR = $(USRLIBDIR)/lint
  1060. X
  1061. X          FONTDIR = $(LIBDIR)/fonts
  1062. X         XINITDIR = $(LIBDIR)/xinit
  1063. X           XDMDIR = $(LIBDIR)/xdm
  1064. X           AWMDIR = $(LIBDIR)/awm
  1065. X           TWMDIR = $(LIBDIR)/twm
  1066. X           GWMDIR = $(LIBDIR)/gwm
  1067. X          MANPATH = $(DESTDIR)/usr/man
  1068. X    MANSOURCEPATH = $(MANPATH)/man
  1069. X           MANDIR = $(MANSOURCEPATH)n
  1070. X        LIBMANDIR = $(MANSOURCEPATH)3
  1071. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  1072. X
  1073. X        SOXLIBREV = 4.2
  1074. X          SOXTREV = 4.0
  1075. X         SOXAWREV = 4.0
  1076. X        SOOLDXREV = 4.0
  1077. X         SOXMUREV = 4.0
  1078. X        SOXEXTREV = 4.0
  1079. X
  1080. X       FONTCFLAGS = -t
  1081. X
  1082. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  1083. X
  1084. X            IMAKE = imake
  1085. X           DEPEND = makedepend
  1086. X              RGB = rgb
  1087. X            FONTC = bdftosnf
  1088. X        MKFONTDIR = mkfontdir
  1089. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  1090. X
  1091. X        CONFIGSRC = $(TOP)/config
  1092. X        CLIENTSRC = $(TOP)/clients
  1093. X          DEMOSRC = $(TOP)/demos
  1094. X           LIBSRC = $(TOP)/lib
  1095. X          FONTSRC = $(TOP)/fonts
  1096. X       INCLUDESRC = $(TOP)/X11
  1097. X        SERVERSRC = $(TOP)/server
  1098. X          UTILSRC = $(TOP)/util
  1099. X        SCRIPTSRC = $(UTILSRC)/scripts
  1100. X       EXAMPLESRC = $(TOP)/examples
  1101. X       CONTRIBSRC = $(TOP)/../contrib
  1102. X           DOCSRC = $(TOP)/doc
  1103. X           RGBSRC = $(TOP)/rgb
  1104. X        DEPENDSRC = $(UTILSRC)/makedepend
  1105. X         IMAKESRC = $(CONFIGSRC)
  1106. X         XAUTHSRC = $(LIBSRC)/Xau
  1107. X          XLIBSRC = $(LIBSRC)/X
  1108. X           XMUSRC = $(LIBSRC)/Xmu
  1109. X       TOOLKITSRC = $(LIBSRC)/Xt
  1110. X       AWIDGETSRC = $(LIBSRC)/Xaw
  1111. X       OLDXLIBSRC = $(LIBSRC)/oldX
  1112. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  1113. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  1114. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  1115. X     EXTENSIONSRC = $(TOP)/extensions
  1116. X
  1117. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  1118. X     EXTENSIONLIB =  -lXext
  1119. X
  1120. X          DEPXLIB = $(DEPEXTENSIONLIB)
  1121. X             XLIB = $(EXTENSIONLIB) -lX11
  1122. X
  1123. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  1124. X         XAUTHLIB =  -lXau
  1125. X
  1126. X        DEPXMULIB =
  1127. X           XMULIB = -lXmu
  1128. X
  1129. X       DEPOLDXLIB =
  1130. X          OLDXLIB = -loldX
  1131. X
  1132. X      DEPXTOOLLIB =
  1133. X         XTOOLLIB = -lXt
  1134. X
  1135. X        DEPXAWLIB =
  1136. X           XAWLIB = -lXaw
  1137. X
  1138. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  1139. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  1140. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  1141. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  1142. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  1143. X
  1144. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  1145. X
  1146. X         DEPLIBS1 = $(DEPLIBS)
  1147. X         DEPLIBS2 = $(DEPLIBS)
  1148. X         DEPLIBS3 = $(DEPLIBS)
  1149. X
  1150. X      USRINCDIR = $(DESTDIR)/usr/include
  1151. X        TESTSRC = $(TOP)/tests
  1152. X     TESTSRCLIB = $(TESTSRC)/lib
  1153. X     TESTSRCBIN = $(TESTSRC)/bin
  1154. X       COMMONPP = $(TESTSRCBIN)/Commonpp
  1155. X
  1156. X     TESTCOMSRC = $(TESTSRCLIB)/Common
  1157. X    MTOOLKITSRC = $(LIBSRC)/Xt
  1158. X     MWIDGETSRC = $(LIBSRC)/Xm
  1159. X   MRESOURCESRC = $(LIBSRC)/Mrm
  1160. X         UILSRC = $(CLIENTSRC)/uil
  1161. X            UIL = $(UILSRC)/uil
  1162. X      XMTOOLLIB = $(MTOOLKITSRC)/libXt.a
  1163. X          XMLIB = $(MWIDGETSRC)/libXm.a
  1164. X   MRESOURCELIB = $(MRESOURCESRC)/libMrm.a
  1165. X         UILLIB = $(UILSRC)/libUil.a
  1166. X     TESTCOMLIB = $(TESTCOMSRC)/libCommon.a
  1167. X
  1168. X  LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
  1169. XLINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
  1170. X     LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
  1171. X     LINTUILLIB = $(UILSRC)/llib-lUil.ln
  1172. X
  1173. X        DEPLIBS =
  1174. X
  1175. X        DEPLIBS1 = $(DEPLIBS)
  1176. X        DEPLIBS2 = $(DEPLIBS)
  1177. X        DEPLIBS3 = $(DEPLIBS)
  1178. X
  1179. X###########################################################################
  1180. X# Imake rules for building libraries, programs, scripts, and data files
  1181. X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  1182. X
  1183. X###########################################################################
  1184. X# start of Imakefile
  1185. X
  1186. X#
  1187. X#   Imakefile for Xaw_d : Dave Nedde (daven@ivy.wpi.edu)
  1188. X#
  1189. X
  1190. X       INCLUDES = -I../..
  1191. X      DEMO_SRCS = demo.c
  1192. X      DEMO_OBJS = demo.o
  1193. XLOCAL_LIBRARIES = -lXaw_d
  1194. X      LDOPTIONS = -L.
  1195. X         LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11
  1196. X
  1197. Xall:: libXaw_d.a
  1198. X
  1199. XlibXaw_d.a: DrawingA.o
  1200. X    $(RM) $@
  1201. X    $(AR) $@ DrawingA.o
  1202. X    $(RANLIB) $@
  1203. X
  1204. XSRCS = $(DEMO_SRCS)
  1205. XOBJS = $(DEMO_OBJS)
  1206. X
  1207. X PROGRAM = demo
  1208. X
  1209. Xall:: demo
  1210. X
  1211. Xdemo: $(OBJS) $(DEPLIBS)
  1212. X    $(RM) $@
  1213. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  1214. X
  1215. Xsaber_demo:
  1216. X    #load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1217. X
  1218. Xosaber_demo:
  1219. X    #load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1220. X
  1221. Xinstall:: demo
  1222. X    $(INSTALL) -c $(INSTPGMFLAGS)   demo $(BINDIR)
  1223. X
  1224. Xinstall.man:: demo.man
  1225. X    $(INSTALL) -c $(INSTMANFLAGS) demo.man $(MANDIR)/demo.n
  1226. X
  1227. Xdepend::
  1228. X    $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  1229. X
  1230. Xlint:
  1231. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  1232. Xlint1:
  1233. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  1234. X
  1235. Xclean::
  1236. X    $(RM) $(PROGRAM)
  1237. X
  1238. XDIST = \
  1239. X        X11 \
  1240. X        X11/Xaw_d \
  1241. X        X11/Xaw_d/DrawingA.c \
  1242. X        X11/Xaw_d/DrawingA.h \
  1243. X        X11/Xaw_d/DrawingAP.h \
  1244. X        X11/Xaw_d/DrawingA.doc \
  1245. X        X11/Xaw_d/Imakefile \
  1246. X        X11/Xaw_d/Makefile.std \
  1247. X        X11/Xaw_d/patchlevel.h \
  1248. X        X11/Xaw_d/demo.c \
  1249. X        X11/Xaw_d/README
  1250. X
  1251. Xshar:
  1252. X    ( cd ../.. ; makekit -s75k -p $(DIST) ; mv Part* X11/Xaw_d )
  1253. X
  1254. Xtar:
  1255. X    ( cd ../.. ; tar cvf - $(DIST) | compress -v > X11/Xaw_d/xball.tar.Z )
  1256. X
  1257. X###########################################################################
  1258. X# common rules for all Makefiles - do not edit
  1259. X
  1260. Xemptyrule::
  1261. X
  1262. Xclean::
  1263. X    $(RM_CMD) \#*
  1264. X
  1265. XMakefile::
  1266. X    -@if [ -f Makefile ]; then \
  1267. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  1268. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  1269. X    else exit 0; fi
  1270. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  1271. X
  1272. Xtags::
  1273. X    $(TAGS) -w *.[ch]
  1274. X    $(TAGS) -xw *.[ch] > TAGS
  1275. X
  1276. Xsaber:
  1277. X    #load $(ALLDEFINES) $(SRCS)
  1278. X
  1279. Xosaber:
  1280. X    #load $(ALLDEFINES) $(OBJS)
  1281. X
  1282. X###########################################################################
  1283. X# empty rules for directories that do not have SUBDIRS - do not edit
  1284. X
  1285. Xinstall::
  1286. X    @echo "install in $(CURRENT_DIR) done"
  1287. X
  1288. Xinstall.man::
  1289. X    @echo "install.man in $(CURRENT_DIR) done"
  1290. X
  1291. XMakefiles::
  1292. X
  1293. Xincludes::
  1294. X
  1295. X###########################################################################
  1296. X# dependencies generated by makedepend
  1297. X
  1298. END_OF_FILE
  1299. if test 10622 -ne `wc -c <'X11/Xaw_d/Makefile'`; then
  1300.     echo shar: \"'X11/Xaw_d/Makefile'\" unpacked with wrong size!
  1301. fi
  1302. # end of 'X11/Xaw_d/Makefile'
  1303. fi
  1304. if test -f 'X11/Xaw_d/demo.c' -a "${1}" != "-c" ; then 
  1305.   echo shar: Will not clobber existing file \"'X11/Xaw_d/demo.c'\"
  1306. else
  1307. echo shar: Extracting \"'X11/Xaw_d/demo.c'\" \(2857 characters\)
  1308. sed "s/^X//" >'X11/Xaw_d/demo.c' <<'END_OF_FILE'
  1309. X/**********************************************************************
  1310. X * demo.c - Demo the drawing area widget
  1311. X *
  1312. X * Copyright 1993, David Nedde
  1313. X *
  1314. X * Permission to use, copy, modify, and distribute this software
  1315. X * and its documentation for any purpose and without fee is granted
  1316. X * provided that the above copyright notice appears in all copies.
  1317. X * It is provided "as is" without express or implied warranty.
  1318. X **********************************************************************/
  1319. X
  1320. X#include <stdio.h>
  1321. X
  1322. X#include <X11/StringDefs.h>
  1323. X#include <X11/IntrinsicP.h>
  1324. X#include <X11/CoreP.h>
  1325. X#include "X11/Xaw_d/DrawingA.h"
  1326. X#include <X11/Xaw/Form.h>
  1327. X#include <X11/Xaw/Command.h>
  1328. X
  1329. XGC gc = 0;
  1330. X
  1331. X/*** Start of main program ***/
  1332. Xmain(argc, argv)
  1333. Xint    argc;
  1334. Xchar **argv;
  1335. X{
  1336. X    XtAppContext app_context;
  1337. X    Widget   toplevel;          /* The core widget */
  1338. X
  1339. X    Arg      wargs[20];         /* Used to set widget resources */
  1340. X    int      n;
  1341. X
  1342. X    toplevel = XtAppInitialize(&app_context,"Demo", 
  1343. X                               NULL, 0, 
  1344. X                               (Cardinal *)&argc, argv,     
  1345. X                               NULL,
  1346. X                               /*args*/(ArgList)NULL, /*num_args*/(Cardinal)0);
  1347. X
  1348. X    setup_widgets( toplevel);
  1349. X
  1350. X    XtRealizeWidget(toplevel);
  1351. X
  1352. X    XtAppMainLoop(app_context);
  1353. X}
  1354. X
  1355. X
  1356. Xstatic void redisplay_cb(w, closure, call_data)
  1357. XWidget                         w;
  1358. XXtPointer                      closure;
  1359. XXawDrawingAreaCallbackStruct * call_data;
  1360. X{
  1361. X    int x = 10;
  1362. X    int y = 10;
  1363. X    int width = 30;
  1364. X    int height = 30;
  1365. X
  1366. X    if (gc == 0)
  1367. X    {
  1368. X        gc = XCreateGC(XtDisplay(w), XtWindow(w), 0, 0);
  1369. X        XSetForeground(XtDisplay(w), gc, 
  1370. X                       BlackPixel(XtDisplay(w),      
  1371. X                                  DefaultScreen(XtDisplay(w))));
  1372. X    }
  1373. X
  1374. X    XDrawArc(XtDisplay(w), XtWindow(w), gc, x, y, width, height, 0, 360*64);
  1375. X    XFillArc(XtDisplay(w), XtWindow(w), gc, x, y, width, height, 0, 360*64);
  1376. X}
  1377. X
  1378. X
  1379. Xstatic void quit_cb(w, closure, call_data)
  1380. XWidget    w;
  1381. XXtPointer closure;
  1382. XXtPointer call_data;
  1383. X{
  1384. X    exit(0);
  1385. X}
  1386. X
  1387. X
  1388. X
  1389. Xsetup_widgets( toplevel )
  1390. XWidget toplevel;
  1391. X{
  1392. X  Widget button;
  1393. X  Widget form_widget =
  1394. X      XtCreateManagedWidget("form", formWidgetClass, toplevel, NULL,0);
  1395. X
  1396. X  Widget canvas = XtVaCreateManagedWidget("canvas", drawingAreaWidgetClass, 
  1397. X                                          form_widget, 
  1398. X                                          XtNwidth, 200,
  1399. X                                          XtNheight, 200,
  1400. X                                          NULL);
  1401. X
  1402. X  XtAddCallback(canvas,XtNexposeCallback,redisplay_cb, NULL);
  1403. X
  1404. X
  1405. X  button = XtVaCreateManagedWidget("Quit", commandWidgetClass, 
  1406. X                                   form_widget, 
  1407. X                                   XtNfromVert,   canvas,
  1408. X                                   NULL);
  1409. X  
  1410. X  XtAddCallback(button,XtNcallback,quit_cb, NULL);
  1411. X}
  1412. END_OF_FILE
  1413. if test 2857 -ne `wc -c <'X11/Xaw_d/demo.c'`; then
  1414.     echo shar: \"'X11/Xaw_d/demo.c'\" unpacked with wrong size!
  1415. fi
  1416. # end of 'X11/Xaw_d/demo.c'
  1417. fi
  1418. if test -f 'X11/Xaw_d/README' -a "${1}" != "-c" ; then 
  1419.   echo shar: Will not clobber existing file \"'X11/Xaw_d/README'\"
  1420. else
  1421. echo shar: Extracting \"'X11/Xaw_d/README'\" \(609 characters\)
  1422. sed "s/^X//" >'X11/Xaw_d/README' <<'END_OF_FILE'
  1423. XDrawing Area Widget and Demo
  1424. X
  1425. X  The drawingArea widget is an Athena-style widget that has callbacks
  1426. Xfor expose, input, motion and resize events.
  1427. X
  1428. X  Included is a demo program that uses the drawingArea widget.
  1429. X
  1430. X  To compile and run:
  1431. X    xmkmf
  1432. X    make
  1433. X  If you do not have xmkmf:
  1434. X    make -f Makefile.std
  1435. X
  1436. X
  1437. XCopying:
  1438. X   Copyright 1993, David Nedde
  1439. X   Permission to use, copy, modify, and distribute this software
  1440. X   and its documentation for any purpose and without fee is granted
  1441. X   provided that the above copyright notice appears in all copies.
  1442. X   It is provided "as is" without express or implied warranty.
  1443. END_OF_FILE
  1444. if test 609 -ne `wc -c <'X11/Xaw_d/README'`; then
  1445.     echo shar: \"'X11/Xaw_d/README'\" unpacked with wrong size!
  1446. fi
  1447. # end of 'X11/Xaw_d/README'
  1448. fi
  1449. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  1450.   echo shar: Will not clobber existing file \"'Imakefile'\"
  1451. else
  1452. echo shar: Extracting \"'Imakefile'\" \(3847 characters\)
  1453. sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  1454. X/**********************************************************************
  1455. X * Imakefile - Imakefile for the xball program
  1456. X *
  1457. X * Copyright 1993, David Nedde
  1458. X *
  1459. X * Permission to use, copy, modify, and distribute this software
  1460. X * and its documentation for any purpose and without fee is granted
  1461. X * provided that the above copyright notice appears in all copies.
  1462. X * It is provided "as is" without express or implied warranty.
  1463. X **********************************************************************/
  1464. X
  1465. X/**/# MOTIF  -> Have Motif Widgets
  1466. X/**/# ATHENA -> Have Athena Widgets
  1467. X
  1468. X#define MOTIF   
  1469. X/**/#define ATHENA     
  1470. X
  1471. X
  1472. X           DELAY = -DDELAY=100       # DELAY ranges from -18 to whatever
  1473. X/**/#    GRAVITY = -DGRAVITY=8       # Default gravity
  1474. X/**/# ELASTICITY = -DELASTICY=90     # Default elasticity
  1475. X          USLEEP = -DHAVE_USLEEP      # Uncomment if usleep installed...
  1476. X       MYDEFINES = $(DELAY) $(USLEEP)
  1477. X     CDEBUGFLAGS = -g
  1478. X
  1479. X
  1480. XM_SRCS = act_area.c
  1481. XM_OBJS = act_area.o
  1482. XM_INCS = act_area.h
  1483. X
  1484. XA_SRCS = filemenu.c
  1485. XA_OBJS = filemenu.o
  1486. XA_INCS =
  1487. X
  1488. X#ifdef MOTIF
  1489. X
  1490. X         DEFINES = -DMOTIF $(MYDEFINES)
  1491. X/**/#   MYLDLIBS = -lPW    # Uncomment if you get regcmp and regex undefined
  1492. X          LDLIBS = -lXm -lXmu -lXt -lX11 $(MYLDLIBS)
  1493. X
  1494. XTOOL_SRCS = $(M_SRCS)
  1495. XTOOL_OBJS = $(M_OBJS)
  1496. XTOOL_INCS = $(M_INCS)
  1497. X
  1498. X#endif
  1499. X
  1500. X
  1501. X#ifdef ATHENA
  1502. X
  1503. X/****** For filemenu *****/
  1504. X#if defined(SunArchitecture) && OSMajorVersion >= 4
  1505. X        PREDEFINES = -DSUNOS4
  1506. X#endif
  1507. X#ifdef UltrixArchitecture
  1508. X#ifdef MipsArchitecture
  1509. X        PREDEFINES = -DBSD -DMIPS
  1510. X#else
  1511. X        PREDEFINES = -DBSD
  1512. X#endif
  1513. X#endif
  1514. X
  1515. X#define IHaveSubdirs
  1516. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  1517. X
  1518. X        SUBDIRS = X11/Xaw_d
  1519. XLOCAL_LIBRARIES = -lXaw_d
  1520. X        DEFINES = -DATHENA $(MYDEFINES)
  1521. X       INCLUDES = -I.
  1522. X      LDOPTIONS = -LX11/Xaw_d
  1523. X         LDLIBS = -lXaw_d -lXaw -lXt -lXmu -lXext -lX11
  1524. X
  1525. XMakeSubdirs($(SUBDIRS))
  1526. X
  1527. XTOOL_SRCS = $(A_SRCS)
  1528. XTOOL_OBJS = $(A_OBJS)
  1529. XTOOL_INCS = $(A_INCS)
  1530. X
  1531. X#endif
  1532. X
  1533. X LINTOPTS = -abhuvz -D_NO_PROTO $(DEFINES)
  1534. X
  1535. X
  1536. XCOMM_SRCS = \
  1537. X    color_l.c \
  1538. X    demo.c \
  1539. X    file_sel.c \
  1540. X    help.c \
  1541. X    item.c \
  1542. X    items.c \
  1543. X    list.c \
  1544. X    menu.c \
  1545. X    misc.c \
  1546. X    miscx.c \
  1547. X    room.c \
  1548. X    scrollbar.c \
  1549. X    sim.c \
  1550. X    table.c \
  1551. X    xball.c \
  1552. X    xball_sys.c
  1553. X
  1554. XCOMM_OBJS = \
  1555. X    color_l.o \
  1556. X    demo.o \
  1557. X    file_sel.o \
  1558. X    help.o \
  1559. X    item.o \
  1560. X    items.o \
  1561. X    list.o \
  1562. X    menu.o \
  1563. X    misc.o \
  1564. X    miscx.o \
  1565. X    room.o \
  1566. X    scrollbar.o \
  1567. X    sim.o \
  1568. X    table.o \
  1569. X    xball.o \
  1570. X    xball_sys.o
  1571. X
  1572. XCOMM_INCS = \
  1573. X    color_l.h \
  1574. X    demo.h \
  1575. X    fallback.h \
  1576. X    file_sel.h \
  1577. X    help.h \
  1578. X    intf.h \
  1579. X    item.h \
  1580. X    items.h \
  1581. X    list.h \
  1582. X    menu.h \
  1583. X    misc.h \
  1584. X    miscx.h \
  1585. X    names.h \
  1586. X        patchlevel.h \
  1587. X    room.h \
  1588. X    scrollbar.h \
  1589. X    sim.h \
  1590. X    table.h \
  1591. X    xball_sys.h
  1592. X
  1593. XSRCS = $(COMM_SRCS) $(TOOL_SRCS)
  1594. XOBJS = $(COMM_OBJS) $(TOOL_OBJS)
  1595. XINCS = $(COMM_INCS) $(TOOL_INCS)
  1596. X
  1597. XComplexProgramTarget(xball)
  1598. X
  1599. XCLASS            = XBall
  1600. XAPP_DEFAULTS_SRC = $(CLASS).ad
  1601. X
  1602. XInstallAppDefaults( $(CLASS))
  1603. X
  1604. X
  1605. Xfallback.h: $(APP_DEFAULTS_SRC)
  1606. X    gen_fallback $(APP_DEFAULTS_SRC) > $@
  1607. X
  1608. X
  1609. XDEMOS = demo1 demo2 demo3 demo4 demo5 demo6 demo7 demo8 demo9 demo10 \
  1610. X        demo11 demo12 demo13 demo14
  1611. X
  1612. XBITMAPS = \
  1613. X    good_bitmaps \
  1614. X    on.xbm \
  1615. X    off.xbm \
  1616. X    man.xbm \
  1617. X    stipple.xbm \
  1618. X    xball.xbm \
  1619. X    xball-a.xbm \
  1620. X    xball-b.xbm \
  1621. X    xball-l.xbm \
  1622. X    xball-x.xbm \
  1623. X    sgi.xbm
  1624. X
  1625. XMISC = \
  1626. X    gen_fallback \
  1627. X    run_demos \
  1628. X        xball.man \
  1629. X    README
  1630. X
  1631. XDRAWING_A_DIRS = \
  1632. X    X11 \
  1633. X    X11/Xaw_d
  1634. X
  1635. XDRAWING_A = \
  1636. X    X11/Xaw_d/DrawingA.c \
  1637. X    X11/Xaw_d/DrawingA.h \
  1638. X    X11/Xaw_d/DrawingAP.h \
  1639. X    X11/Xaw_d/DrawingA.doc \
  1640. X    X11/Xaw_d/Imakefile \
  1641. X    X11/Xaw_d/Makefile.std \
  1642. X    X11/Xaw_d/Makefile \
  1643. X        X11/Xaw_d/demo.c \
  1644. X    X11/Xaw_d/README \
  1645. X    Imakefile \
  1646. X    Makefile.std \
  1647. X    Makefile \
  1648. X    Make.motif \
  1649. X    Make.athena
  1650. X
  1651. XDIST = \
  1652. X    $(DRAWING_A) \
  1653. X    $(COMM_SRCS) \
  1654. X    $(COMM_INCS) \
  1655. X    $(M_SRCS) \
  1656. X    $(M_INCS) \
  1657. X    $(A_SRCS) \
  1658. X    $(A_INCS) \
  1659. X    $(APP_DEFAULTS_SRC) \
  1660. X    $(MISC) \
  1661. X    $(BITMAPS) \
  1662. X    $(DEMOS)
  1663. X
  1664. Xshar:
  1665. X    makekit -s75k -p $(DRAWING_A_DIRS) $(DIST)
  1666. X
  1667. Xtar:
  1668. X    tar cvf - $(DIST) | compress -v > xball.tar.Z
  1669. END_OF_FILE
  1670. if test 3847 -ne `wc -c <'Imakefile'`; then
  1671.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  1672. fi
  1673. # end of 'Imakefile'
  1674. fi
  1675. if test -f 'Makefile.std' -a "${1}" != "-c" ; then 
  1676.   echo shar: Will not clobber existing file \"'Makefile.std'\"
  1677. else
  1678. echo shar: Extracting \"'Makefile.std'\" \(12467 characters\)
  1679. sed "s/^X//" >'Makefile.std' <<'END_OF_FILE'
  1680. X# Makefile generated by imake - do not edit!
  1681. X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  1682. X#
  1683. X# The cpp used on this machine replaces all newlines and multiple tabs and
  1684. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  1685. X# for this, but is not always successful.
  1686. X#
  1687. X
  1688. X###########################################################################
  1689. X# Makefile generated from "Imake.tmpl" and <Imakefile>
  1690. X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  1691. X#
  1692. X# Platform-specific parameters may be set in the appropriate .cf
  1693. X# configuration files.  Site-wide parameters may be set in the file
  1694. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  1695. X#
  1696. X# If your C preprocessor doesn't define any unique symbols, you'll need
  1697. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  1698. X# "make Makefile", "make Makefiles", or "make World").
  1699. X#
  1700. X# If you absolutely can't get imake to work, you'll need to set the
  1701. X# variables at the top of each Makefile as well as the dependencies at the
  1702. X# bottom (makedepend will do this automatically).
  1703. X#
  1704. X
  1705. X###########################################################################
  1706. X# platform-specific configuration parameters - edit sun.cf to change
  1707. X
  1708. XSYSLIBS=-lXt -lX11
  1709. XMWM_DEFINES=-DSHAPE -DOPAQUE
  1710. XSYSLIBS=$(MTOOLKITSRC)/libXt.a $(XLIBSRC)/libX11.a
  1711. X
  1712. X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  1713. X# operating system:  SunOS 4.1
  1714. X
  1715. X###########################################################################
  1716. X# site-specific configuration parameters - edit site.def to change
  1717. X
  1718. X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  1719. X
  1720. X            SHELL = /bin/sh
  1721. X
  1722. X              TOP = .
  1723. X      CURRENT_DIR = .
  1724. X
  1725. X               AR = ar cq
  1726. X  BOOTSTRAPCFLAGS =
  1727. X               CC = cc
  1728. X
  1729. X         COMPRESS = compress
  1730. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  1731. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  1732. X          INSTALL = install
  1733. X               LD = ld
  1734. X             LINT = lint
  1735. X      LINTLIBFLAG = -C
  1736. X         LINTOPTS = -axz
  1737. X               LN = ln -s
  1738. X             MAKE = make
  1739. X               MV = mv
  1740. X               CP = cp
  1741. X           RANLIB = ranlib
  1742. X  RANLIBINSTFLAGS =
  1743. X               RM = rm -f
  1744. X     STD_INCLUDES =
  1745. X  STD_CPP_DEFINES =
  1746. X      STD_DEFINES =
  1747. X EXTRA_LOAD_FLAGS =
  1748. X  EXTRA_LIBRARIES =
  1749. X             TAGS = ctags
  1750. X
  1751. X    SHAREDCODEDEF = -DSHAREDCODE
  1752. X         SHLIBDEF = -DSUNSHLIB
  1753. X
  1754. X    PROTO_DEFINES =
  1755. X
  1756. X     INSTPGMFLAGS =
  1757. X
  1758. X     INSTBINFLAGS = -m 0755
  1759. X     INSTUIDFLAGS = -m 4755
  1760. X     INSTLIBFLAGS = -m 0664
  1761. X     INSTINCFLAGS = -m 0444
  1762. X     INSTMANFLAGS = -m 0444
  1763. X     INSTDATFLAGS = -m 0444
  1764. X    INSTKMEMFLAGS = -m 4755
  1765. X
  1766. X          DESTDIR =
  1767. X
  1768. X     TOP_INCLUDES = -I$(INCROOT)
  1769. X
  1770. X      CDEBUGFLAGS = -O
  1771. X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD
  1772. X      COMPATFLAGS =
  1773. X
  1774. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  1775. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  1776. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  1777. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  1778. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1779. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  1780. X   LDCOMBINEFLAGS = -X -r
  1781. X
  1782. X        MACROFILE = sun.cf
  1783. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  1784. X
  1785. X    IMAKE_DEFINES =
  1786. X
  1787. X         IRULESRC = $(CONFIGDIR)
  1788. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  1789. X
  1790. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  1791. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  1792. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  1793. X
  1794. X###########################################################################
  1795. X# X Window System Build Parameters
  1796. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1797. X
  1798. X###########################################################################
  1799. X# X Window System make variables; this need to be coordinated with rules
  1800. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1801. X
  1802. X          PATHSEP = /
  1803. X        USRLIBDIR = $(DESTDIR)/usr/lib
  1804. X           BINDIR = $(DESTDIR)/usr/bin/X11
  1805. X          INCROOT = $(DESTDIR)/usr/include
  1806. X     BUILDINCROOT = $(TOP)
  1807. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  1808. X      BUILDINCTOP = ..
  1809. X           INCDIR = $(INCROOT)/X11
  1810. X           ADMDIR = $(DESTDIR)/usr/adm
  1811. X           LIBDIR = $(USRLIBDIR)/X11
  1812. X        CONFIGDIR = $(LIBDIR)/config
  1813. X       LINTLIBDIR = $(USRLIBDIR)/lint
  1814. X
  1815. X          FONTDIR = $(LIBDIR)/fonts
  1816. X         XINITDIR = $(LIBDIR)/xinit
  1817. X           XDMDIR = $(LIBDIR)/xdm
  1818. X           AWMDIR = $(LIBDIR)/awm
  1819. X           TWMDIR = $(LIBDIR)/twm
  1820. X           GWMDIR = $(LIBDIR)/gwm
  1821. X          MANPATH = $(DESTDIR)/usr/man
  1822. X    MANSOURCEPATH = $(MANPATH)/man
  1823. X           MANDIR = $(MANSOURCEPATH)n
  1824. X        LIBMANDIR = $(MANSOURCEPATH)3
  1825. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  1826. X
  1827. X        SOXLIBREV = 4.2
  1828. X          SOXTREV = 4.0
  1829. X         SOXAWREV = 4.0
  1830. X        SOOLDXREV = 4.0
  1831. X         SOXMUREV = 4.0
  1832. X        SOXEXTREV = 4.0
  1833. X
  1834. X       FONTCFLAGS = -t
  1835. X
  1836. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  1837. X
  1838. X            IMAKE = imake
  1839. X           DEPEND = makedepend
  1840. X              RGB = rgb
  1841. X            FONTC = bdftosnf
  1842. X        MKFONTDIR = mkfontdir
  1843. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  1844. X
  1845. X        CONFIGSRC = $(TOP)/config
  1846. X        CLIENTSRC = $(TOP)/clients
  1847. X          DEMOSRC = $(TOP)/demos
  1848. X           LIBSRC = $(TOP)/lib
  1849. X          FONTSRC = $(TOP)/fonts
  1850. X       INCLUDESRC = $(TOP)/X11
  1851. X        SERVERSRC = $(TOP)/server
  1852. X          UTILSRC = $(TOP)/util
  1853. X        SCRIPTSRC = $(UTILSRC)/scripts
  1854. X       EXAMPLESRC = $(TOP)/examples
  1855. X       CONTRIBSRC = $(TOP)/../contrib
  1856. X           DOCSRC = $(TOP)/doc
  1857. X           RGBSRC = $(TOP)/rgb
  1858. X        DEPENDSRC = $(UTILSRC)/makedepend
  1859. X         IMAKESRC = $(CONFIGSRC)
  1860. X         XAUTHSRC = $(LIBSRC)/Xau
  1861. X          XLIBSRC = $(LIBSRC)/X
  1862. X           XMUSRC = $(LIBSRC)/Xmu
  1863. X       TOOLKITSRC = $(LIBSRC)/Xt
  1864. X       AWIDGETSRC = $(LIBSRC)/Xaw
  1865. X       OLDXLIBSRC = $(LIBSRC)/oldX
  1866. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  1867. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  1868. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  1869. X     EXTENSIONSRC = $(TOP)/extensions
  1870. X
  1871. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  1872. X     EXTENSIONLIB =  -lXext
  1873. X
  1874. X          DEPXLIB = $(DEPEXTENSIONLIB)
  1875. X             XLIB = $(EXTENSIONLIB) -lX11
  1876. X
  1877. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  1878. X         XAUTHLIB =  -lXau
  1879. X
  1880. X        DEPXMULIB =
  1881. X           XMULIB = -lXmu
  1882. X
  1883. X       DEPOLDXLIB =
  1884. X          OLDXLIB = -loldX
  1885. X
  1886. X      DEPXTOOLLIB =
  1887. X         XTOOLLIB = -lXt
  1888. X
  1889. X        DEPXAWLIB =
  1890. X           XAWLIB = -lXaw
  1891. X
  1892. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  1893. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  1894. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  1895. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  1896. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  1897. X
  1898. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  1899. X
  1900. X         DEPLIBS1 = $(DEPLIBS)
  1901. X         DEPLIBS2 = $(DEPLIBS)
  1902. X         DEPLIBS3 = $(DEPLIBS)
  1903. X
  1904. X      USRINCDIR = $(DESTDIR)/usr/include
  1905. X        TESTSRC = $(TOP)/tests
  1906. X     TESTSRCLIB = $(TESTSRC)/lib
  1907. X     TESTSRCBIN = $(TESTSRC)/bin
  1908. X       COMMONPP = $(TESTSRCBIN)/Commonpp
  1909. X
  1910. X     TESTCOMSRC = $(TESTSRCLIB)/Common
  1911. X    MTOOLKITSRC = $(LIBSRC)/Xt
  1912. X     MWIDGETSRC = $(LIBSRC)/Xm
  1913. X   MRESOURCESRC = $(LIBSRC)/Mrm
  1914. X         UILSRC = $(CLIENTSRC)/uil
  1915. X            UIL = $(UILSRC)/uil
  1916. X      XMTOOLLIB = $(MTOOLKITSRC)/libXt.a
  1917. X          XMLIB = $(MWIDGETSRC)/libXm.a
  1918. X   MRESOURCELIB = $(MRESOURCESRC)/libMrm.a
  1919. X         UILLIB = $(UILSRC)/libUil.a
  1920. X     TESTCOMLIB = $(TESTCOMSRC)/libCommon.a
  1921. X
  1922. X  LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
  1923. XLINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
  1924. X     LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
  1925. X     LINTUILLIB = $(UILSRC)/llib-lUil.ln
  1926. X
  1927. X        DEPLIBS =
  1928. X
  1929. X        DEPLIBS1 = $(DEPLIBS)
  1930. X        DEPLIBS2 = $(DEPLIBS)
  1931. X        DEPLIBS3 = $(DEPLIBS)
  1932. X
  1933. X###########################################################################
  1934. X# Imake rules for building libraries, programs, scripts, and data files
  1935. X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  1936. X
  1937. X###########################################################################
  1938. X# start of Imakefile
  1939. X
  1940. X# MOTIF  -> Have Motif Widgets
  1941. X# ATHENA -> Have Athena Widgets
  1942. X
  1943. X#define ATHENA
  1944. X
  1945. X           DELAY = -DDELAY=100       # DELAY ranges from -18 to whatever
  1946. X#    GRAVITY = -DGRAVITY=8       # Default gravity
  1947. X# ELASTICITY = -DELASTICY=90     # Default elasticity
  1948. X          USLEEP = -DHAVE_USLEEP      # Uncomment if usleep installed...
  1949. X       MYDEFINES = $(DELAY) $(USLEEP)
  1950. X     CDEBUGFLAGS = -g
  1951. X
  1952. XM_SRCS = act_area.c
  1953. XM_OBJS = act_area.o
  1954. XM_INCS = act_area.h
  1955. X
  1956. XA_SRCS = filemenu.c
  1957. XA_OBJS = filemenu.o
  1958. XA_INCS =
  1959. X
  1960. X         DEFINES = -DMOTIF $(MYDEFINES)
  1961. X#   MYLDLIBS = -lPW    # Uncomment if you get regcmp and regex undefined
  1962. X          LDLIBS = -lXm -lXmu -lXt -lX11 $(MYLDLIBS)
  1963. X
  1964. XTOOL_SRCS = $(M_SRCS)
  1965. XTOOL_OBJS = $(M_OBJS)
  1966. XTOOL_INCS = $(M_INCS)
  1967. X
  1968. X LINTOPTS = -abhuvz -D_NO_PROTO $(DEFINES)
  1969. X
  1970. XCOMM_SRCS = \
  1971. X    color_l.c \
  1972. X    demo.c \
  1973. X    file_sel.c \
  1974. X    help.c \
  1975. X    item.c \
  1976. X    items.c \
  1977. X    list.c \
  1978. X    menu.c \
  1979. X    misc.c \
  1980. X    miscx.c \
  1981. X    room.c \
  1982. X    scrollbar.c \
  1983. X    sim.c \
  1984. X    table.c \
  1985. X    xball.c \
  1986. X    xball_sys.c
  1987. X
  1988. XCOMM_OBJS = \
  1989. X    color_l.o \
  1990. X    demo.o \
  1991. X    file_sel.o \
  1992. X    help.o \
  1993. X    item.o \
  1994. X    items.o \
  1995. X    list.o \
  1996. X    menu.o \
  1997. X    misc.o \
  1998. X    miscx.o \
  1999. X    room.o \
  2000. X    scrollbar.o \
  2001. X    sim.o \
  2002. X    table.o \
  2003. X    xball.o \
  2004. X    xball_sys.o
  2005. X
  2006. XCOMM_INCS = \
  2007. X    color_l.h \
  2008. X    demo.h \
  2009. X    fallback.h \
  2010. X    file_sel.h \
  2011. X    help.h \
  2012. X    intf.h \
  2013. X    item.h \
  2014. X    items.h \
  2015. X    list.h \
  2016. X    menu.h \
  2017. X    misc.h \
  2018. X    miscx.h \
  2019. X    names.h \
  2020. X        patchlevel.h \
  2021. X    room.h \
  2022. X    scrollbar.h \
  2023. X    sim.h \
  2024. X    table.h \
  2025. X    xball_sys.h
  2026. X
  2027. XSRCS = $(COMM_SRCS) $(TOOL_SRCS)
  2028. XOBJS = $(COMM_OBJS) $(TOOL_OBJS)
  2029. XINCS = $(COMM_INCS) $(TOOL_INCS)
  2030. X
  2031. X PROGRAM = xball
  2032. X
  2033. Xall:: xball
  2034. X
  2035. Xxball: $(OBJS) $(DEPLIBS)
  2036. X    $(RM) $@
  2037. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  2038. X
  2039. Xsaber_xball:
  2040. X    #load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  2041. X
  2042. Xosaber_xball:
  2043. X    #load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  2044. X
  2045. Xinstall:: xball
  2046. X    $(INSTALL) -c $(INSTPGMFLAGS)   xball $(BINDIR)
  2047. X
  2048. Xinstall.man:: xball.man
  2049. X    $(INSTALL) -c $(INSTMANFLAGS) xball.man $(MANDIR)/xball.n
  2050. X
  2051. Xdepend::
  2052. X    $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  2053. X
  2054. Xlint:
  2055. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  2056. Xlint1:
  2057. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  2058. X
  2059. Xclean::
  2060. X    $(RM) $(PROGRAM)
  2061. X
  2062. XCLASS            = XBall
  2063. XAPP_DEFAULTS_SRC = $(CLASS).ad
  2064. X
  2065. Xinstall::  $(CLASS).ad
  2066. X    $(INSTALL) -c $(INSTAPPFLAGS)  $(CLASS).ad $(XAPPLOADDIR)/ $(CLASS)
  2067. X
  2068. Xfallback.h: $(APP_DEFAULTS_SRC)
  2069. X    gen_fallback $(APP_DEFAULTS_SRC) > $@
  2070. X
  2071. XDEMOS = demo1 demo2 demo3 demo4 demo5 demo6 demo7 demo8 demo9 demo10 \
  2072. X        demo11 demo12 demo13 demo14
  2073. X
  2074. XBITMAPS = \
  2075. X    good_bitmaps \
  2076. X    on.xbm \
  2077. X    off.xbm \
  2078. X    man.xbm \
  2079. X    stipple.xbm \
  2080. X    xball.xbm \
  2081. X    xball-a.xbm \
  2082. X    xball-b.xbm \
  2083. X    xball-l.xbm \
  2084. X    xball-x.xbm \
  2085. X    sgi.xbm
  2086. X
  2087. XMISC = \
  2088. X    gen_fallback \
  2089. X    run_demos \
  2090. X        xball.man \
  2091. X    README
  2092. X
  2093. XDRAWING_A_DIRS = \
  2094. X    X11 \
  2095. X    X11/Xaw_d
  2096. X
  2097. XDRAWING_A = \
  2098. X    X11/Xaw_d/DrawingA.c \
  2099. X    X11/Xaw_d/DrawingA.h \
  2100. X    X11/Xaw_d/DrawingAP.h \
  2101. X    X11/Xaw_d/DrawingA.doc \
  2102. X    X11/Xaw_d/Imakefile \
  2103. X    X11/Xaw_d/Makefile.std \
  2104. X    X11/Xaw_d/Makefile \
  2105. X        X11/Xaw_d/demo.c \
  2106. X    X11/Xaw_d/README \
  2107. X    Imakefile \
  2108. X    Makefile.std \
  2109. X    Makefile \
  2110. X    Make.motif \
  2111. X    Make.athena
  2112. X
  2113. XDIST = \
  2114. X    $(DRAWING_A) \
  2115. X    $(COMM_SRCS) \
  2116. X    $(COMM_INCS) \
  2117. X    $(M_SRCS) \
  2118. X    $(M_INCS) \
  2119. X    $(A_SRCS) \
  2120. X    $(A_INCS) \
  2121. X    $(APP_DEFAULTS_SRC) \
  2122. X    $(MISC) \
  2123. X    $(BITMAPS) \
  2124. X    $(DEMOS)
  2125. X
  2126. Xshar:
  2127. X    makekit -s75k -p $(DRAWING_A_DIRS) $(DIST)
  2128. X
  2129. Xtar:
  2130. X    tar cvf - $(DIST) | compress -v > xball.tar.Z
  2131. X
  2132. X###########################################################################
  2133. X# common rules for all Makefiles - do not edit
  2134. X
  2135. Xemptyrule::
  2136. X
  2137. Xclean::
  2138. X    $(RM_CMD) \#*
  2139. X
  2140. XMakefile::
  2141. X    -@if [ -f Makefile ]; then \
  2142. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  2143. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  2144. X    else exit 0; fi
  2145. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  2146. X
  2147. Xtags::
  2148. X    $(TAGS) -w *.[ch]
  2149. X    $(TAGS) -xw *.[ch] > TAGS
  2150. X
  2151. Xsaber:
  2152. X    #load $(ALLDEFINES) $(SRCS)
  2153. X
  2154. Xosaber:
  2155. X    #load $(ALLDEFINES) $(OBJS)
  2156. X
  2157. X###########################################################################
  2158. X# empty rules for directories that do not have SUBDIRS - do not edit
  2159. X
  2160. Xinstall::
  2161. X    @echo "install in $(CURRENT_DIR) done"
  2162. X
  2163. Xinstall.man::
  2164. X    @echo "install.man in $(CURRENT_DIR) done"
  2165. X
  2166. XMakefiles::
  2167. X
  2168. Xincludes::
  2169. X
  2170. X###########################################################################
  2171. X# dependencies generated by makedepend
  2172. X
  2173. END_OF_FILE
  2174. if test 12467 -ne `wc -c <'Makefile.std'`; then
  2175.     echo shar: \"'Makefile.std'\" unpacked with wrong size!
  2176. fi
  2177. # end of 'Makefile.std'
  2178. fi
  2179. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  2180.   echo shar: Will not clobber existing file \"'Makefile'\"
  2181. else
  2182. echo shar: Extracting \"'Makefile'\" \(12467 characters\)
  2183. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  2184. X# Makefile generated by imake - do not edit!
  2185. X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  2186. X#
  2187. X# The cpp used on this machine replaces all newlines and multiple tabs and
  2188. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  2189. X# for this, but is not always successful.
  2190. X#
  2191. X
  2192. X###########################################################################
  2193. X# Makefile generated from "Imake.tmpl" and <Imakefile>
  2194. X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  2195. X#
  2196. X# Platform-specific parameters may be set in the appropriate .cf
  2197. X# configuration files.  Site-wide parameters may be set in the file
  2198. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  2199. X#
  2200. X# If your C preprocessor doesn't define any unique symbols, you'll need
  2201. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  2202. X# "make Makefile", "make Makefiles", or "make World").
  2203. X#
  2204. X# If you absolutely can't get imake to work, you'll need to set the
  2205. X# variables at the top of each Makefile as well as the dependencies at the
  2206. X# bottom (makedepend will do this automatically).
  2207. X#
  2208. X
  2209. X###########################################################################
  2210. X# platform-specific configuration parameters - edit sun.cf to change
  2211. X
  2212. XSYSLIBS=-lXt -lX11
  2213. XMWM_DEFINES=-DSHAPE -DOPAQUE
  2214. XSYSLIBS=$(MTOOLKITSRC)/libXt.a $(XLIBSRC)/libX11.a
  2215. X
  2216. X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  2217. X# operating system:  SunOS 4.1
  2218. X
  2219. X###########################################################################
  2220. X# site-specific configuration parameters - edit site.def to change
  2221. X
  2222. X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  2223. X
  2224. X            SHELL = /bin/sh
  2225. X
  2226. X              TOP = .
  2227. X      CURRENT_DIR = .
  2228. X
  2229. X               AR = ar cq
  2230. X  BOOTSTRAPCFLAGS =
  2231. X               CC = cc
  2232. X
  2233. X         COMPRESS = compress
  2234. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  2235. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  2236. X          INSTALL = install
  2237. X               LD = ld
  2238. X             LINT = lint
  2239. X      LINTLIBFLAG = -C
  2240. X         LINTOPTS = -axz
  2241. X               LN = ln -s
  2242. X             MAKE = make
  2243. X               MV = mv
  2244. X               CP = cp
  2245. X           RANLIB = ranlib
  2246. X  RANLIBINSTFLAGS =
  2247. X               RM = rm -f
  2248. X     STD_INCLUDES =
  2249. X  STD_CPP_DEFINES =
  2250. X      STD_DEFINES =
  2251. X EXTRA_LOAD_FLAGS =
  2252. X  EXTRA_LIBRARIES =
  2253. X             TAGS = ctags
  2254. X
  2255. X    SHAREDCODEDEF = -DSHAREDCODE
  2256. X         SHLIBDEF = -DSUNSHLIB
  2257. X
  2258. X    PROTO_DEFINES =
  2259. X
  2260. X     INSTPGMFLAGS =
  2261. X
  2262. X     INSTBINFLAGS = -m 0755
  2263. X     INSTUIDFLAGS = -m 4755
  2264. X     INSTLIBFLAGS = -m 0664
  2265. X     INSTINCFLAGS = -m 0444
  2266. X     INSTMANFLAGS = -m 0444
  2267. X     INSTDATFLAGS = -m 0444
  2268. X    INSTKMEMFLAGS = -m 4755
  2269. X
  2270. X          DESTDIR =
  2271. X
  2272. X     TOP_INCLUDES = -I$(INCROOT)
  2273. X
  2274. X      CDEBUGFLAGS = -O
  2275. X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD
  2276. X      COMPATFLAGS =
  2277. X
  2278. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  2279. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  2280. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  2281. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  2282. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  2283. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  2284. X   LDCOMBINEFLAGS = -X -r
  2285. X
  2286. X        MACROFILE = sun.cf
  2287. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  2288. X
  2289. X    IMAKE_DEFINES =
  2290. X
  2291. X         IRULESRC = $(CONFIGDIR)
  2292. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  2293. X
  2294. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  2295. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  2296. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  2297. X
  2298. X###########################################################################
  2299. X# X Window System Build Parameters
  2300. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  2301. X
  2302. X###########################################################################
  2303. X# X Window System make variables; this need to be coordinated with rules
  2304. X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  2305. X
  2306. X          PATHSEP = /
  2307. X        USRLIBDIR = $(DESTDIR)/usr/lib
  2308. X           BINDIR = $(DESTDIR)/usr/bin/X11
  2309. X          INCROOT = $(DESTDIR)/usr/include
  2310. X     BUILDINCROOT = $(TOP)
  2311. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  2312. X      BUILDINCTOP = ..
  2313. X           INCDIR = $(INCROOT)/X11
  2314. X           ADMDIR = $(DESTDIR)/usr/adm
  2315. X           LIBDIR = $(USRLIBDIR)/X11
  2316. X        CONFIGDIR = $(LIBDIR)/config
  2317. X       LINTLIBDIR = $(USRLIBDIR)/lint
  2318. X
  2319. X          FONTDIR = $(LIBDIR)/fonts
  2320. X         XINITDIR = $(LIBDIR)/xinit
  2321. X           XDMDIR = $(LIBDIR)/xdm
  2322. X           AWMDIR = $(LIBDIR)/awm
  2323. X           TWMDIR = $(LIBDIR)/twm
  2324. X           GWMDIR = $(LIBDIR)/gwm
  2325. X          MANPATH = $(DESTDIR)/usr/man
  2326. X    MANSOURCEPATH = $(MANPATH)/man
  2327. X           MANDIR = $(MANSOURCEPATH)n
  2328. X        LIBMANDIR = $(MANSOURCEPATH)3
  2329. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  2330. X
  2331. X        SOXLIBREV = 4.2
  2332. X          SOXTREV = 4.0
  2333. X         SOXAWREV = 4.0
  2334. X        SOOLDXREV = 4.0
  2335. X         SOXMUREV = 4.0
  2336. X        SOXEXTREV = 4.0
  2337. X
  2338. X       FONTCFLAGS = -t
  2339. X
  2340. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  2341. X
  2342. X            IMAKE = imake
  2343. X           DEPEND = makedepend
  2344. X              RGB = rgb
  2345. X            FONTC = bdftosnf
  2346. X        MKFONTDIR = mkfontdir
  2347. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  2348. X
  2349. X        CONFIGSRC = $(TOP)/config
  2350. X        CLIENTSRC = $(TOP)/clients
  2351. X          DEMOSRC = $(TOP)/demos
  2352. X           LIBSRC = $(TOP)/lib
  2353. X          FONTSRC = $(TOP)/fonts
  2354. X       INCLUDESRC = $(TOP)/X11
  2355. X        SERVERSRC = $(TOP)/server
  2356. X          UTILSRC = $(TOP)/util
  2357. X        SCRIPTSRC = $(UTILSRC)/scripts
  2358. X       EXAMPLESRC = $(TOP)/examples
  2359. X       CONTRIBSRC = $(TOP)/../contrib
  2360. X           DOCSRC = $(TOP)/doc
  2361. X           RGBSRC = $(TOP)/rgb
  2362. X        DEPENDSRC = $(UTILSRC)/makedepend
  2363. X         IMAKESRC = $(CONFIGSRC)
  2364. X         XAUTHSRC = $(LIBSRC)/Xau
  2365. X          XLIBSRC = $(LIBSRC)/X
  2366. X           XMUSRC = $(LIBSRC)/Xmu
  2367. X       TOOLKITSRC = $(LIBSRC)/Xt
  2368. X       AWIDGETSRC = $(LIBSRC)/Xaw
  2369. X       OLDXLIBSRC = $(LIBSRC)/oldX
  2370. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  2371. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  2372. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  2373. X     EXTENSIONSRC = $(TOP)/extensions
  2374. X
  2375. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  2376. X     EXTENSIONLIB =  -lXext
  2377. X
  2378. X          DEPXLIB = $(DEPEXTENSIONLIB)
  2379. X             XLIB = $(EXTENSIONLIB) -lX11
  2380. X
  2381. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  2382. X         XAUTHLIB =  -lXau
  2383. X
  2384. X        DEPXMULIB =
  2385. X           XMULIB = -lXmu
  2386. X
  2387. X       DEPOLDXLIB =
  2388. X          OLDXLIB = -loldX
  2389. X
  2390. X      DEPXTOOLLIB =
  2391. X         XTOOLLIB = -lXt
  2392. X
  2393. X        DEPXAWLIB =
  2394. X           XAWLIB = -lXaw
  2395. X
  2396. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  2397. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  2398. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  2399. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  2400. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  2401. X
  2402. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  2403. X
  2404. X         DEPLIBS1 = $(DEPLIBS)
  2405. X         DEPLIBS2 = $(DEPLIBS)
  2406. X         DEPLIBS3 = $(DEPLIBS)
  2407. X
  2408. X      USRINCDIR = $(DESTDIR)/usr/include
  2409. X        TESTSRC = $(TOP)/tests
  2410. X     TESTSRCLIB = $(TESTSRC)/lib
  2411. X     TESTSRCBIN = $(TESTSRC)/bin
  2412. X       COMMONPP = $(TESTSRCBIN)/Commonpp
  2413. X
  2414. X     TESTCOMSRC = $(TESTSRCLIB)/Common
  2415. X    MTOOLKITSRC = $(LIBSRC)/Xt
  2416. X     MWIDGETSRC = $(LIBSRC)/Xm
  2417. X   MRESOURCESRC = $(LIBSRC)/Mrm
  2418. X         UILSRC = $(CLIENTSRC)/uil
  2419. X            UIL = $(UILSRC)/uil
  2420. X      XMTOOLLIB = $(MTOOLKITSRC)/libXt.a
  2421. X          XMLIB = $(MWIDGETSRC)/libXm.a
  2422. X   MRESOURCELIB = $(MRESOURCESRC)/libMrm.a
  2423. X         UILLIB = $(UILSRC)/libUil.a
  2424. X     TESTCOMLIB = $(TESTCOMSRC)/libCommon.a
  2425. X
  2426. X  LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
  2427. XLINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
  2428. X     LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
  2429. X     LINTUILLIB = $(UILSRC)/llib-lUil.ln
  2430. X
  2431. X        DEPLIBS =
  2432. X
  2433. X        DEPLIBS1 = $(DEPLIBS)
  2434. X        DEPLIBS2 = $(DEPLIBS)
  2435. X        DEPLIBS3 = $(DEPLIBS)
  2436. X
  2437. X###########################################################################
  2438. X# Imake rules for building libraries, programs, scripts, and data files
  2439. X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  2440. X
  2441. X###########################################################################
  2442. X# start of Imakefile
  2443. X
  2444. X# MOTIF  -> Have Motif Widgets
  2445. X# ATHENA -> Have Athena Widgets
  2446. X
  2447. X#define ATHENA
  2448. X
  2449. X           DELAY = -DDELAY=100       # DELAY ranges from -18 to whatever
  2450. X#    GRAVITY = -DGRAVITY=8       # Default gravity
  2451. X# ELASTICITY = -DELASTICY=90     # Default elasticity
  2452. X          USLEEP = -DHAVE_USLEEP      # Uncomment if usleep installed...
  2453. X       MYDEFINES = $(DELAY) $(USLEEP)
  2454. X     CDEBUGFLAGS = -g
  2455. X
  2456. XM_SRCS = act_area.c
  2457. XM_OBJS = act_area.o
  2458. XM_INCS = act_area.h
  2459. X
  2460. XA_SRCS = filemenu.c
  2461. XA_OBJS = filemenu.o
  2462. XA_INCS =
  2463. X
  2464. X         DEFINES = -DMOTIF $(MYDEFINES)
  2465. X#   MYLDLIBS = -lPW    # Uncomment if you get regcmp and regex undefined
  2466. X          LDLIBS = -lXm -lXmu -lXt -lX11 $(MYLDLIBS)
  2467. X
  2468. XTOOL_SRCS = $(M_SRCS)
  2469. XTOOL_OBJS = $(M_OBJS)
  2470. XTOOL_INCS = $(M_INCS)
  2471. X
  2472. X LINTOPTS = -abhuvz -D_NO_PROTO $(DEFINES)
  2473. X
  2474. XCOMM_SRCS = \
  2475. X    color_l.c \
  2476. X    demo.c \
  2477. X    file_sel.c \
  2478. X    help.c \
  2479. X    item.c \
  2480. X    items.c \
  2481. X    list.c \
  2482. X    menu.c \
  2483. X    misc.c \
  2484. X    miscx.c \
  2485. X    room.c \
  2486. X    scrollbar.c \
  2487. X    sim.c \
  2488. X    table.c \
  2489. X    xball.c \
  2490. X    xball_sys.c
  2491. X
  2492. XCOMM_OBJS = \
  2493. X    color_l.o \
  2494. X    demo.o \
  2495. X    file_sel.o \
  2496. X    help.o \
  2497. X    item.o \
  2498. X    items.o \
  2499. X    list.o \
  2500. X    menu.o \
  2501. X    misc.o \
  2502. X    miscx.o \
  2503. X    room.o \
  2504. X    scrollbar.o \
  2505. X    sim.o \
  2506. X    table.o \
  2507. X    xball.o \
  2508. X    xball_sys.o
  2509. X
  2510. XCOMM_INCS = \
  2511. X    color_l.h \
  2512. X    demo.h \
  2513. X    fallback.h \
  2514. X    file_sel.h \
  2515. X    help.h \
  2516. X    intf.h \
  2517. X    item.h \
  2518. X    items.h \
  2519. X    list.h \
  2520. X    menu.h \
  2521. X    misc.h \
  2522. X    miscx.h \
  2523. X    names.h \
  2524. X        patchlevel.h \
  2525. X    room.h \
  2526. X    scrollbar.h \
  2527. X    sim.h \
  2528. X    table.h \
  2529. X    xball_sys.h
  2530. X
  2531. XSRCS = $(COMM_SRCS) $(TOOL_SRCS)
  2532. XOBJS = $(COMM_OBJS) $(TOOL_OBJS)
  2533. XINCS = $(COMM_INCS) $(TOOL_INCS)
  2534. X
  2535. X PROGRAM = xball
  2536. X
  2537. Xall:: xball
  2538. X
  2539. Xxball: $(OBJS) $(DEPLIBS)
  2540. X    $(RM) $@
  2541. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  2542. X
  2543. Xsaber_xball:
  2544. X    #load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  2545. X
  2546. Xosaber_xball:
  2547. X    #load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  2548. X
  2549. Xinstall:: xball
  2550. X    $(INSTALL) -c $(INSTPGMFLAGS)   xball $(BINDIR)
  2551. X
  2552. Xinstall.man:: xball.man
  2553. X    $(INSTALL) -c $(INSTMANFLAGS) xball.man $(MANDIR)/xball.n
  2554. X
  2555. Xdepend::
  2556. X    $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  2557. X
  2558. Xlint:
  2559. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  2560. Xlint1:
  2561. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  2562. X
  2563. Xclean::
  2564. X    $(RM) $(PROGRAM)
  2565. X
  2566. XCLASS            = XBall
  2567. XAPP_DEFAULTS_SRC = $(CLASS).ad
  2568. X
  2569. Xinstall::  $(CLASS).ad
  2570. X    $(INSTALL) -c $(INSTAPPFLAGS)  $(CLASS).ad $(XAPPLOADDIR)/ $(CLASS)
  2571. X
  2572. Xfallback.h: $(APP_DEFAULTS_SRC)
  2573. X    gen_fallback $(APP_DEFAULTS_SRC) > $@
  2574. X
  2575. XDEMOS = demo1 demo2 demo3 demo4 demo5 demo6 demo7 demo8 demo9 demo10 \
  2576. X        demo11 demo12 demo13 demo14
  2577. X
  2578. XBITMAPS = \
  2579. X    good_bitmaps \
  2580. X    on.xbm \
  2581. X    off.xbm \
  2582. X    man.xbm \
  2583. X    stipple.xbm \
  2584. X    xball.xbm \
  2585. X    xball-a.xbm \
  2586. X    xball-b.xbm \
  2587. X    xball-l.xbm \
  2588. X    xball-x.xbm \
  2589. X    sgi.xbm
  2590. X
  2591. XMISC = \
  2592. X    gen_fallback \
  2593. X    run_demos \
  2594. X        xball.man \
  2595. X    README
  2596. X
  2597. XDRAWING_A_DIRS = \
  2598. X    X11 \
  2599. X    X11/Xaw_d
  2600. X
  2601. XDRAWING_A = \
  2602. X    X11/Xaw_d/DrawingA.c \
  2603. X    X11/Xaw_d/DrawingA.h \
  2604. X    X11/Xaw_d/DrawingAP.h \
  2605. X    X11/Xaw_d/DrawingA.doc \
  2606. X    X11/Xaw_d/Imakefile \
  2607. X    X11/Xaw_d/Makefile.std \
  2608. X    X11/Xaw_d/Makefile \
  2609. X        X11/Xaw_d/demo.c \
  2610. X    X11/Xaw_d/README \
  2611. X    Imakefile \
  2612. X    Makefile.std \
  2613. X    Makefile \
  2614. X    Make.motif \
  2615. X    Make.athena
  2616. X
  2617. XDIST = \
  2618. X    $(DRAWING_A) \
  2619. X    $(COMM_SRCS) \
  2620. X    $(COMM_INCS) \
  2621. X    $(M_SRCS) \
  2622. X    $(M_INCS) \
  2623. X    $(A_SRCS) \
  2624. X    $(A_INCS) \
  2625. X    $(APP_DEFAULTS_SRC) \
  2626. X    $(MISC) \
  2627. X    $(BITMAPS) \
  2628. X    $(DEMOS)
  2629. X
  2630. Xshar:
  2631. X    makekit -s75k -p $(DRAWING_A_DIRS) $(DIST)
  2632. X
  2633. Xtar:
  2634. X    tar cvf - $(DIST) | compress -v > xball.tar.Z
  2635. X
  2636. X###########################################################################
  2637. X# common rules for all Makefiles - do not edit
  2638. X
  2639. Xemptyrule::
  2640. X
  2641. Xclean::
  2642. X    $(RM_CMD) \#*
  2643. X
  2644. XMakefile::
  2645. X    -@if [ -f Makefile ]; then \
  2646. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  2647. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  2648. X    else exit 0; fi
  2649. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  2650. X
  2651. Xtags::
  2652. X    $(TAGS) -w *.[ch]
  2653. X    $(TAGS) -xw *.[ch] > TAGS
  2654. X
  2655. Xsaber:
  2656. X    #load $(ALLDEFINES) $(SRCS)
  2657. X
  2658. Xosaber:
  2659. X    #load $(ALLDEFINES) $(OBJS)
  2660. X
  2661. X###########################################################################
  2662. X# empty rules for directories that do not have SUBDIRS - do not edit
  2663. X
  2664. Xinstall::
  2665. X    @echo "install in $(CURRENT_DIR) done"
  2666. X
  2667. Xinstall.man::
  2668. X    @echo "install.man in $(CURRENT_DIR) done"
  2669. X
  2670. XMakefiles::
  2671. X
  2672. Xincludes::
  2673. X
  2674. X###########################################################################
  2675. X# dependencies generated by makedepend
  2676. X
  2677. END_OF_FILE
  2678. if test 12467 -ne `wc -c <'Makefile'`; then
  2679.     echo shar: \"'Makefile'\" unpacked with wrong size!
  2680. fi
  2681. # end of 'Makefile'
  2682. fi
  2683. if test -f 'items.c' -a "${1}" != "-c" ; then 
  2684.   echo shar: Will not clobber existing file \"'items.c'\"
  2685. else
  2686. echo shar: Extracting \"'items.c'\" \(5285 characters\)
  2687. sed "s/^X//" >'items.c' <<'END_OF_FILE'
  2688. X/**********************************************************************
  2689. X * items.c - definition of item list object.
  2690. X *
  2691. X * Copyright 1993, David Nedde
  2692. X *
  2693. X * Permission to use, copy, modify, and distribute this software
  2694. X * and its documentation for any purpose and without fee is granted
  2695. X * provided that the above copyright notice appears in all copies.
  2696. X * It is provided "as is" without express or implied warranty.
  2697. X **********************************************************************/
  2698. X
  2699. X/* System Headers */
  2700. X#include <string.h>
  2701. X
  2702. X/* Local headers */
  2703. X#include "items.h"
  2704. X#include "room.h"
  2705. X
  2706. X#if 0
  2707. X/* External variables */
  2708. Xextern item_static_type static_data;
  2709. X#endif
  2710. X
  2711. X
  2712. X/* Create the items object */
  2713. Xitems_type items__create()
  2714. X{
  2715. X    items_type items = (items_type)malloc( sizeof( items_struct_type));
  2716. X
  2717. X    items->list = list__create();
  2718. X
  2719. X    return items;
  2720. X}
  2721. X
  2722. X
  2723. X/* Destroy the items object */
  2724. Xitems_type items__destroy(items)
  2725. Xitems_type items;
  2726. X{
  2727. X    items__destroy_all( items);
  2728. X
  2729. X    list__destroy( items->list);
  2730. X    
  2731. X    free( items);
  2732. X}
  2733. X
  2734. X
  2735. X/* Return the first item in the list */
  2736. Xitem_type items__get_first( items)
  2737. Xitems_type items;
  2738. X{
  2739. X    return (item_type)list__get_first(items->list);
  2740. X}
  2741. X
  2742. X
  2743. X/* Return the next item in the list */
  2744. Xitem_type items__get_next( items)
  2745. Xitems_type items;
  2746. X{
  2747. X    return (item_type)list__get_next(items->list);
  2748. X}
  2749. X
  2750. X
  2751. X/* Add an item to the list of items */
  2752. Xvoid items__add( items, item)
  2753. Xitems_type      items;
  2754. Xitem_type       item;
  2755. X{
  2756. X    list__add_end( items->list, (void *)item);
  2757. X}
  2758. X
  2759. X
  2760. X/* Destroy all items in the item list */
  2761. Xvoid items__destroy_all( items)
  2762. Xitems_type items;
  2763. X{
  2764. X    item_type item;
  2765. X
  2766. X
  2767. X    for (item = (item_type)list__remove_last( items->list);
  2768. X         item != (item_type)0;
  2769. X         item = (item_type)list__remove_last( items->list))
  2770. X    {
  2771. X        item__destroy( item);
  2772. X    }
  2773. X}
  2774. X
  2775. X
  2776. X/* Create a new item and add it to the item list */
  2777. Xvoid items__new_item( items, x, y, x_vel, y_vel)
  2778. Xitems_type items;
  2779. Xint      x,y;
  2780. Xint      x_vel,y_vel;
  2781. X{
  2782. X    list__add_end( items->list, (void *)item__create(x, y, x_vel, y_vel));
  2783. X}
  2784. X
  2785. X
  2786. X/* Perform the iterative simulation movement for all items on the list */
  2787. X/* If an item dies, destroy it */
  2788. Xvoid items__move_items( items, room)
  2789. Xitems_type items;
  2790. Xroom_type room;
  2791. X{
  2792. X    item_type item;
  2793. X
  2794. X
  2795. X    /* Move each item on the screen */
  2796. X    for (items->current = 0;
  2797. X     items->current < list__get_count( items->list); 
  2798. X         items->current++)
  2799. X    {
  2800. X        item = (item_type)list__get_cell(items->list, items->current);
  2801. X
  2802. X        item__move( item, room, items);
  2803. X
  2804. X        if (item__stopped( item, room))
  2805. X        {
  2806. X            list__remove( items->list, items->current);
  2807. X            items->current--;
  2808. X            item__destroy( item);
  2809. X        }
  2810. X    }
  2811. X}
  2812. X
  2813. X
  2814. X
  2815. X/* Simulate moving the items backwards count iterations */
  2816. X/* The iterations are not shown in the screen */
  2817. X/* Note that gravity and elastivity are not handled */
  2818. Xvoid items__move_items_backwards( items, room, count)
  2819. Xitems_type items;
  2820. Xroom_type room;
  2821. Xint count;
  2822. X{
  2823. X    item_type item;
  2824. X
  2825. X
  2826. X    /* Reverse all items' velocities and erase them from the screen */
  2827. X    for (items->current = 0;
  2828. X         items->current < list__get_count( items->list); 
  2829. X         items->current++)
  2830. X    {
  2831. X        item = (item_type)list__get_cell(items->list, items->current);
  2832. X
  2833. X        item->x_vel = -item->x_vel;
  2834. X        item->y_vel = -item->y_vel;
  2835. X
  2836. X        item__erase( item);
  2837. X    }
  2838. X
  2839. X    /* Move them all count iterations (they will go backwards) */
  2840. X    while (count-- > 0)
  2841. X    {
  2842. X        /* Move each item on the screen */
  2843. X        for (items->current = 0;
  2844. X             items->current < list__get_count( items->list); 
  2845. X             items->current++)
  2846. X        {
  2847. X            item = (item_type)list__get_cell(items->list, items->current);
  2848. X
  2849. X            item__move( item, room, items);
  2850. X        }
  2851. X    }
  2852. X
  2853. X
  2854. X    /* Reverse all the items' velocities again and draw them */
  2855. X    for (items->current = 0;
  2856. X         items->current < list__get_count( items->list); 
  2857. X         items->current++)
  2858. X    {
  2859. X        item = (item_type)list__get_cell(items->list, items->current);
  2860. X
  2861. X        item->x_vel = -item->x_vel;
  2862. X        item->y_vel = -item->y_vel;
  2863. X
  2864. X        item__draw( item);
  2865. X    }
  2866. X
  2867. X}
  2868. X
  2869. X
  2870. X/* Make all items visible or invisible */
  2871. Xvoid items__set_visible( items, visible)
  2872. Xitems_type items;
  2873. XBool       visible;
  2874. X{
  2875. X    if (visible)
  2876. X        item__set_visible( True);
  2877. X
  2878. X    for (items->current = 0;
  2879. X         items->current < list__get_count( items->list); 
  2880. X         items->current++)
  2881. X    {
  2882. X        if (visible)
  2883. X            item__draw( (item_type)list__get_cell(items->list,items->current));
  2884. X        else
  2885. X            item__erase((item_type)list__get_cell(items->list,items->current));
  2886. X    }
  2887. X
  2888. X    if (!visible)
  2889. X        item__set_visible( False);
  2890. X}
  2891. X
  2892. X
  2893. X/* Rebound the given item again all items in the item list */
  2894. Xvoid items__rebound_items( item, items)
  2895. Xitem_type item;
  2896. Xitems_type items;
  2897. X{
  2898. X    int i;
  2899. X
  2900. X    for (i = items->current+1; i < list__get_count( items->list); i++)
  2901. X    {
  2902. X        item__rebound_item(item, 
  2903. X                           (item_type)list__get_cell(items->list, i));
  2904. X    }
  2905. X}
  2906. X
  2907. X
  2908. X#ifdef DEBUG
  2909. X
  2910. Xvoid items__print( items)
  2911. Xitems_type items;
  2912. X{
  2913. X    int i;
  2914. X
  2915. X
  2916. X    for (i = 0; i < list__get_count( items->list); i++)
  2917. X    {
  2918. X        printf("%4d: ", i);
  2919. X        item__print( (item_type)list__get_cell(items->list, i));
  2920. X    }
  2921. X}  
  2922. X
  2923. X#endif
  2924. END_OF_FILE
  2925. if test 5285 -ne `wc -c <'items.c'`; then
  2926.     echo shar: \"'items.c'\" unpacked with wrong size!
  2927. fi
  2928. # end of 'items.c'
  2929. fi
  2930. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  2931.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  2932. else
  2933. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  2934. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  2935. X#define PATCHLEVEL 0
  2936. END_OF_FILE
  2937. if test 21 -ne `wc -c <'patchlevel.h'`; then
  2938.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  2939. fi
  2940. # end of 'patchlevel.h'
  2941. fi
  2942. echo shar: End of archive 1 \(of 5\).
  2943. cp /dev/null ark1isdone
  2944. MISSING=""
  2945. for I in 1 2 3 4 5 ; do
  2946.     if test ! -f ark${I}isdone ; then
  2947.     MISSING="${MISSING} ${I}"
  2948.     fi
  2949. done
  2950. if test "${MISSING}" = "" ; then
  2951.     echo You have unpacked all 5 archives.
  2952.     rm -f ark[1-9]isdone
  2953. else
  2954.     echo You still need to unpack the following archives:
  2955.     echo "        " ${MISSING}
  2956. fi
  2957. ##  End of shell archive.
  2958. exit 0
  2959.  
  2960. exit 0 # Just in case...
  2961. -- 
  2962.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  2963. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  2964.  "It's intuitively obvious to the |
  2965.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  2966.