home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / sys / vax / conf / Makefile.vax < prev    next >
Encoding:
Makefile  |  1991-03-31  |  3.4 KB  |  128 lines

  1. #    @(#)Makefile.vax    7.18 (Berkeley) 12/16/90
  2.  
  3. # Makefile for 4.4 BSD
  4. #
  5. # This makefile is constructed from a machine description:
  6. #    config machineid
  7. # Most changes should be made in the machine description
  8. #    /sys/vax/conf/``machineid''
  9. # after which you should do
  10. #     config machineid
  11. # Machine generic makefile changes should be made in
  12. #    /sys/conf/Makefile.``machinetype''
  13. # after which config should be rerun for all machines of that type.
  14. #
  15. # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
  16. #    IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
  17. #
  18. # -DTRACE    compile in kernel tracing hooks
  19. # -DQUOTA    compile in file system quotas
  20. # -DUUDMA    compile in unibus tu58 pseudo-dma code
  21. #
  22. C2=    /usr/libexec/c2
  23. LD=    /usr/bin/ld
  24.  
  25. S=    ../..
  26. VAX=    ../../vax
  27.  
  28. INCLUDES= -I. -I$S -I$S/sys
  29. COPTS=    ${INCLUDES} ${IDENT} -DKERNEL
  30. CFLAGS=    -O ${COPTS}
  31.  
  32. INLINECMD=    ${VAX}/inline/obj/inline
  33. INLINE= ${INLINECMD} ${INLINEOPTS}
  34.  
  35. AHEADS=    ${VAX}/vax/pcb.m
  36.  
  37. %OBJS
  38.  
  39. %CFILES
  40.  
  41. %LOAD
  42.  
  43. clean:
  44.     rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \
  45.         Errs errs linterrs makelinks
  46.  
  47. lint: /tmp param.c
  48.     @lint -hbxn -DGENERIC ${COPTS} ${PARAM} \
  49.       ${VAX}/vax/Locore.c ${CFILES} ioconf.c param.c | \
  50.         grep -v 'struct/union .* never defined' | \
  51.         grep -v 'possible pointer alignment problem'
  52.  
  53. symbols.sort: ${VAX}/vax/symbols.raw
  54.     grep -v '^#' ${VAX}/vax/symbols.raw \
  55.         | sed 's/^    //' | sort -u > symbols.sort
  56.  
  57. ${INLINECMD}:
  58.     cd ${VAX}/inline; make
  59.  
  60. locore.o: assym.s ${AHEADS} ${VAX}/vax/rpb.s ${VAX}/vax/scb.s ubvec.s
  61. locore.o: ${VAX}/vax/locore.s ubglue.s ${VAX}/include/mtpr.h
  62. locore.o: ${VAX}/include/trap.h ${VAX}/include/psl.h ${VAX}/include/pte.h 
  63. locore.o: ${VAX}/include/cpu.h mba.h
  64. locore.o:
  65.     cat assym.s ${VAX}/vax/rpb.s ${VAX}/vax/scb.s ubvec.s \
  66.         ${VAX}/vax/locore.s ubglue.s > locore.c
  67.     ${CC} -E -DLOCORE ${COPTS} locore.c > locore.i
  68.     @echo 'as -o locore.o $${AHEADS} locore.i'
  69.     @as -o locore.o ${AHEADS} locore.i
  70.     @rm locore.i
  71.  
  72. emulate.o: ${VAX}/vax/emulate.s
  73.     cpp -I. ${COPTS} ${VAX}/vax/emulate.s | ${AS} -o emulate.o
  74.  
  75. # the following is necessary because autoconf.o depends on #if GENERIC
  76. autoconf.o tu.o: Makefile
  77.  
  78. # the following are necessary because the files depend on the types of
  79. # vax cpu's included in the system configuration
  80. clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile
  81. crl.o flp.o mba.o uba.o vaxcpu.o : Makefile
  82.  
  83. # depend on network configuration
  84. af.o uipc_proto.o uipc_domain.o locore.o: Makefile
  85.  
  86. # depends on kdb being configured
  87. trap.o:    Makefile
  88.  
  89. # depend on maxusers
  90. assym.s: Makefile
  91.  
  92. assym.s: genassym
  93.     ./genassym >assym.s
  94.  
  95. genassym:
  96.     ${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${VAX}/vax/genassym.c
  97.  
  98. depend: assym.s ${CFILES}
  99.     mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c
  100.     mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${VAX}/vax/genassym.c
  101.  
  102. links:
  103.     egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
  104.       sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
  105.     echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
  106.       sort -u | comm -23 - dontlink | \
  107.       sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
  108.     echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks
  109.     echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks
  110.     sh makelinks && rm -f dontlink
  111.  
  112. tags:
  113.     @echo "see $S/kern/Makefile for tags"
  114.  
  115. ioconf.o:
  116.     ${CC} -c -S ${COPTS} ioconf.c
  117.     ${C2} ioconf.s | ${INLINE} | ${AS} -o ioconf.o
  118.     rm -f ioconf.s
  119.  
  120. param.c: $S/conf/param.c
  121.     rm -f param.c
  122.     cp $S/conf/param.c .
  123.  
  124. param.o: param.c Makefile
  125.     ${CC} -c ${CFLAGS} ${PARAM} param.c
  126.  
  127. %RULES
  128.