home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DMAKE37S.ZIP / DMAKE / UNIX / SYSVR4 / STARTUP.MK < prev    next >
Encoding:
Text File  |  1991-03-02  |  3.1 KB  |  136 lines

  1. # Generic UNIX DMAKE startup file.  Customize to suit your needs.
  2. # Should work for both SYSV, and BSD 4.3
  3. # See the documentation for a description of internally defined macros.
  4. #
  5. # Disable warnings for macros redefined here that were given
  6. # on the command line.
  7. __.SILENT := $(.SILENT)
  8. .SILENT   := yes
  9.  
  10. # Configuration parameters for DMAKE startup.mk file
  11. # Set these to NON-NULL if you wish to turn the parameter on.
  12. _HAVE_RCS    := yes        # yes => RCS  is installed.
  13. _HAVE_SCCS    := yes        # yes => SCCS is installed.
  14.  
  15. # Applicable suffix definitions
  16. A := .a        # Libraries
  17. E :=        # Executables
  18. F := .f        # Fortran
  19. O := .o        # Objects
  20. P := .p        # Pascal
  21. S := .s        # Assembler sources
  22. V := ,v        # RCS suffix
  23.  
  24. # Recipe execution configurations
  25. SHELL        := /bin/sh
  26. SHELLFLAGS    := -ce
  27. GROUPSHELL    := $(SHELL)
  28. GROUPFLAGS    := 
  29. SHELLMETAS    := |();&<>?*][$$:\\#`'"
  30. GROUPSUFFIX    :=
  31.  
  32. # Standard C-language command names and flags
  33.    CPP       := /lib/cpp        # C-preprocessor
  34.    CC      := cc        # C-compiler and flags
  35.    CFLAGS   =
  36.  
  37.    AS      := as        # Assembler and flags
  38.    ASFLAGS  = 
  39.  
  40.    LD       = $(CC)        # Loader and flags
  41.    LDFLAGS  =
  42.    LDLIBS   =
  43.  
  44. # Definition of $(MAKE) macro for recursive makes.
  45.    MAKE = $(MAKECMD) $(MFLAGS)
  46.  
  47. # Definition of Print command for this system.
  48.    PRINT = lpr
  49.  
  50. # Language and Parser generation Tools and their flags
  51.    YACC      := yacc        # standard yacc
  52.    YFLAGS  =
  53.    YTAB      := y.tab        # yacc output files name stem.
  54.  
  55.    LEX      := lex        # standard lex
  56.    LFLAGS  =
  57.    LEXYY  := lex.yy        # lex output file
  58.  
  59. # Other Compilers, Tools and their flags
  60.    PC    := pc            # pascal compiler
  61.    RC    := f77            # ratfor compiler
  62.    FC    := f77            # fortran compiler
  63.  
  64.    CO       := co        # check out for RCS
  65.    COFLAGS := -q
  66.  
  67.    AR     := ar            # archiver
  68.    ARFLAGS = ruv
  69.  
  70.    RM       := /bin/rm        # remove a file command
  71.    RMFLAGS  =
  72.  
  73. # Implicit generation rules for making inferences.
  74. # We don't provide .yr or .ye rules here.  They're obsolete.
  75. # Rules for making *$O
  76.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  77.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  78.    %$O : %$S ; $(AS) $<
  79.    %$O : %.cl ; class -c $<
  80.    %$O : %.e %.r %.F %$F
  81.     $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  82.  
  83. # Executables
  84.    %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  85.  
  86. # lex and yacc rules
  87.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  88.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  89.  
  90. # This rule tells how to make *.out from it's immediate list of prerequisites
  91. # UNIX only.
  92.    %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  93.  
  94. # RCS support
  95. .IF $(_HAVE_RCS)
  96.    % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  97.    .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  98. .END
  99.  
  100. # SCCS support
  101. .IF $(_HAVE_SCCS)
  102.    % : s.% ; get $@
  103.    .NOINFER : s.%
  104. .END
  105.  
  106. # Recipe to make archive files.
  107. %$A :
  108. [
  109.    $(AR) $(ARFLAGS) $@ $?
  110.    $(RM) $(RMFLAGS) $?
  111.    ranlib $@
  112. ]
  113.  
  114. # DMAKE uses this recipe to remove intermediate targets
  115. .REMOVE :; $(RM) -f $<
  116.  
  117. # AUGMAKE extensions for SYSV compatibility
  118. @B = $(@:b)
  119. @D = $(@:d)
  120. @F = $(@:f)
  121. *B = $(*:b)
  122. *D = $(*:d)
  123. *F = $(*:f)
  124. <B = $(<:b)
  125. <D = $(<:d)
  126. <F = $(<:f)
  127. ?B = $(?:b)
  128. ?F = $(?:f)
  129. ?D = $(?:d)
  130.  
  131. # Turn warnings back to previous setting.
  132. .SILENT := $(__.SILENT)
  133.  
  134. # Local startup file if any
  135. .INCLUDE .IGNORE: "_startup.mk"
  136.