home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / os / Imakefile < prev    next >
Encoding:
Makefile  |  1991-08-22  |  4.0 KB  |  150 lines

  1. XCOMM $XConsortium: Imakefile,v 1.49 91/08/22 14:23:54 rws Exp $
  2. #include <Server.tmpl>
  3.  
  4. #if (SystemV || SystemV4) && !HasSockets
  5. #undef ConnectionFlags
  6. #define ConnectionFlags -DTCPCONN -DUNIXCONN
  7. #endif
  8.  
  9. /*
  10.  * If you have any extra files to be put into the library, define them here.
  11.  */
  12.  
  13. #ifdef HPArchitecture
  14. #define OtherSources hpsocket.c 
  15. #define OtherObjects hpsocket.o dbm.o 
  16. #endif
  17.  
  18. #ifdef R4FontStructtures
  19. FONTSRCS = osfonts.c fonttype.c
  20. FONTOBJS = osfonts.o fonttype.o
  21. FONT_DEFINES = FontDefines FontFilters
  22. #endif
  23.  
  24. /*
  25.  * do not modify the following two definitions
  26.  */
  27.  
  28. #ifndef OtherSources
  29. #define OtherSources
  30. #endif
  31.  
  32. #ifndef OtherObjects
  33. #define OtherObjects
  34. #endif
  35.  
  36. #if HasXdmAuth
  37. XDMAUTHDEFS = -DHASXDMAUTH
  38. XDMAUTHOBJS = xdmauth.o
  39. XDMAUTHSRCS = xdmauth.c
  40. #else
  41. XDMAUTHDEFS = 
  42. XDMAUTHOBJS =
  43. XDMAUTHSCRS =
  44. #endif
  45.  
  46. #if HasSecureRPC
  47. RPCDEFS = -DSECURE_RPC
  48. RPCOBJS = rpcauth.o
  49. RPCSRCS = rpcauth.c
  50. #else
  51. RPCDEFS =
  52. RPCOBJS =
  53. RPCSRCS =
  54. #endif
  55.  
  56. BOOTSTRAPCFLAGS = 
  57.            SRCS = WaitFor.c access.c connection.c io.c oscolor.c \
  58.                   osinit.c utils.c auth.c mitauth.c $(FONTSRCS) $(XDMAUTHSRCS) \
  59.            $(RPCSRCS) xdmcp.c decompress.c OtherSources
  60.            OBJS = WaitFor.o access.o connection.o io.o oscolor.o \
  61.                   osinit.o utils.o auth.o mitauth.o $(FONTOBJS) $(XDMAUTHOBJS) \
  62.            $(RPCOBJS) xdmcp.o decompress.o OtherObjects
  63. #if SpecialMalloc
  64.      OS_DEFINES = -DSPECIAL_MALLOC
  65. #else
  66.      OS_DEFINES =
  67. #endif /* SpecialMalloc */
  68.     DBM_DEFINES = NdbmDefines
  69.     ADM_DEFINES = -DADMPATH=\"$(ADMDIR)/X\%smsgs\"
  70.         DEFINES = ConnectionFlags $(OS_DEFINES) $(XDMAUTHDEFS) $(RPCDEFS) $(SIGNAL_DEFINES)
  71.        INCLUDES = -I.  -I../include -I$(INCLUDESRC) -I$(TOP)/lib/Xau
  72.     EXT_DEFINES = ExtensionDefines
  73.        LINTLIBS = ../dix/llib-ldix.ln
  74.  
  75. #ifdef HPArchitecture
  76.          DBMLIB = /usr/lib/libdbm.a
  77.     XLIBSYSVDIR = $(TOP)/lib/X/sysV
  78. #endif /* HPArchitecture */
  79.  
  80. #ifdef NEED_ALLOCA_FROM_LIBPW
  81.           PWLIB = /lib/libPW.a
  82. #endif /* NEED_ALLOCA_FROM_LIBPW */
  83.  
  84. NormalLibraryObjectRule()
  85. NormalLibraryTarget(os,$(OBJS))
  86. LintLibraryTarget(os,$(SRCS))
  87. NormalLintTarget($(SRCS))
  88.  
  89. XCOMM these depend on ConnectionFlags
  90. access.o: $(ICONFIGFILES)
  91. connection.o: $(ICONFIGFILES)
  92.  
  93. XCOMM these depend on HASXDMAUTH
  94. auth.o xdmcp.o: $(ICONFIGFILES)
  95.  
  96. #ifdef HPArchitecture
  97. XCOMM
  98. XCOMM The following kludge is necessary because dbm already has a global 
  99. XCOMM routine named "bcopy" that is implemented in a silly way.  So, we have to 
  100. XCOMM extract the objects from the library, force the bcopy routine to be 
  101. XCOMM local to the one file, put the result into a temporary file, rename the 
  102. XCOMM temporary file to its proper name, and link it together with
  103. XCOMM everything else to form the object file that we link into the server.
  104. XCOMM
  105. #ifdef hp9000s300
  106. dbm.o:  $(DBMLIB)
  107.     rm -f dbm.o
  108.     if [ ! -d dbm ]; then $(RM) -r dbm; mkdir dbm; else /bin/true; fi
  109.     (cd dbm; rm -f *.o; ar -x $(DBMLIB); \
  110.     ld -r -o a.out.o -h _bcopy ndbm.o; \
  111.     mv a.out.o ndbm.o; ld -r -o ../dbm.o *.o)
  112. #else
  113. dbm.o:  $(DBMLIB)
  114.     rm -f dbm.o
  115.     if [ ! -d dbm ]; then $(RM) -r dbm; mkdir dbm; else /bin/true; fi
  116.     (cd dbm; rm -f *.o; ar -x $(DBMLIB); \
  117.     ld -r -o a.out.o -h bcopy ndbm.o; \
  118.     mv a.out.o ndbm.o; ld -r -o ../dbm.o *.o)
  119. #endif /* hp9000s300 */
  120. #endif /* HPArchitecture */
  121.  
  122. #ifdef NEED_ALLOCA_FROM_LIBPW
  123. XCOMM
  124. XCOMM And this one is to get the version of alloca that lives in /lib/libPW.a
  125. XCOMM without getting all of the rest of the stuff in there.
  126. XCOMM
  127. alloca.o:  $(PWLIB)
  128.     rm -f alloca.o
  129.     ar x $(PWLIB) alloca.o
  130. #endif /* NEED_ALLOCA_FROM_LIBPW */
  131.  
  132. SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
  133. SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
  134. SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
  135. #if defined(SparcArchitecture) && HasGcc
  136. oscolor.o: $(ICONFIGFILES)
  137.     $(RM) $@
  138.     cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
  139. #else
  140. SpecialObjectRule(oscolor.o,$(ICONFIGFILES),$(DBM_DEFINES))
  141. #endif
  142.  
  143. #if HasSaberC
  144. saber_src:
  145.     XCOMM load $(CFLAGS) -DADMPATH=\"$(ADMDIR)/X\%smsgs\" $(EXT_DEFINES) \
  146.         $(FONT_DEFINES) $(SRCS)
  147. #endif
  148.  
  149. DependTarget()
  150.