home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / winterp-1.13 / src-server / Makefile.sparc < prev    next >
Encoding:
Makefile  |  1991-10-06  |  14.4 KB  |  353 lines

  1. ################################################################################
  2. #
  3. # File:         Makefile.sparc
  4. # RCS:          $Header: Makefile.sparc,v 1.3 91/04/22 00:15:43 mayer Exp $
  5. # Description:  WINTERP Makefile for Sun Sparcstation, SunOS V4
  6. # Author:       Niels Mayer, HPLabs
  7. # Created:      Mon Oct 23 20:47:37 1989
  8. # Modified:     Sat Oct  5 22:30:46 1991 (Niels Mayer) mayer@hplnpm
  9. # Language:     N/A
  10. # Package:      N/A
  11. # Status:       X11r5 contrib tape release
  12. #
  13. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  14. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  15. #
  16. # Permission to use, copy, modify, distribute, and sell this software and its
  17. # documentation for any purpose is hereby granted without fee, provided that
  18. # the above copyright notice appear in all copies and that both that
  19. # copyright notice and this permission notice appear in supporting
  20. # documentation, and that the name of Hewlett-Packard and David Betz not be
  21. # used in advertising or publicity pertaining to distribution of the software
  22. # without specific, written prior permission.  Hewlett-Packard and David Betz
  23. # make no representations about the suitability of this software for any
  24. # purpose. It is provided "as is" without express or implied warranty.
  25. #
  26. # HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  27. # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  28. # IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  29. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  31. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  32. # PERFORMANCE OF THIS SOFTWARE.
  33. #
  34. # See ./winterp/COPYRIGHT for information on contacting the authors.
  35. #
  36. # Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  37. # Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  38. #
  39. ################################################################################
  40.  
  41. #
  42. # Note on INCLUDES for Motif 1.0:
  43. # ==============================
  44. # Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
  45. # make sure that you are compiling Motif 1.0 programs with the headers
  46. # associated with Motif 1.0, not the X11r4 headers.
  47. #
  48. # Standard locations for Motif includes are /usr/include/X11 and
  49. # /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
  50. # intrinsics headers which are installed in /usr/include/X11. Don't
  51. # confuse these    with the incompatible Xtoolkit intrinsics from X11r4.
  52. #
  53. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
  54. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  55. # (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  56. # TO THE APPROPRIATE LOCATION.
  57. #
  58. #
  59. # Note on INCLUDES for Motif 1.1:
  60. # ==============================
  61. # Motif 1.1 uses the X11r4 Xlib, libXt, etc, however, Motif 1.1 is not
  62. # included as part of the X11r4 distribution.  Make sure that you either
  63. # have the X11r4 and Motif headers installed, or that you are setting
  64. # INCLUDES so that the appropriate include directories are used.
  65. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
  66. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  67. # (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  68. # TO THE APPROPRIATE LOCATION.
  69. #            --------------------
  70. # NOTE: if you modify INCLUDES below, you must also do the same 
  71. # modification in xlisp/Makefile.sparc
  72. #
  73.  
  74. # INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11 -I/mnt0/src/X11r4/mit -I/mnt0/src/X11r4/mit/X11
  75. INCLUDES = -I. -I/usr/include
  76.  
  77.  
  78. #
  79. # Note on LIBS:
  80. #       "-lm" == libm.a:
  81. #        This is required by XLISP since it includes math routines.
  82. #
  83. #    "-lXm" == libXm.a:
  84. #        This library is part of OSF/Motif, it is not included with
  85. #        X11r4. Many systems vendors sell Motif as part of their OS,
  86. #        e.g. HP, IBM, DEC, MIPS, SCO, etc. If you haven't installed
  87. #        Motif on your system, then replace -lXm below with
  88. #        <path>/libXm.a
  89. #
  90. #    "-lXt" == libXt.a:
  91. #        If you are using Motif 1.1, this should be the standard
  92. #        X11r4 Xt Instrinsics library, with MIT patches 1-18, and any
  93. #        additional patches distributed by OSF.
  94. #        If you are using Motif 1.0, make sure that -lXt points to
  95. #        Motif 1.0's libXt.a, perhaps by specifying <path>/libXt.a.
  96. #        DO NOT USE libXt.a from X11r4 with Motif 1.0 -- they are
  97. #        incompatible.
  98. #
  99. #    "-lX11" == libX11.a:
  100. #        If you are using Motif 1.1, this is the standard X11r4
  101. #        X11 library, or the X11 library supplied by your vendor.
  102. #        For Motif 1.0, you should probably use the X11 library
  103. #        supplied by your vendor (e.g. -lX), although the X11r4
  104. #        libX11.a should work too.
  105. #
  106. #    "-lPW" == libPW.a:
  107. #        This library is required by Motif's file selection box widget
  108. #        on some brands of Unix, such as HPUX, MIPS, and other systems
  109. #        that I am not familiar with. Note that this library may or
  110. #        may not be required for other OS's. See    the Motif documentation
  111. #        for your particular installation of Motif for details.
  112. #
  113. #    "-lmalloc" == libmalloc.a:
  114. #        I've been using this fast malloc library on HPUX. When
  115. #        used in conjuction with Motif, -lmalloc causes a tremendous
  116. #        improvement in the overall application performance. Supposedly
  117. #        for HPUX 8.0, the standard malloc will be faster, though...
  118. #
  119.  
  120. # LIBS = /mnt0/src/OSFMotif1.1.1/lib/Xm/libXm.a /mnt0/src/X11r4/mit/lib/Xt/libXt.a /mnt0/src/X11r4/mit/lib/X/libX11.a -lPW -lm
  121. LIBS = -lXm -lXt -lX11 -lm
  122.  
  123.  
  124. #
  125. # Note on DEFINES:
  126. # (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
  127. # WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
  128. # for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
  129. #
  130. # (2) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
  131. # non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
  132. # and at that point this flag should be removed.
  133. #
  134. # Other defines that may be required: See Imake rules for your particular
  135. # machine to find out whether -DMALLOC_0_RETURNS_NULL is required
  136. # for linking with the fast malloc library "-lmalloc". Some machines
  137. # don't have a fast malloc library, in which case, don't bother.
  138. #
  139. # WINTERP uses BSD networking to implement the eval-server. Some machines
  140. # don't include BSD stuff by default. You should check the Imake rules
  141. # for your particular machine to see if you need to define things like
  142. # -DBSD or -DSYSV. IBM AIX 3.1 supposedly requires "-D_BSD" and also requires
  143. # linking with libbsd.a
  144. #            --------------------
  145. # NOTE: if you modify DEFINES below, you must also do the same 
  146. # modification in xlisp/Makefile.generic
  147. #
  148.  
  149. DEFINES = -DWINTERP -D_NO_PROTO -DBSD $(USER_DEFINES)
  150.  
  151.  
  152. #
  153. # Include any machine-specific compiler options in CFLAGS
  154. #
  155.  
  156. CFLAGS = $(INCLUDES) $(DEFINES)
  157.  
  158.  
  159. #
  160. # Some machines (Sun?) have buggy optimizers that make the programs behave
  161. # strangely. Turn off optimization if you suspect problems, or if you have a
  162. # known flaky compiler.
  163. #
  164.  
  165. OPTIMIZER = -O
  166.  
  167.  
  168. ##############################################################################
  169. LINT = /usr/bin/lint
  170. .SUFFIXES: .ln .c
  171. .c.ln:
  172.     $(LINT) -c $*.c $(DEFINES)
  173.  
  174.  
  175. ##############################################################################
  176. .c.o:
  177.     $(CC) -c $(OPTIMIZER) $*.c $(CFLAGS)
  178.  
  179.  
  180. ##############################################################################
  181. HDRS          = app_fundecl.h \
  182.         app_funextn.h \
  183.         app_funidx.h \
  184.         config.h \
  185.         user_prefs.h \
  186.         w_XmString.h \
  187.         w_funtab.h \
  188.         winterp.h
  189.  
  190. SRCS          = utils.c \
  191.         w_XmString.c \
  192.         w_callbacks.c \
  193.         w_classes.c \
  194.         w_evnthndlr.c \
  195.         w_funtab.c \
  196.         w_libXm.c \
  197.         w_libXt.c \
  198.         w_pixmap.c \
  199.         w_resources.c \
  200.         w_savedobjs.c \
  201.         w_timeouts.c \
  202.         w_txlations.c \
  203.         w_utils.c \
  204.         wc_ArrowB.c \
  205.         wc_BulletinB.c \
  206.         wc_CascadeB.c \
  207.         wc_Command.c \
  208.         wc_DrawingA.c \
  209.         wc_DrawnB.c \
  210.         wc_FileSB.c \
  211.         wc_Form.c \
  212.         wc_Frame.c \
  213.         wc_Label.c \
  214.         wc_List.c \
  215.         wc_MainW.c \
  216.         wc_MessageB.c \
  217.         wc_PanedW.c \
  218.         wc_PushB.c \
  219.         wc_RowColumn.c \
  220.         wc_SHELL.c \
  221.         wc_Scale.c \
  222.         wc_ScrollBar.c \
  223.         wc_ScrolledW.c \
  224.         wc_SelectioB.c \
  225.         wc_Separator.c \
  226.         wc_Text.c \
  227.         wc_ToggleB.c \
  228.         wc_WIDGET.c \
  229.         winterp.c
  230.  
  231. OBJS          = $(SRCS:.c=.o)
  232.  
  233. LINTS          =    $(SRCS:.c=.ln)
  234.  
  235. ##############################################################################
  236. DEST          = .
  237.  
  238. INSTALL          = install
  239.  
  240. LD          = $(CC)
  241.  
  242. LDFLAGS          = 
  243.  
  244. MAKEFILE      = Makefile.sparc
  245.  
  246. PRINT          = pr
  247.  
  248. PROGRAM       = winterp
  249.  
  250. SHELL          = /bin/sh
  251.  
  252. all::        $(PROGRAM)
  253.  
  254. $(PROGRAM):     $(OBJS) xlisp/libXlisp.a
  255.         @echo "Linking $(PROGRAM) ..."
  256.         $(LD) $(LDFLAGS) $(OBJS) xlisp/libXlisp.a $(LIBS) -o $(PROGRAM)
  257.         @echo "done"
  258.  
  259. # XmGraph::
  260. #         @echo "Making winterp+XmGraph ..."
  261. #         @echo "Be sure to delete all .o files if you previously compiled w/o -DHP_GRAPH_WIDGET!"
  262. #         (make -f Makefile.sparc "USER_DEFINES=-DHP_GRAPH_WIDGET $(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" winterp+XmGraph)
  263. # winterp+XmGraph:    $(OBJS) wc_XmGraph.o xlisp/libXlisp.a
  264. #             @echo "Linking winterp+XmGraph ..."
  265. #             $(LD) $(LDFLAGS) $(OBJS) wc_XmGraph.o xlisp/libXlisp.a -lXm -lgraph -lXt -lX11 -lPW -lm -lmalloc -o winterp+XmGraph
  266. #             @echo "done"
  267.             
  268. xlisp/libXlisp.a::
  269.     (cd $(@D) ; make -f Makefile.sparc "USER_DEFINES=$(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" $(@F) ; cd ..)
  270.  
  271. lint:    $(LINTS) xlisp/llib-Xlisp.ln
  272.     $(LINT) $(LINTS) xlisp/llib-Xlisp.ln -lXm -lXt -lX11 -lm > lint 2>&1
  273.  
  274. xlisp/llib-Xlisp.ln::
  275.     (cd $(@D) ; make -f Makefile.sparc "USER_DEFINES=$(USER_DEFINES)" $(@F) ; cd ..)
  276.  
  277. TAGS: $(HDRS) $(SRCS) xlisp/libXlisp.a
  278.     etags -et $(HDRS) $(SRCS) xlisp/*.h xlisp/*.c
  279.  
  280. cscope::
  281.     cscope-x -I. -Ixlisp/. -S. -S xlisp/. -name Winterp -iconic & 
  282.  
  283. run:;        winterp
  284.  
  285. clean:;        rm -f $(OBJS) $(LINTS) core
  286.  
  287. clobber:;    rm -f $(OBJS) $(PROGRAM)  $(LINTS) lint TAGS core tags
  288.  
  289. depend:;    mkmf -f $(MAKEFILE) ROOT=$(ROOT)
  290.  
  291. echo:;        @echo $(HDRS) $(SRCS)
  292.  
  293. index:;        ctags -wx $(HDRS) $(SRCS)
  294.  
  295. install:    $(PROGRAM)
  296.         @echo Installing $(PROGRAM) in $(DEST)
  297.         -strip $(PROGRAM)
  298.         if [ $(DEST) != . ]; then \
  299.         (rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi
  300.  
  301. print:;        $(PRINT) $(HDRS) $(SRCS)
  302.  
  303. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  304.  
  305. update:        $(DEST)/$(PROGRAM)
  306.  
  307. # $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS)
  308. #         $(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install
  309. ###
  310. utils.o:
  311. w_XmString.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h
  312. w_callbacks.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  313. w_classes.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  314. w_evnthndlr.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  315. w_funtab.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h app_funextn.h app_fundecl.h
  316. w_libXm.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h 
  317. w_libXt.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  318. w_pixmap.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  319. w_resources.o:  winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h 
  320. w_savedobjs.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  321. w_timeouts.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  322. w_txlations.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  323. w_utils.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  324. wc_ArrowB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  325. wc_BulletinB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  326. wc_CascadeB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  327. wc_Command.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  328. wc_DrawingA.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  329. wc_DrawnB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  330. wc_FileSB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  331. wc_Form.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  332. wc_Frame.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  333. wc_Label.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  334. wc_List.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  335. wc_MainW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  336. wc_MessageB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  337. wc_PanedW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  338. wc_PushB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  339. wc_RowColumn.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  340. wc_SHELL.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  341. wc_Scale.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  342. wc_ScrollBar.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  343. wc_ScrolledW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  344. wc_SelectioB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  345. wc_Separator.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  346. wc_Text.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  347. wc_ToggleB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  348. wc_WIDGET.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  349. # wc_XmGraph.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  350. winterp.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  351.