home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / xkernel / Makefile.solaris < prev    next >
Makefile  |  1996-08-02  |  5KB  |  179 lines

  1. #
  2. # $RCSfile: Makefile.solaris,v $
  3. #
  4. # x-kernel v3.3
  5. #
  6. # Copyright (c) 1996,1993,1991,1990  Arizona Board of Regents
  7. #
  8. # $Log: Makefile.solaris,v $
  9. # Revision 1.8  1996/08/02  18:16:59  llp
  10. # refixed cc again
  11. #
  12. # Revision 1.7  1996/08/02  17:00:33  llp
  13. # flipped bak  to debug mode
  14. #
  15. # Revision 1.6  1996/08/01  23:16:35  llp
  16. # fixed LWP problem
  17. #
  18. # Revision 1.5  1996/06/10  18:25:14  llp
  19. # I have no idea
  20. #
  21. # Revision 1.4  1996/03/06  18:08:04  llp
  22. # fixe
  23. # fixed REALCC
  24. #
  25. # Revision 1.3  1996/01/30  20:33:00  slm
  26. # Cosmetic changes.
  27. #
  28. # Revision 1.2  1995/10/17  22:24:00  slm
  29. # Create .o files in OBJS directories, Makedep files in
  30. # DEPS directories, and ComposeFiles in COMS directories.
  31. #
  32. # Revision 1.1  1995/07/29  02:27:17  slm
  33. # Initial revision
  34. #
  35. # Revision 1.1.1.2  1994/11/22  21:51:17  hkaram
  36. # Added Solaris user_level changes
  37. #
  38. # Revision 1.1  1994/05/06  21:16:30  gordon
  39. # Initial revision
  40. #
  41. # Revision 1.46  1994/01/27  16:27:56  menze
  42. #   [ 1994/01/06          menze ]
  43. #   Defining XK_BIN_TYPE variable
  44. #   Modified LIBPATH for external libraries
  45. #
  46. #   [ 1994/01/04          menze ]
  47. #   Uses SYSTEM_PROTOTYPES conditional
  48. #
  49. # -----------------------------------------------------------------
  50. # Build-directory Makefile for the solaris/sparc platform.
  51. #
  52. # There are many variables defined here that may vary from site to site.  If
  53. # you are the first person at your site to build an x-kernel, look over the
  54. # definitions carefully and determine what the appropriate values should be
  55. # for your site.
  56.  
  57. XPLATFORM = solaris
  58. MACHINE = sparc
  59. XK_TYPE = UL
  60. XK_TYPE_DIR = user_level
  61. XK_BIN_TYPE := $(XPLATFORM)-$(MACHINE)
  62.  
  63. # HOWTOCOMPILE controls optimization flags and tracing routines.
  64. # It should be set to either DEBUG or OPTIMIZE
  65.  
  66. HOWTOCOMPILE = DEBUG
  67. #HOWTOCOMPILE = OPTIMIZE
  68.  
  69. HOW := $(XK_TYPE)-$(HOWTOCOMPILE)-$(XK_BIN_TYPE)
  70. HOWUTIL := $(HOWTOCOMPILE)-$(XK_BIN_TYPE)
  71.  
  72. # If XK_BYPASS_RCS is defined (to anything), RCS consistency checks will be
  73. # disabled.  This can make a build run significantly faster.
  74.  
  75. XK_BYPASS_RCS = blurp
  76.  
  77. # Compiler-related flags.  If you decide to change compilers, some of these
  78. # flags may also have to change.
  79. #
  80. # Both gcc and the Sun native cc seem to work ok.
  81. # but watch the "make dependencies" switch in makefile.local: cc uses -xM
  82.  
  83. CC = gcc
  84.  
  85. ifeq ($(CC),gcc)
  86.  
  87. DEBUGWARNINGS = -Wunused
  88. OPTIMIZEWARNINGS = -Wuninitialized
  89. WARNINGS = -Wreturn-type -Wimplicit -Wswitch -Wchar-subscripts    \
  90.            -Wshadow -Wmissing-prototypes -Winline -Wpointer-arith \
  91.            $($(HOWTOCOMPILE)WARNINGS)
  92. CC_SPECIFIC_FLAGS = -fwritable-strings -D_REENTRANT \
  93.            -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PER_PROCESS_TIMER_SOURCE \
  94.                # needed for multithread Solaris
  95. DEBUGCFLAGS = -g
  96. OPTIMIZECFLAGS = -O
  97. LDFLAGS = $(LIBPATH) -g
  98.  
  99. else    # native cc
  100.  
  101. CC_SPECIFIC_FLAGS = -D_REENTRANT \
  102.            -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PER_PROCESS_TIMER_SOURCE \
  103.                # needed for multithread Solaris
  104. DEBUGCFLAGS = -g
  105. OPTIMIZECFLAGS = -O
  106. LDFLAGS = $(LIBPATH) -g
  107.  
  108. endif
  109.  
  110. # Libraries.  Some of these libraries are labeled 'optional', indicating that
  111. # they are only used by some protocols.  Names and locations of libraries may
  112. # be site-specific.
  113.  
  114. LIBPATH = -L$(XRT)/lib -L$(XRT)/lib/$(XK_BIN_TYPE)
  115. solaris_LIBS = -lposix4 -lsocket -lnsl  -lthread    # required
  116. LIB_GNUMP = -lgmp    # GNU multi-precision library, optional
  117.  
  118. SED = sed
  119. MAKE = make
  120. #REALCC = /opt/SUNWspro/bin/cc        # lec's cc is broken
  121. REALCC = /usr/ucb/cc
  122. RANLIB = echo RANLIB is disabled:    # no ranlib in Solaris
  123. AR = ar
  124.  
  125. # XRT names a path to the top of the x-kernel source tree
  126.  
  127. XRT = ../../..
  128.  
  129. # TMP_CPPFLAGS and TMP_CFLAGS apply to the build directory only, and won't be
  130. # propagated to compilation in other x-kernel directories.
  131.  
  132. # TMP_CPPFLAGS =
  133. # TMP_CFLAGS =
  134.  
  135. # When compiling private versions of x-kernel utilities in your build area,
  136. # you may need to add include paths.  Add these to the TMP_INCLUDES variable.
  137.  
  138. TMP_INCLUDES = $(COMPOSE_INCLUDES)
  139.  
  140. MAKEFILE = Makefile
  141. MAKEFLAGS += --no-print-directory
  142.  
  143. OPTIMIZECPPFLAGS =
  144. DEBUGCPPFLAGS = -DXK_DEBUG
  145. BUILD_CPPFLAGS := $($(HOWTOCOMPILE)CPPFLAGS) -DX_SOLARIS -DXK_TRACE_LOCKING
  146. BUILD_CFLAGS = $($(HOWTOCOMPILE)CFLAGS)
  147.  
  148. all: xkernel
  149.  
  150. # The COMPOSE_MAKEFILE is generated from graph.comp when 'make compose' is run.
  151.  
  152. COMPOSE_MAKEFILE = Makefile.local
  153. COMPOSEFLAGS = -f -m $(COMPOSE_MAKEFILE)
  154. include $(COMPOSE_MAKEFILE)
  155.  
  156. $(COMPOSE_MAKEFILE):
  157.     @touch $(COMPOSE_MAKEFILE)
  158.  
  159. # If you compile source code in your build area which isn't associated with a
  160. # particular protocol, add the source names to PRIVSRC and the object names
  161. # (e.g., ./OBJS/$(HOW)/foo.o) to PRIVOBJ.
  162.  
  163. #PRIVSRC = \
  164. #PRIVOBJ = \
  165.  
  166. include $(XRT)/$(XK_TYPE_DIR)/build/Template/Makefile.common
  167.  
  168. # Include Makefile.nolibs to compile without libraries
  169.  
  170. include $(XRT)/$(XK_TYPE_DIR)/build/Template/Makefile.nolibs
  171.  
  172. xkernel: $(OBJ) $(XLIBS)
  173.     @echo linking xkernel ...
  174.     @$(CC) $(LDFLAGS) -o xkernel $(OBJ) $(XLIBS) $(COMPOSE_LIBS) \
  175.         $($(XPLATFORM)_LIBS)
  176.  
  177. include DEPS/Makedep.$(HOW)
  178.  
  179.